From f1ae364d8354b20b90c0e97b683a45319e137640 Mon Sep 17 00:00:00 2001 From: aptash Date: Mon, 8 Jan 2024 12:34:33 +0300 Subject: [PATCH] Plugin Calibration: fix getting intercept --- .../main/java/com/eveningoutpost/dexdrip/models/BgReading.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/models/BgReading.java b/app/src/main/java/com/eveningoutpost/dexdrip/models/BgReading.java index b4137dd6b3..03dd57cd00 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/models/BgReading.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/models/BgReading.java @@ -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");