more progress logging on R
This commit is contained in:
parent
8cd8c6b5d9
commit
144a227d14
|
@ -24,9 +24,10 @@ public class MsgStatusBasic extends MessageBase {
|
||||||
pump.reservoirRemainingUnits = intFromBuff(bytes, 7, 3) / 750d;
|
pump.reservoirRemainingUnits = intFromBuff(bytes, 7, 3) / 750d;
|
||||||
pump.bolusBlocked = intFromBuff(bytes, 10, 1) == 1;
|
pump.bolusBlocked = intFromBuff(bytes, 10, 1) == 1;
|
||||||
pump.currentBasal = intFromBuff(bytes, 11, 2) / 100d;
|
pump.currentBasal = intFromBuff(bytes, 11, 2) / 100d;
|
||||||
pump.tempBasalPercent = intFromBuff(bytes, 13, 1);
|
// removed. info taken from tempstatus message
|
||||||
pump.isExtendedInProgress = intFromBuff(bytes, 14, 1) == 1;
|
//pump.tempBasalPercent = intFromBuff(bytes, 13, 1);
|
||||||
pump.isTempBasalInProgress = intFromBuff(bytes, 15, 1) == 1;
|
//pump.isExtendedInProgress = intFromBuff(bytes, 14, 1) == 1;
|
||||||
|
//pump.isTempBasalInProgress = intFromBuff(bytes, 15, 1) == 1;
|
||||||
pump.batteryRemaining = intFromBuff(bytes, 20, 1);
|
pump.batteryRemaining = intFromBuff(bytes, 20, 1);
|
||||||
|
|
||||||
if (Config.logDanaMessageDetail) {
|
if (Config.logDanaMessageDetail) {
|
||||||
|
@ -37,9 +38,9 @@ public class MsgStatusBasic extends MessageBase {
|
||||||
log.debug("Reservoir remaining units: " + pump.reservoirRemainingUnits);
|
log.debug("Reservoir remaining units: " + pump.reservoirRemainingUnits);
|
||||||
log.debug("Bolus blocked: " + pump.bolusBlocked);
|
log.debug("Bolus blocked: " + pump.bolusBlocked);
|
||||||
log.debug("Current basal: " + pump.currentBasal);
|
log.debug("Current basal: " + pump.currentBasal);
|
||||||
log.debug("Current temp basal percent: " + pump.tempBasalPercent);
|
//log.debug("Current temp basal percent: " + pump.tempBasalPercent);
|
||||||
log.debug("Is extended bolus running: " + pump.isExtendedInProgress);
|
//log.debug("Is extended bolus running: " + pump.isExtendedInProgress);
|
||||||
log.debug("Is temp basal running: " + pump.isTempBasalInProgress);
|
//log.debug("Is temp basal running: " + pump.isTempBasalInProgress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,10 +290,13 @@ public class DanaRExecutionService extends Service {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mSerialIOThread.sendMessage(tempStatusMsg); // do this before statusBasic because here is temp duration
|
|
||||||
mSerialIOThread.sendMessage(exStatusMsg);
|
|
||||||
mSerialIOThread.sendMessage(statusMsg);
|
mSerialIOThread.sendMessage(statusMsg);
|
||||||
mSerialIOThread.sendMessage(statusBasicMsg);
|
mSerialIOThread.sendMessage(statusBasicMsg);
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingtempbasalstatus)));
|
||||||
|
mSerialIOThread.sendMessage(tempStatusMsg);
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingextendedbolusstatus)));
|
||||||
|
mSerialIOThread.sendMessage(exStatusMsg);
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingbolusstatus)));
|
||||||
|
|
||||||
if (!statusMsg.received) {
|
if (!statusMsg.received) {
|
||||||
mSerialIOThread.sendMessage(statusMsg);
|
mSerialIOThread.sendMessage(statusMsg);
|
||||||
|
@ -319,6 +322,7 @@ public class DanaRExecutionService extends Service {
|
||||||
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
if (danaRPump.lastSettingsRead.getTime() + 60 * 60 * 1000L < now.getTime() || !MainApp.getSpecificPlugin(DanaRPlugin.class).isInitialized()) {
|
if (danaRPump.lastSettingsRead.getTime() + 60 * 60 * 1000L < now.getTime() || !MainApp.getSpecificPlugin(DanaRPlugin.class).isInitialized()) {
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingpumpsettings)));
|
||||||
mSerialIOThread.sendMessage(new MsgSettingShippingInfo());
|
mSerialIOThread.sendMessage(new MsgSettingShippingInfo());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingActiveProfile());
|
mSerialIOThread.sendMessage(new MsgSettingActiveProfile());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingMeal());
|
mSerialIOThread.sendMessage(new MsgSettingMeal());
|
||||||
|
@ -329,6 +333,7 @@ public class DanaRExecutionService extends Service {
|
||||||
mSerialIOThread.sendMessage(new MsgSettingActiveProfile());
|
mSerialIOThread.sendMessage(new MsgSettingActiveProfile());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingProfileRatios());
|
mSerialIOThread.sendMessage(new MsgSettingProfileRatios());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingProfileRatiosAll());
|
mSerialIOThread.sendMessage(new MsgSettingProfileRatiosAll());
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingpumptime)));
|
||||||
mSerialIOThread.sendMessage(new MsgSettingPumpTime());
|
mSerialIOThread.sendMessage(new MsgSettingPumpTime());
|
||||||
long timeDiff = (danaRPump.pumpTime.getTime() - System.currentTimeMillis()) / 1000L;
|
long timeDiff = (danaRPump.pumpTime.getTime() - System.currentTimeMillis()) / 1000L;
|
||||||
log.debug("Pump time difference: " + timeDiff + " seconds");
|
log.debug("Pump time difference: " + timeDiff + " seconds");
|
||||||
|
|
|
@ -286,11 +286,13 @@ public class DanaRKoreanExecutionService extends Service {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mSerialIOThread.sendMessage(new MsgSettingShippingInfo()); // TODO: show it somewhere
|
|
||||||
mSerialIOThread.sendMessage(tempStatusMsg); // do this before statusBasic because here is temp duration
|
|
||||||
mSerialIOThread.sendMessage(exStatusMsg);
|
|
||||||
//mSerialIOThread.sendMessage(statusMsg);
|
//mSerialIOThread.sendMessage(statusMsg);
|
||||||
mSerialIOThread.sendMessage(statusBasicMsg);
|
mSerialIOThread.sendMessage(statusBasicMsg);
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingtempbasalstatus)));
|
||||||
|
mSerialIOThread.sendMessage(tempStatusMsg);
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingextendedbolusstatus)));
|
||||||
|
mSerialIOThread.sendMessage(exStatusMsg);
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingbolusstatus)));
|
||||||
|
|
||||||
// if (!statusMsg.received) {
|
// if (!statusMsg.received) {
|
||||||
// mSerialIOThread.sendMessage(statusMsg);
|
// mSerialIOThread.sendMessage(statusMsg);
|
||||||
|
@ -316,6 +318,7 @@ public class DanaRKoreanExecutionService extends Service {
|
||||||
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
if (danaRPump.lastSettingsRead.getTime() + 60 * 60 * 1000L < now.getTime() || !MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).isInitialized()) {
|
if (danaRPump.lastSettingsRead.getTime() + 60 * 60 * 1000L < now.getTime() || !MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).isInitialized()) {
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingpumpsettings)));
|
||||||
mSerialIOThread.sendMessage(new MsgSettingShippingInfo());
|
mSerialIOThread.sendMessage(new MsgSettingShippingInfo());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingMeal());
|
mSerialIOThread.sendMessage(new MsgSettingMeal());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingBasal_k());
|
mSerialIOThread.sendMessage(new MsgSettingBasal_k());
|
||||||
|
@ -323,6 +326,8 @@ public class DanaRKoreanExecutionService extends Service {
|
||||||
mSerialIOThread.sendMessage(new MsgSettingMaxValues());
|
mSerialIOThread.sendMessage(new MsgSettingMaxValues());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingGlucose());
|
mSerialIOThread.sendMessage(new MsgSettingGlucose());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingProfileRatios());
|
mSerialIOThread.sendMessage(new MsgSettingProfileRatios());
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingpumptime)));
|
||||||
|
mSerialIOThread.sendMessage(new MsgSettingPumpTime());
|
||||||
long timeDiff = (danaRPump.pumpTime.getTime() - System.currentTimeMillis()) / 1000L;
|
long timeDiff = (danaRPump.pumpTime.getTime() - System.currentTimeMillis()) / 1000L;
|
||||||
log.debug("Pump time difference: " + timeDiff + " seconds");
|
log.debug("Pump time difference: " + timeDiff + " seconds");
|
||||||
if (Math.abs(timeDiff) > 10) {
|
if (Math.abs(timeDiff) > 10) {
|
||||||
|
|
|
@ -261,10 +261,13 @@ public class DanaRv2ExecutionService extends Service {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mSerialIOThread.sendMessage(tempStatusMsg); // do this before statusBasic because here is temp duration
|
|
||||||
mSerialIOThread.sendMessage(exStatusMsg);
|
|
||||||
mSerialIOThread.sendMessage(statusMsg);
|
mSerialIOThread.sendMessage(statusMsg);
|
||||||
mSerialIOThread.sendMessage(statusBasicMsg);
|
mSerialIOThread.sendMessage(statusBasicMsg);
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingtempbasalstatus)));
|
||||||
|
mSerialIOThread.sendMessage(tempStatusMsg);
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingextendedbolusstatus)));
|
||||||
|
mSerialIOThread.sendMessage(exStatusMsg);
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingbolusstatus)));
|
||||||
|
|
||||||
if (!statusMsg.received) {
|
if (!statusMsg.received) {
|
||||||
mSerialIOThread.sendMessage(statusMsg);
|
mSerialIOThread.sendMessage(statusMsg);
|
||||||
|
@ -290,6 +293,7 @@ public class DanaRv2ExecutionService extends Service {
|
||||||
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
if (danaRPump.lastSettingsRead.getTime() + 60 * 60 * 1000L < now.getTime() || !MainApp.getSpecificPlugin(DanaRv2Plugin.class).isInitialized()) {
|
if (danaRPump.lastSettingsRead.getTime() + 60 * 60 * 1000L < now.getTime() || !MainApp.getSpecificPlugin(DanaRv2Plugin.class).isInitialized()) {
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingpumpsettings)));
|
||||||
mSerialIOThread.sendMessage(new MsgSettingShippingInfo());
|
mSerialIOThread.sendMessage(new MsgSettingShippingInfo());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingActiveProfile());
|
mSerialIOThread.sendMessage(new MsgSettingActiveProfile());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingMeal());
|
mSerialIOThread.sendMessage(new MsgSettingMeal());
|
||||||
|
@ -300,6 +304,7 @@ public class DanaRv2ExecutionService extends Service {
|
||||||
mSerialIOThread.sendMessage(new MsgSettingActiveProfile());
|
mSerialIOThread.sendMessage(new MsgSettingActiveProfile());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingProfileRatios());
|
mSerialIOThread.sendMessage(new MsgSettingProfileRatios());
|
||||||
mSerialIOThread.sendMessage(new MsgSettingProfileRatiosAll());
|
mSerialIOThread.sendMessage(new MsgSettingProfileRatiosAll());
|
||||||
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingpumptime)));
|
||||||
mSerialIOThread.sendMessage(new MsgSettingPumpTime());
|
mSerialIOThread.sendMessage(new MsgSettingPumpTime());
|
||||||
long timeDiff = (danaRPump.pumpTime.getTime() - System.currentTimeMillis()) / 1000L;
|
long timeDiff = (danaRPump.pumpTime.getTime() - System.currentTimeMillis()) / 1000L;
|
||||||
log.debug("Pump time difference: " + timeDiff + " seconds");
|
log.debug("Pump time difference: " + timeDiff + " seconds");
|
||||||
|
|
Loading…
Reference in a new issue