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; }