Git Product home page Git Product logo

pebble-compass's Introduction

Pebble Compass

Pebble appstore banner

Shows a white compass rose on black background, a level indicator and two text layers showing the current heading angle in degrees and as short direction text, e.g. "N" or "NE". It smoothly transitions to a second representation as band if you hold your watch upright. Also, the compass value fakes a physical model with friction and inertia.

Components

  • data_provider.{h,c}

    • offers various callbacks to combine accelerometer, compass data, orientation changes and other meaningful events
    • not used in this app: callbacks to modify the calculated value, head to a different angle but 0ΒΊ, etc.
  • compass_window.{h,c}

    • main window that mediates between the data provider and the various layers,
    • Mananges a transition state between "rose" and "band" to layout its various sub layers
    • presents and dismisses the calibration window according to data_provider_compass_needs_calibration()
  • compass_calibration_window.{h,c}

    • window to encourage the user to perform movements that will help the compass to calibrate
    • has no real knowledge over the compass calibration
    • has a super simple API and should be shared with other developers to do calibration
  • ticks_layer.{h,c}, renders the actual compass rose/band

  • bitmap.{h,c}, used for manipulating bitmaps

Remarks

There are a few TODOs in the code base. It's mostly about the usage of floats where one could use ints instead to save code space. Also, the ongoing animations of this app (and the missing exit condition in data_provider.c) have a strong impact on the battery life. Please read the comments if you consider using data_provider.{h,c} in your projects.

pebble-compass's People

Contributors

hbehrens avatar orviwan avatar ec1oud avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

ec1oud

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.