Skip to content

Potential bug in updatePredictedGlucoseAndRecommendedBasal #260

@trixing

Description

@trixing

In https://github.com/LoopKit/Loop/blob/master/Loop/Managers/LoopDataManager.swift#L542

Either a bug or I don't understand why we do first

    self.predictedGlucose = retrospectiveCorrectionEnabled ? predictionWithRetrospectiveEffect : prediction

but then unconditionally a few lines later

        let tempBasal = DoseMath.recommendTempBasalFromPredictedGlucose(predictionWithRetrospectiveEffect,

doesn't that let us to always recommend the bolus with retrospective effect? What the magic I'm missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions