Skip to content

Commit

Permalink
Plugin Calibration: fix getting intercept
Browse files Browse the repository at this point in the history
  • Loading branch information
aptash committed Jan 8, 2024
1 parent 1d84ed1 commit f1ae364
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ public static BgReading createFromRawNoSave(Sensor sensor, Calibration calibrati
Log.d(TAG, "USING CALIBRATION PLUGIN AS PRIMARY!!!");
if (plugin.isCalibrationSane(pcalibration)) {
bgReading.calculated_value = (pcalibration.slope * bgReading.age_adjusted_raw_value) + pcalibration.intercept;
bgReading.filtered_calculated_value = (pcalibration.slope * bgReading.ageAdjustedFiltered()) + calibration.intercept;
bgReading.filtered_calculated_value = (pcalibration.slope * bgReading.ageAdjustedFiltered()) + pcalibration.intercept;
} else {
UserError.Log.wtf(TAG, "Calibration plugin failed intercept sanity check: " + pcalibration.toS());
Home.toaststaticnext("Calibration plugin failed intercept sanity check");
Expand Down

0 comments on commit f1ae364

Please sign in to comment.