mddub / urchin-cgm

A graph of your CGM data on a Pebble watch.
MIT License
56 stars 45 forks source link

Add support for a fourth OpenAPS prediction line #67

Open mgranberry opened 6 years ago

mgranberry commented 6 years ago

OpenAPS now generates 4 prediction lines: IOB, COB, UAM, and either aCOB or ZT. This adds support for the fourth line.

I haven't updated any tests for this, but I have been running some form of it since March. If you have guidance on any tests to add I am willing to make an update.

mgranberry commented 6 years ago

For anyone interested I have a pre-build PBW here.

urchin-cgm.pbw.zip

scottleibrand commented 6 years ago

If you're trying to click a link on your phone to install it directly, here's the un-zipped .pbw: https://dl.dropboxusercontent.com/content_link/ZXRIPfDA8Fpww8eOCcIbYqJzqnInddD87n6zlfh8lzEzbjOedMt6Y6Day5cZ2jvO/file?dl=1

scottleibrand commented 6 years ago

Running this on my Pebble now, and it looks good.

mddub commented 6 years ago

Looks great!

  1. Can you confirm this doesn't crash the Aplite emulator, nor (ideally) a physical Aplite watch? This uses a non-trivial amount of additional heap space, and Urchin is always very tight on memory on the older Pebbles. I'd stress-test it by maxing out the data in the DataMessage struct: make the points 1px wide (so that more SVG points are sent) and send a 255-character status text.

    Could you share the memory usage reported by the emulator a la #52?

  2. Testing-wise, can you update this test and its "gold" screenshot to include 4 prediction lines? https://github.com/mddub/urchin-cgm/blob/9fd20e1/test/test_screenshots.py#L1038-L1097

    Instructions here: https://github.com/mddub/urchin-cgm#testing

    No worries if it ends up being a headache getting screenshot tests running (it's been a while since I last ran them locally; Pebble env stuff may have changed since then).

mgranberry commented 6 years ago

I'm having trouble getting the config page running in an emulator. I'll see if I can locate my Pebble Steel charging cable tonight.