GithubHelp home page GithubHelp logo

/lib/pebble.js about cgm-remote-monitor HOT 2 CLOSED

nightscout avatar nightscout commented on May 19, 2024
/lib/pebble.js

from cgm-remote-monitor.

Comments (2)

bewest avatar bewest commented on May 19, 2024

Howdy Greg!

numbers 1 & 2 magic numbers

Re, numbers 1 & 2: keep in mind that some of this is "frankencode" and some was just done as quick as possible to get "something" to display. Specifically, when I wrote the lib/pebble.js stuff, I had access to stale data and wanted to ensure "something." The number, 6, 10, "forty minutes" times 5, etc, are all legacy. Feel free to be aggressive here, there is no magic, and no sane reason for the inconsistencies you mentioned, just hacky code :-). The actual watch js only sends one message to the pebble with just the last reading. There's no control logic here, just left-overs from very quick development.

Number 3

I'm hesitant to weigh in on this. The dexcom reports the trend, and that's what we've been using. There's no loop, the if (foo in bar) idiom just checks to against two "data models": one version of the dexcom-uploader that reports the trend to mongo, and one that does not. The check happens to help avoid errors.

Number 4 dexcom magic readings

Yes, Dexcom itself reserves a number of "special glucose readings" which are not glucose readings, but other signals.
The DIRECTION hash at the top of the file is one copy of these mappings.
Here's another list in python https://github.com/compbrain/dexcom_reader/blob/master/constants.py#L78

Number 5 pebble view

Yes, I think everyone could get on board with this. The pebble js should just prep and display some data, ideally as thin as possible.

You might get a kick out of looking over #7, which has a few objectives laid out, and some progress towards them, and may help yield some additional folk-lore/insight/perspective.

from cgm-remote-monitor.

bewest avatar bewest commented on May 19, 2024

Closing this for now. Check out https://waffle.io/nightscout/cgm-remote-monitor, and re-open as needed.

from cgm-remote-monitor.

Related Issues (20)

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.