suspended status for korean pump

This commit is contained in:
Milos Kozak 2017-03-24 12:22:36 +01:00
parent a4f302ee4a
commit c78adb6256
3 changed files with 5 additions and 3 deletions

View file

@ -227,7 +227,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, Constraints
@Override @Override
public boolean isSuspended() { public boolean isSuspended() {
return false; return getDanaRPump().pumpSuspended;
} }
@Override @Override

View file

@ -43,6 +43,8 @@ public class DanaRKoreanPump {
public int protocol; public int protocol;
public int productCode; public int productCode;
public boolean pumpSuspended;
public boolean isConfigUD; public boolean isConfigUD;
public boolean isExtendedBolusEnabled; public boolean isExtendedBolusEnabled;
public boolean isEasyModeEnabled; public boolean isEasyModeEnabled;

View file

@ -26,13 +26,13 @@ public class MsgInitConnStatusBasic extends MessageBase {
return; return;
} }
DanaRKoreanPump pump = DanaRKoreanPlugin.getDanaRPump(); DanaRKoreanPump pump = DanaRKoreanPlugin.getDanaRPump();
int isStatusSuspendOn = intFromBuff(bytes, 0, 1); pump.pumpSuspended = intFromBuff(bytes, 0, 1) == 1;
int isUtilityEnable = intFromBuff(bytes, 1, 1); int isUtilityEnable = intFromBuff(bytes, 1, 1);
pump.isEasyModeEnabled = intFromBuff(bytes, 2, 1) == 1; pump.isEasyModeEnabled = intFromBuff(bytes, 2, 1) == 1;
int easyUIMode = intFromBuff(bytes, 3, 1); int easyUIMode = intFromBuff(bytes, 3, 1);
pump.password = intFromBuff(bytes, 4, 2) ^ 0x3463; pump.password = intFromBuff(bytes, 4, 2) ^ 0x3463;
if (Config.logDanaMessageDetail) { if (Config.logDanaMessageDetail) {
log.debug("isStatusSuspendOn: " + isStatusSuspendOn); log.debug("isStatusSuspendOn: " + pump.pumpSuspended);
log.debug("isUtilityEnable: " + isUtilityEnable); log.debug("isUtilityEnable: " + isUtilityEnable);
log.debug("Is EasyUI Enabled: " + pump.isEasyModeEnabled); log.debug("Is EasyUI Enabled: " + pump.isEasyModeEnabled);
log.debug("easyUIMode: " + easyUIMode); log.debug("easyUIMode: " + easyUIMode);