LoopKit / LoopCaregiver

21 stars 497 forks source link

Bug Report: Carb Issues Disappear in Nightscout #33

Closed marionbarker closed 7 months ago

marionbarker commented 8 months ago

It turns out that for the database used by Nightscout, when two carb entries have the same time of consumption, the most recent entry overwrites the prior one.

Please see: cgm-remote-monitor Issue 8185: Carb treatments disappearing

One proposed work around is to modify LoopCaregiver to keep the current time including seconds )and maybe msec) when the picker wheel is selected and only adjust the hours and minutes with the time picker. The odd of having the same time for remote carb entry then becomes miniscule.

The current method is to send selected hours and minutes with 0 seconds.

Please note that Loop behaves as expected, but for the remote carb entries selected to be at the same time from LoopCaregiver, Nightscout treatment history and display do not match Loop.

marionbarker commented 8 months ago

I confirmed that the same behavior happens when entering Carbs directly from Nightscout Careportal which only allows for hours and minutes to be selected.

marionbarker commented 7 months ago

A commit was added on 31 January 2024 to fix this. Test with a test phone and there is no longer an issue with carbs entered at the same time disappearing.

commit ce5bde8