From 3a123f2cbaf265f5ddbffc99cc67604eb18d0589 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 25 Oct 2022 19:55:29 +0200 Subject: [PATCH] DynISF: prevent crash --- .../DetermineBasalAdapterSMBDynamicISFJS.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt index 234735a214..45e22db183 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt @@ -306,7 +306,7 @@ class DetermineBasalAdapterSMBDynamicISFJS internal constructor(private val scri this.profile.put("TDD", tdd) - if (sp.getBoolean(R.string.key_adjust_sensitivity, false) && tdd7D != null) + if (sp.getBoolean(R.string.key_adjust_sensitivity, false) && tdd7D != null && tdd7D != 0.0) autosensData.put("ratio", tddLast24H / tdd7D) else autosensData.put("ratio", 1.0)