Space-optimize COB on watch.

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

View file

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