Minor improvements in OmnipodPumpPlugin
This commit is contained in:
parent
9bce1fdc6c
commit
25b6ddcbc0
1 changed files with 5 additions and 5 deletions
|
@ -680,7 +680,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
||||||
JSONObject status = new JSONObject();
|
JSONObject status = new JSONObject();
|
||||||
JSONObject extended = new JSONObject();
|
JSONObject extended = new JSONObject();
|
||||||
try {
|
try {
|
||||||
status.put("status", podStateManager.isPodRunning() ? "normal" : "error");
|
status.put("status", podStateManager.isPodRunning() ? (podStateManager.isSuspended() ? "suspended" : "normal") : "no active Pod");
|
||||||
status.put("timestamp", DateUtil.toISOString(new Date()));
|
status.put("timestamp", DateUtil.toISOString(new Date()));
|
||||||
|
|
||||||
battery.put("percent", getBatteryLevel());
|
battery.put("percent", getBatteryLevel());
|
||||||
|
@ -792,12 +792,12 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
||||||
OmnipodCustomActionType mcat = (OmnipodCustomActionType) customActionType;
|
OmnipodCustomActionType mcat = (OmnipodCustomActionType) customActionType;
|
||||||
|
|
||||||
switch (mcat) {
|
switch (mcat) {
|
||||||
case ResetRileyLinkConfiguration: {
|
case ResetRileyLinkConfiguration:
|
||||||
serviceTaskExecutor.startTask(new ResetRileyLinkConfigurationTask(getInjector()));
|
serviceTaskExecutor.startTask(new ResetRileyLinkConfigurationTask(getInjector()));
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
aapsLogger.warn(LTag.PUMP, "Unknown custom action: {}" + mcat);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue