This commit is contained in:
Milos Kozak 2016-08-11 22:52:26 +02:00
parent ebee1cdeca
commit b1d5b12f55
2 changed files with 6 additions and 5 deletions

View file

@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View file

@ -333,10 +333,11 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
try {
battery.put("percent", batteryPercent);
status.put("status", "normal");
if (isTempBasalInProgress()) {
status.put("tempbasalpct", getTempBasal().percent);
status.put("tempbasalstart", DateUtil.toISOString(getTempBasal().timeStart));
status.put("tempbasalremainmin", getTempBasal().getPlannedRemainingMinutes());
TempBasal tb;
if ((tb = getTempBasal()) != null) {
status.put("tempbasalpct", tb.percent);
status.put("tempbasalstart", DateUtil.toISOString(tb.timeStart));
status.put("tempbasalremainmin", tb.getPlannedRemainingMinutes());
}
status.put("timestamp", DateUtil.toISOString(new Date()));