Report RL battery as pump battery to AAPS for Omnipod
This commit is contained in:
parent
d621c70719
commit
7f136316d3
1 changed files with 3 additions and 11 deletions
|
@ -611,10 +611,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getBatteryLevel() {
|
public int getBatteryLevel() {
|
||||||
if (!podStateManager.isPodRunning()) {
|
return rileyLinkServiceData.batteryLevel == null ? 0 : rileyLinkServiceData.batteryLevel;
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 75;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull @Override
|
@NonNull @Override
|
||||||
|
@ -738,9 +735,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
||||||
|
|
||||||
status.put("timestamp", DateUtil.toISOString(new Date()));
|
status.put("timestamp", DateUtil.toISOString(new Date()));
|
||||||
|
|
||||||
// BS: Leave battery level out for now as we only have a fixed bogus value
|
pump.put("battery", battery);
|
||||||
// TODO use RL battery level
|
|
||||||
//pump.put("battery", battery);
|
|
||||||
|
|
||||||
pump.put("status", status);
|
pump.put("status", status);
|
||||||
pump.put("extended", extended);
|
pump.put("extended", extended);
|
||||||
|
@ -804,10 +799,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
||||||
ret += "Extended: " + activeExtendedBolus.toString() + "\n";
|
ret += "Extended: " + activeExtendedBolus.toString() + "\n";
|
||||||
}
|
}
|
||||||
ret += "Reserv: " + (getReservoirLevel() > OmnipodConstants.MAX_RESERVOIR_READING ? "50+U" : DecimalFormatter.to0Decimal(getReservoirLevel()) + "U") + "\n";
|
ret += "Reserv: " + (getReservoirLevel() > OmnipodConstants.MAX_RESERVOIR_READING ? "50+U" : DecimalFormatter.to0Decimal(getReservoirLevel()) + "U") + "\n";
|
||||||
|
ret += "Batt: " + getBatteryLevel();
|
||||||
// BS leave out for now as we only have a bogus default value
|
|
||||||
// TODO use RL battery
|
|
||||||
// ret += "Batt: " + getBatteryLevel();
|
|
||||||
|
|
||||||
return ret.trim();
|
return ret.trim();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue