forked from mddub/urchin-cgm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Mark Wilson | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
A Pebble watchface for showing [Nightscout](https://github.com/nightscout/cgm-remote-monitor) CGM data in graph format, like this: | ||
|
||
 | ||
|
||
Still very much work-in-progress. Architecture is liable to change. Probably soon to be renamed, too. | ||
|
||
#### To install: | ||
* Add a `src/js/_config.js` with your Nightscout host and build/install with the Pebble SDK. | ||
|
||
#### To configure (for now): | ||
* The size, position, and borders of each layout element can be configured in `do_config()` at the top of `layout.c`. (e.g., move the graph to the top and time to the bottom, etc.) | ||
* You can change the graph range and gridline positions at the top of `graph_element.c` and `graph_element.h`. | ||
* You can show whatever string you want in the status bar (including newlines, if you configure the status bar to be taller) by sending a different value for `statusText` in `main.js`. This can be based on data from any URL, following the pattern of `getIOB()`. | ||
|
||
#### Notes: | ||
* `(0/3)` means the Pebble last heard from the phone 0 minutes ago, and Nightscout last got new data 3 minutes ago. This will probably be moved elsewhere soon, and probably appear only when it's necessary to highlight an unacceptable lag in any segment of the Pebble -> phone -> Nightscout -> rig pipeline. | ||
* `0.8 u (4)` means IOB is 0.8 units as of 4 minutes ago. This data is [reported by a MiniMed Connect](https://github.com/mddub/minimed-connect-to-nightscout) and probably does not apply for most people, but is easy to customize (see above). | ||
|
||
#### To do (ordered vaguely by priority): | ||
* Generalize configuration of status bar content | ||
* Conserve battery by not redrawing unchanged data | ||
* Better indicators for phone/web/rig connectivity | ||
* Shift graph to the left for stale phone data on Pebble, as JS does for stale web data | ||
* Stale data alerts | ||
* Show watch battery level | ||
* Show date in time area when space allows | ||
* High/low BG alerts | ||
* Ability to rearrange/hide content within layout elements | ||
* Additional, optional layout elements (bolus visualization, basal visualization, large SGV number a la [cgm-pebble](https://github.com/nightscout/cgm-pebble)) | ||
* Configuration via phone | ||
* Integration tests based on visual diffs | ||
* Cache data | ||
* Periodically recreate the entire window in an attempt to stop garbled screen issues when the watchface has been running for a long time | ||
* Multiple layouts, toggled by [shaking watch](https://developer.getpebble.com/guides/pebble-apps/sensors/accelerometer/#tap-event-service) | ||
* etc. | ||
|
||
The code style favors comprehensibility and extensibility. By design, there is some boilerplate where one might otherwise prefer abstraction. Ideally, that boilerplate makes it easy for you to understand and modify the layout components. | ||
|
||
[File an issue](issues) to report a bug or provide feedback for future development. | ||
|
||
## Disclaimer | ||
|
||
This project is intended for educational and informational purposes only. It is not FDA approved and should not be used to make medical decisions. It is neither affiliated with nor endorsed by Dexcom. |