Closed bastiaanv closed 3 weeks ago
Having a quick glance at the code, I can't help but notice the same chunk copy/pasted 3 times throughout the code. Wouldn't it make more sense to extract this code to a function to ensure it doesn't get out of sync in the future?
@AndreasStokholm Fair point, updated the code to use a single function to fetch the pump's time!
Describe the bug
In the current dev/alpha branch, whenever you do a bolus, the
lastStatusPumpDateTime
-state doesn't get updated. This state is used to fetch the history from the pump. If this value doesn't get updated after a bolus, the history sync will re-fetch the bolus. This will cause a double insulin entry for every bolus/SMB.Screenshot of issue:
Note:
This bug makes the DanaKit project very unstable/unusable, therefore it would be nice to merge this asap