-
Notifications
You must be signed in to change notification settings - Fork 62
Description
when overriding a calibration, the latest calibration is changed so that sensor_confidence=0 and slope_confidence=0 (see https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/blob/master/app/src/main/java/com/eveningoutpost/dexdrip/Models/Calibration.java#L664)
Then when a new calibration is created, a call is made to calculate_w_l_s
this one makes a call to slopeOOBHandler
slopeOOBHandler uses the latest 3 calibrations. For this it calls Calibrations.latest(3)
https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/blob/master/app/src/main/java/com/eveningoutpost/dexdrip/Models/Calibration.java#L550
But latest(3) is picking up all calibrations with matching sensor id, the latest 3, that means it also takes the latest one which is actually being overriden.
Is that normal ?
I would think that it's better to get Calibration.allForSensorInLastFourDays and then take the latet 3 from that result.