Add future carbs on watch.

This commit is contained in:
Johannes Mockenhaupt 2018-04-26 01:16:31 +02:00
parent 2f846bc417
commit 8d4e9f0043
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -722,6 +722,9 @@ public class WatchUpdaterService extends WearableListenerService implements
CobInfo cobInfo = IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "WatcherUpdaterService"); CobInfo cobInfo = IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "WatcherUpdaterService");
if (cobInfo.displayCob != null) { if (cobInfo.displayCob != null) {
cobStringResult = DecimalFormatter.to0Decimal(cobInfo.displayCob) + "g"; cobStringResult = DecimalFormatter.to0Decimal(cobInfo.displayCob) + "g";
if (cobInfo.futureCarbs > 0) {
cobStringResult += " (" + DecimalFormatter.to0Decimal(cobInfo.futureCarbs) + ")";
}
} }
return cobStringResult; return cobStringResult;
} }