You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have run into an issue where the sensor expired and didn't deliver new CGM values. The latest suggestion by determineBasal stuck around though and was never cleared because the determineBasal() function in APSManager.swift errors out early if glucose is too old. It should in that case reset the suggestion to 0 and publish to observer (I think).
If we don't do this, the Bolus calculator will happily keep using the old suggestion as setupInsulinRequired in BolusStateModel.swift doesn't care to check how recent the suggestion is. In terms in defense in depth it would probably good to always require a fresh determineBasal run in the BolusCalculator before recommending any values? Or at least it should check that the suggestion isn't older than a few minutes and no bolus has been issued since the last time it was opened. Maybe initiating a Bolus should also clear the latest suggestion?
The text was updated successfully, but these errors were encountered:
bjornoleh
pushed a commit
to bjornoleh/freeaps
that referenced
this issue
Aug 24, 2022
I have run into an issue where the sensor expired and didn't deliver new CGM values. The latest suggestion by determineBasal stuck around though and was never cleared because the determineBasal() function in APSManager.swift errors out early if glucose is too old. It should in that case reset the suggestion to 0 and publish to observer (I think).
If we don't do this, the Bolus calculator will happily keep using the old suggestion as setupInsulinRequired in BolusStateModel.swift doesn't care to check how recent the suggestion is. In terms in defense in depth it would probably good to always require a fresh determineBasal run in the BolusCalculator before recommending any values? Or at least it should check that the suggestion isn't older than a few minutes and no bolus has been issued since the last time it was opened. Maybe initiating a Bolus should also clear the latest suggestion?
The text was updated successfully, but these errors were encountered: