8000 Bug: Old suggestions keep getting used in Bolus Calculator · Issue #185 · ivalkou/freeaps · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Bug: Old suggestions keep getting used in Bolus Calculator #185
Open
@trixing

Description

@trixing

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0