From 9b6e97e1f2d0b0cfc1fb0684c5297ad48f21e204 Mon Sep 17 00:00:00 2001 From: swissalpine Date: Fri, 3 Jan 2020 06:56:27 +0100 Subject: [PATCH 1/3] Fix for mixed up bage_warn, bage_urgent for Combo in Statuslights Fixes the small bug mentioned in https://github.com/MilosKozak/AndroidAPS/issues/2320 --- .../androidaps/plugins/general/overview/StatuslightHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java index 15d9f11a2b..1aa978a17b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java @@ -41,7 +41,7 @@ class StatuslightHandler { R.string.key_statuslights_bat_warning, 22.0, batteryView, "BAT", batteryLevel); } else { - applyStatuslight("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT", 504, 240); + applyStatuslight("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT", 504, 744); } } From 0326f854dbcdc0352d7d1c8745f86a7e5a425794 Mon Sep 17 00:00:00 2001 From: swissalpine Date: Sun, 5 Jan 2020 15:51:27 +0100 Subject: [PATCH 2/3] Adjust handleAge too --- .../plugins/general/overview/StatuslightHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java index 1aa978a17b..4588b2f256 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java @@ -41,7 +41,7 @@ class StatuslightHandler { R.string.key_statuslights_bat_warning, 22.0, batteryView, "BAT", batteryLevel); } else { - applyStatuslight("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT", 504, 744); + applyStatuslight("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT", 224, 336); } } @@ -116,7 +116,7 @@ class StatuslightHandler { batteryView, "BAT ", pump.getBatteryLevel()); } else { handleAge("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT ", - 336, 240); + 224, 336); } } From a58a6540f2b27d9bbe7e28fc2c4024b4464fd22a Mon Sep 17 00:00:00 2001 From: swissalpine Date: Sun, 5 Jan 2020 16:12:50 +0100 Subject: [PATCH 3/3] Last inverted function void handleAge() --- .../androidaps/plugins/general/overview/StatuslightHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java index 4588b2f256..557ffd8d73 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatuslightHandler.java @@ -121,7 +121,7 @@ class StatuslightHandler { } void handleAge(String nsSettingPlugin, String eventName, TextView view, String text, - int defaultUrgentThreshold, int defaultWarnThreshold) { + int defaultWarnThreshold, int defaultUrgentThreshold) { NSSettingsStatus nsSettings = new NSSettingsStatus().getInstance(); if (view != null) {