Skip to content

Commit

Permalink
Merge pull request #3283 from aptash/plugin-calibration
Browse files Browse the repository at this point in the history
Plugin Calibration: fix getting intercept
  • Loading branch information
jamorham authored Jan 13, 2024
2 parents 28dc229 + f1ae364 commit f1dd5e9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,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 f1dd5e9

Please sign in to comment.