From 6e9758fa7e41bd1ac9eeb463d503c0800500aa8e Mon Sep 17 00:00:00 2001 From: Navid <51497406+Navid200@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:13:07 -0400 Subject: [PATCH] Reduce smart alerting and smart snoozing thresholds for the High alerts (#2612) * Reduce smart alerting and smart snoozing thresholds for the High alerts * To do documentation --------- Co-authored-by: Navid --- .../java/com/eveningoutpost/dexdrip/models/BgReading.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 e9c99b6491..cc1a2c7cd3 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/models/BgReading.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/models/BgReading.java @@ -2040,6 +2040,7 @@ public static boolean trendingToAlertEnd(Context context, boolean above) { return false; } + // TODO: Should we add documentation to address possible misbehavior in case of 1-minute readings? if(above == false) { // This is a low alert, we should be going up if((latest.get(0).calculated_value - latest.get(1).calculated_value > 4) || @@ -2049,8 +2050,8 @@ public static boolean trendingToAlertEnd(Context context, boolean above) { } } else { // This is a high alert we should be heading down - if((latest.get(1).calculated_value - latest.get(0).calculated_value > 4) || - (latest.get(2).calculated_value - latest.get(0).calculated_value > 10)) { + if((latest.get(1).calculated_value - latest.get(0).calculated_value > 1) || + (latest.get(2).calculated_value - latest.get(0).calculated_value > 2)) { Log.d(TAG_ALERT, "trendingToAlertEnd returning true for high alert"); return true; }