nightscout / cgm-remote-monitor

nightscout web monitor
GNU Affero General Public License v3.0
2.38k stars 71.59k forks source link

Fix to display historic COB-value (from OpenAps) when scolling back in time #8081

Open bjornoleh opened 1 year ago

bjornoleh commented 1 year ago

Copied from https://github.com/nightscout/cgm-remote-monitor/commit/7aa606ddac735fce821119e5bb674c08bc8441f0 by @klalle / @maja-lofgren

Please see https://github.com/nightscout/cgm-remote-monitor/issues/6916 and https://github.com/nightscout/cgm-remote-monitor/issues/5241 for details.

bjornoleh commented 1 year ago

The CI test failed at https://github.com/nightscout/cgm-remote-monitor/actions/runs/5924138923/job/16061111728#step:7:5346

COB set a pill to the current COB: TypeError: Cannot read properties of undefined (reading 'lastSuggested') at Object.updateVisualisation (lib/plugins/cob.js:8:3117) at Context. (tests/cob.test.js:95:9) at processImmediate (node:internal/timers:466:21)

bjornoleh commented 1 year ago

I don’t know if the proposed fix is a good one or a hack. But it has been working well for us using iAPS (previously called FreeAPS X). It should also work with AAPS, which is what this fix was targeted at by the original author. I don’t know if it would work with iOS DIY Loop

bewest commented 1 year ago

Excellent, looks like this will require a bit of work for loop as well. Great start on fixing this old bug!

JohnKitching commented 9 months ago

Is this still being worked on? I'm not sure from the comments what it's waiting on.