Merge branch 'omnipod_eros_dev' into omnipod_eros_dev_upstream_merge
This commit is contained in:
commit
ad95c15e0e
1 changed files with 12 additions and 2 deletions
|
@ -738,10 +738,20 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
||||||
|
|
||||||
status.put("timestamp", DateUtil.toISOString(new Date()));
|
status.put("timestamp", DateUtil.toISOString(new Date()));
|
||||||
|
|
||||||
pump.put("battery", battery);
|
// BS: Leave battery level out for now as we only have a fixed bogus value
|
||||||
|
// 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);
|
||||||
pump.put("reservoir", getReservoirLevel());
|
|
||||||
|
// If the reservoir level is over 50 units, we don't know the actual value,
|
||||||
|
// so only include the reservoir level if it's under 50 units
|
||||||
|
double reservoirLevel = getReservoirLevel();
|
||||||
|
if (reservoirLevel <= OmnipodConstants.MAX_RESERVOIR_READING) {
|
||||||
|
pump.put("reservoir", reservoirLevel);
|
||||||
|
}
|
||||||
|
|
||||||
pump.put("clock", DateUtil.toISOString(new Date()));
|
pump.put("clock", DateUtil.toISOString(new Date()));
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
aapsLogger.error(LTag.PUMP, "Unhandled exception", e);
|
aapsLogger.error(LTag.PUMP, "Unhandled exception", e);
|
||||||
|
|
Loading…
Reference in a new issue