WatchUpdaterService: use IobCob.getCobInfo().
This commit is contained in:
parent
b5a6ef2ecc
commit
2f846bc417
|
@ -37,6 +37,7 @@ import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.db.BgReading;
|
import info.nightscout.androidaps.db.BgReading;
|
||||||
import info.nightscout.androidaps.db.DatabaseHelper;
|
import info.nightscout.androidaps.db.DatabaseHelper;
|
||||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||||
|
import info.nightscout.androidaps.plugins.IobCobCalculator.CobInfo;
|
||||||
import info.nightscout.androidaps.plugins.Treatments.Treatment;
|
import info.nightscout.androidaps.plugins.Treatments.Treatment;
|
||||||
import info.nightscout.androidaps.interfaces.PluginType;
|
import info.nightscout.androidaps.interfaces.PluginType;
|
||||||
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
||||||
|
@ -718,9 +719,9 @@ public class WatchUpdaterService extends WearableListenerService implements
|
||||||
private String generateCOBString() {
|
private String generateCOBString() {
|
||||||
|
|
||||||
String cobStringResult = "--";
|
String cobStringResult = "--";
|
||||||
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensData("WatcherUpdaterService");
|
CobInfo cobInfo = IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "WatcherUpdaterService");
|
||||||
if (autosensData != null) {
|
if (cobInfo.displayCob != null) {
|
||||||
cobStringResult = (int) autosensData.cob + "g";
|
cobStringResult = DecimalFormatter.to0Decimal(cobInfo.displayCob) + "g";
|
||||||
}
|
}
|
||||||
return cobStringResult;
|
return cobStringResult;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue