From e07c5fb50ddab02f545c674c1dcbddeeba62f7af Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 30 Nov 2017 15:04:40 +0100 Subject: [PATCH 1/9] Update strings.xml Change "Temp basal" to "Temp Basal" --- app/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 9a4d839fec..8503d2e6c6 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -97,7 +97,7 @@ VIRTUELLE PUMPE SQL Error Extended bolus - Temp basal + Temp Basal Sichtbar Basis Basalrate TOTAL From 29d9d20605f82274d3c7784995ae4b6a0d3948c7 Mon Sep 17 00:00:00 2001 From: Andreas Date: Fri, 1 Dec 2017 08:03:33 +0100 Subject: [PATCH 2/9] Update strings.xml Add german text for local alerts --- app/src/main/res/values-de/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 8503d2e6c6..f686d7a95a 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -672,4 +672,10 @@ PRE Interner NSClient NSCI + Lokale Alarme + Benutze Systemmeldungen für Alarme und Meldungen + Pumpe ist nicht erreichbar + Alarm wenn keine Glukose Daten empfangen werden + Alarm wenn die Pumpe nicht erreichbar ist + Pumpe ist nicht erreichbar Grenze [min] From 50cbff6fa44c614a3f1e24c2aac28e3d0306bece Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Tue, 5 Dec 2017 22:08:14 +0100 Subject: [PATCH 3/9] untranslatable strings --- app/src/main/res/values-el/strings.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 5b9b61ddf9..d1738abd28 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -435,9 +435,7 @@ Ρυθμίσεις για Προχωρημένους Model: %02X Protocol: %02X Code: %02X Προφίλ - max_daily_safety_multiplier "Προεπιλεγμένη τιμή: 3 Αυτό είναι ένα κλειδί ασφαλείας OpenAPS.Αυτό περιορίζει την αύξηση του βασικού x3 από την μεγαλύτερη τιμή του.Δεν χρειάζεται να το αλλάξετε " - current_basal_safety_multiplier Μόνο αριθμητικά ψηφία επιτρέπονται. "Μόνο αριθμητικά ψηφία μέσα στο εύρος %1$s - %2$s επιτρέπονται. " Το πεδίο αυτό δεν πρέπει να είναι κενό From 455383cfd55ce609da550136190af56875fe3f4e Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 5 Dec 2017 22:08:37 +0100 Subject: [PATCH 4/9] check for duration in json --- .../main/java/info/nightscout/androidaps/db/DatabaseHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java index 7e8085a0ce..79c52b1a50 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java +++ b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java @@ -1353,7 +1353,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper { return; } extendedBolus.date = trJson.getLong("mills"); - extendedBolus.durationInMinutes = trJson.getInt("duration"); + extendedBolus.durationInMinutes = trJson.has("duration") ? trJson.getInt("duration") : 0; extendedBolus.insulin = trJson.getDouble("relative"); extendedBolus._id = trJson.getString("_id"); createOrUpdate(extendedBolus); From 7d079821813ca4851fa883ac2de73e4caee3b634 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 25 Oct 2017 18:15:33 +0200 Subject: [PATCH 5/9] Log full class name (not just filename), so logs can be filtered by package name. --- app/src/main/assets/logback.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/assets/logback.xml b/app/src/main/assets/logback.xml index c34ff08b80..97e09b3e4d 100644 --- a/app/src/main/assets/logback.xml +++ b/app/src/main/assets/logback.xml @@ -15,7 +15,7 @@ 120 - %d{HH:mm:ss.SSS} [%thread] %-5level [%file:%line]: %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level [%class:%line]: %msg%n @@ -24,7 +24,7 @@ %logger{0} - [%thread] %-5level [%file:%line]: %msg%n + [%thread] %-5level [%class:%line]: %msg%n From d58bb75d012069fde5d755b610e1e7f013ae0409 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 6 Dec 2017 12:01:59 +0100 Subject: [PATCH 6/9] Add missing synchronized so guard works properly. --- .../androidaps/plugins/Overview/Dialogs/WizardDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java index 4e9a134fb0..464c422596 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java @@ -290,7 +290,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com } @Override - public void onClick(View view) { + public synchronized void onClick(View view) { switch (view.getId()) { case R.id.ok: if (okClicked) { From 242ed7217ae3fe484c0ddb1842e82a0a82ac9539 Mon Sep 17 00:00:00 2001 From: Roumen Georgiev Date: Thu, 7 Dec 2017 10:08:26 +0200 Subject: [PATCH 7/9] fix of extended bolus size --- .../graphExtensions/PointsWithLabelGraphSeries.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphExtensions/PointsWithLabelGraphSeries.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphExtensions/PointsWithLabelGraphSeries.java index f264a22382..7606a71f17 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphExtensions/PointsWithLabelGraphSeries.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphExtensions/PointsWithLabelGraphSeries.java @@ -230,7 +230,7 @@ public class PointsWithLabelGraphSeries e Rect bounds = new Rect((int)endX, (int)endY + 3, (int) (xpluslength), (int) endY + 8); mPaint.setStyle(Paint.Style.FILL_AND_STROKE); canvas.drawRect(bounds, mPaint); - mPaint.setTextSize((int) (scaledTextSize * 2.5)); + mPaint.setTextSize((float) (scaledTextSize)); mPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL)); mPaint.setFakeBoldText(true); canvas.drawText(value.getLabel(), endX, endY, mPaint); @@ -282,7 +282,7 @@ public class PointsWithLabelGraphSeries e mPaint.setStrokeWidth(0); if (value.getLabel() != null) { mPaint.setStrokeWidth(0); - mPaint.setTextSize((int) (scaledTextSize * 3)); + mPaint.setTextSize((float) (scaledTextSize * 1.2)); mPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD)); Rect bounds = new Rect(); mPaint.getTextBounds(value.getLabel(), 0, value.getLabel().length(), bounds); @@ -312,7 +312,7 @@ public class PointsWithLabelGraphSeries e mPaint.setStrokeWidth(0); if (value.getLabel() != null) { mPaint.setStrokeWidth(0); - mPaint.setTextSize(scaledTextSize * 3); + mPaint.setTextSize((float) (scaledTextSize * 1.5)); mPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD)); Rect bounds = new Rect(); mPaint.getTextBounds(value.getLabel(), 0, value.getLabel().length(), bounds); From aea47420e112f645d7e27d268030163ec75fae35 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Thu, 7 Dec 2017 10:40:00 +0100 Subject: [PATCH 8/9] fix NPE when profile not loaded --- .../plugins/Wear/wearintegration/WatchUpdaterService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java index 7acdd15d72..944774baaa 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java @@ -538,8 +538,10 @@ public class WatchUpdaterService extends WearableListenerService implements //bgi String bgiString = ""; Profile profile = MainApp.getConfigBuilder().getProfile(); - double bgi = -(bolusIob.activity + basalIob.activity) * 5 * profile.getIsf(); - bgiString = "" + ((bgi >= 0) ? "+" : "") + DecimalFormatter.to1Decimal(bgi); + if(profile!=null) { + double bgi = -(bolusIob.activity + basalIob.activity) * 5 * profile.getIsf(); + bgiString = "" + ((bgi >= 0) ? "+" : "") + DecimalFormatter.to1Decimal(bgi); + } String status = generateStatusString(profile, tempBasal,iobSum, iobDetail, bgiString); From 9d7e2f1becef16df44c3bd77bdf01c23a2657f3b Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 7 Dec 2017 18:48:05 +0100 Subject: [PATCH 9/9] RS report unsupported firmware --- .../plugins/Overview/notifications/Notification.java | 1 + .../comm/DanaRS_Packet_General_Get_Pump_Check.java | 8 ++++++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 10 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/notifications/Notification.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/notifications/Notification.java index 34ba82c27e..30f6fdd328 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/notifications/Notification.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/notifications/Notification.java @@ -55,6 +55,7 @@ public class Notification { public static final int WRONG_DRIVER = 24; public static final int PUMP_UNREACHABLE = 26; public static final int BG_READINGS_MISSED = 27; + public static final int UNSUPPORTED_FIRMWARE = 28; public int id; public Date date; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_General_Get_Pump_Check.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_General_Get_Pump_Check.java index 4818f4481d..a9bb7157af 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_General_Get_Pump_Check.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_General_Get_Pump_Check.java @@ -6,6 +6,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import info.nightscout.androidaps.Config; +import info.nightscout.androidaps.MainApp; +import info.nightscout.androidaps.R; +import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification; +import info.nightscout.androidaps.plugins.Overview.notifications.Notification; import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump; public class DanaRS_Packet_General_Get_Pump_Check extends DanaRS_Packet { @@ -37,6 +41,10 @@ public class DanaRS_Packet_General_Get_Pump_Check extends DanaRS_Packet { log.debug("Protocol: " + String.format("%02X ", pump.protocol)); log.debug("Product Code: " + String.format("%02X ", pump.productCode)); } + + if (pump.productCode < 2) { + MainApp.bus().post(new EventNewNotification(new Notification(Notification.UNSUPPORTED_FIRMWARE, MainApp.sResources.getString(R.string.unsupportedfirmware), Notification.URGENT))); + } } @Override diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e8918979b3..282299fdd0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -784,5 +784,6 @@ Customized APK for download Show detailed delta Show delta with one more decimal place + Unsupported pump firmware