parent
0f067ef3a7
commit
87bc6ed798
|
@ -37,9 +37,6 @@ public class MsgGetUserOptions extends MessageBase {
|
||||||
public void handleMessage(byte[] packet) {
|
public void handleMessage(byte[] packet) {
|
||||||
DanaRPump pump = DanaRPump.getInstance();
|
DanaRPump pump = DanaRPump.getInstance();
|
||||||
byte[] bytes = getDataBytes(packet, 0, packet.length - 10);
|
byte[] bytes = getDataBytes(packet, 0, packet.length - 10);
|
||||||
for(int pos=0; pos < bytes.length; pos++) {
|
|
||||||
log.debug("[" + pos + "]" + bytes[pos]);
|
|
||||||
}
|
|
||||||
pump.timeDisplayType = bytes[0] == (byte) 1 ? 0 : 1; // 1 -> 24h 0 -> 12h
|
pump.timeDisplayType = bytes[0] == (byte) 1 ? 0 : 1; // 1 -> 24h 0 -> 12h
|
||||||
pump.buttonScrollOnOff = bytes[1] == (byte) 1 ? 1 : 0; // 1 -> ON, 0-> OFF
|
pump.buttonScrollOnOff = bytes[1] == (byte) 1 ? 1 : 0; // 1 -> ON, 0-> OFF
|
||||||
pump.beepAndAlarm = bytes[2]; // 1 -> Sound on alarm 2-> Vibrate on alarm 3-> Both on alarm 5-> Sound + beep 6-> vibrate + beep 7-> both + beep Beep adds 4
|
pump.beepAndAlarm = bytes[2]; // 1 -> Sound on alarm 2-> Vibrate on alarm 3-> Both on alarm 5-> Sound + beep 6-> vibrate + beep 7-> both + beep Beep adds 4
|
||||||
|
|
|
@ -28,15 +28,6 @@ public class MsgSettingUserOptions extends MessageBase {
|
||||||
public MsgSettingUserOptions(int timeDisplayType, int buttonScrollOnOff, int beepAndAlarm, int lcdOnTimeSec, int backlightOnTimeSec, int selectedLanguage, int glucoseUnit, int shutdownHour, int lowReservoirRate, int cannulaVolume, int refillRate) {
|
public MsgSettingUserOptions(int timeDisplayType, int buttonScrollOnOff, int beepAndAlarm, int lcdOnTimeSec, int backlightOnTimeSec, int selectedLanguage, int glucoseUnit, int shutdownHour, int lowReservoirRate, int cannulaVolume, int refillRate) {
|
||||||
this();
|
this();
|
||||||
log.debug(" initializing MsgSetUserOptions");
|
log.debug(" initializing MsgSetUserOptions");
|
||||||
log.debug("timeDisplayType: " + (byte) timeDisplayType);
|
|
||||||
log.debug("Button scroll: " + (byte) buttonScrollOnOff);
|
|
||||||
log.debug("BeepAndAlarm: " + (byte) beepAndAlarm);
|
|
||||||
log.debug("screen timeout: " + (byte) lcdOnTimeSec);
|
|
||||||
log.debug("Backlight: " + (byte) backlightOnTimeSec);
|
|
||||||
log.debug("Selected language: " + (byte) selectedLanguage);
|
|
||||||
log.debug("Units: " + (byte) glucoseUnit);
|
|
||||||
log.debug("Shutdown: " + (byte) shutdownHour);
|
|
||||||
log.debug("Low reservoir: " + (byte) lowReservoirRate);
|
|
||||||
this.timeDisplayType = timeDisplayType;
|
this.timeDisplayType = timeDisplayType;
|
||||||
this.buttonScrollOnOff = buttonScrollOnOff;
|
this.buttonScrollOnOff = buttonScrollOnOff;
|
||||||
this.beepAndAlarm = beepAndAlarm;
|
this.beepAndAlarm = beepAndAlarm;
|
||||||
|
@ -48,8 +39,7 @@ public class MsgSettingUserOptions extends MessageBase {
|
||||||
this.lowReservoirRate = lowReservoirRate;
|
this.lowReservoirRate = lowReservoirRate;
|
||||||
this.cannulaVolume = cannulaVolume;
|
this.cannulaVolume = cannulaVolume;
|
||||||
this.refillRate = refillRate;
|
this.refillRate = refillRate;
|
||||||
// need to organize here
|
|
||||||
// glucoseunit is at pos 8 and lowReservoirRate is at pos 27
|
|
||||||
AddParamByte((byte) timeDisplayType);
|
AddParamByte((byte) timeDisplayType);
|
||||||
AddParamByte((byte) buttonScrollOnOff);
|
AddParamByte((byte) buttonScrollOnOff);
|
||||||
AddParamByte((byte) beepAndAlarm);
|
AddParamByte((byte) beepAndAlarm);
|
||||||
|
|
Loading…
Reference in a new issue