From 4834a2ba7c195669269565fcdfaf25b6727df4a7 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 29 Jul 2019 16:36:37 +0200 Subject: [PATCH] fix adding zero deviations --- .../androidaps/plugins/sensitivity/SensitivityOref1Plugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.java index bbd987e6bd..272ad4afe6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.java @@ -134,7 +134,7 @@ public class SensitivityOref1Plugin extends AbstractSensitivityPlugin { if (L.isEnabled(L.AUTOSENS)) log.debug("Using most recent " + deviationsArray.size() + " deviations"); if (deviationsArray.size() < 96) { - int pad = Math.round((1 - deviationsArray.size() / 96) * 18); + int pad = (int) Math.round((1 - (double) deviationsArray.size() / 96) * 18); if (L.isEnabled(L.AUTOSENS)) log.debug("Adding " + pad + " more zero deviations"); for (int d = 0; d < pad; d++) {