Skip to content

Potential bug in updatePredictedGlucoseAndRecommendedBasal #260

Closed

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?

Activity

  1. ps2 commented on Nov 17, 2016

    @ps2
    Collaborator

    Thanks! Yes, this appears to be a serious error. For tempBasal, not bolus. I will get a fix submitted soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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