From 176c5f46ff5d5f1131a5e162de311d53404ad300 Mon Sep 17 00:00:00 2001 From: Andrew Warrington Date: Thu, 21 Dec 2017 09:50:16 +0100 Subject: [PATCH] Ensure basal rate shown as a percentage if required according to user preferences. --- .../plugins/Wear/wearintegration/WatchUpdaterService.java | 8 ++++++-- 1 file changed, 6 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 d87ac2e69c..8e37be92e7 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 @@ -639,9 +639,13 @@ public class WatchUpdaterService extends WearableListenerService implements String basalStringResult; TemporaryBasal activeTemp = treatmentsInterface.getTempBasalFromHistory(System.currentTimeMillis()); if (activeTemp != null) { - basalStringResult = activeTemp.toStringVeryShort(); + basalStringResult = activeTemp.toStringShort(); } else { - basalStringResult = DecimalFormatter.to2Decimal(MainApp.getConfigBuilder().getProfile().getBasal()) + "U/h"; + if (SP.getBoolean(R.string.key_danar_visualizeextendedaspercentage, false)) { + basalStringResult = "100%"; + } else { + basalStringResult = DecimalFormatter.to2Decimal(MainApp.getConfigBuilder().getProfile().getBasal()) + "U/h"; + } } return basalStringResult; }