From 62295d001f1a2c5028b85acc80cd66833c820bd7 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Sun, 4 Mar 2018 20:13:16 +0100 Subject: [PATCH] wear COB in status --- .../nightscout/androidaps/watchfaces/BIGChart.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BIGChart.java b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BIGChart.java index 85f04745f6..404d70c997 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BIGChart.java +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BIGChart.java @@ -94,6 +94,8 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre private String batteryString = "--"; private String sgvString = "--"; private String externalStatusString = "no status"; + private String cobString = "-g"; + private TextView statusView; private long chartTapTime = 0l; private long sgvTapTime = 0l; @@ -352,6 +354,8 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre DataMap dataMap = DataMap.fromBundle(bundle); wakeLock.acquire(50); externalStatusString = dataMap.getString("externalStatusString"); + cobString = dataMap.getString("cob"); + showAgeAndStatus(); @@ -444,7 +448,12 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre } if(showStatus){ - statusView.setText(externalStatusString); + String status = externalStatusString; + if (sharedPrefs.getBoolean("show_cob", true)) { + status = externalStatusString + " " + cobString; + } + + statusView.setText(status); statusView.setVisibility(View.VISIBLE); } else { statusView.setVisibility(View.GONE);