Add reservoirLevel to PumpState.

This commit is contained in:
Johannes Mockenhaupt 2017-08-23 13:08:22 +02:00
parent 785a01a056
commit de693c0f76
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -20,7 +20,8 @@ public class PumpState {
public String errorMsg;
public boolean suspended;
public boolean lowBattery;
public int insulinState;
public int insulinState = -1;
public int reservoirLevel = -1;
public PumpState tbrActive(boolean tbrActive) {
this.tbrActive = tbrActive;
@ -52,6 +53,21 @@ public class PumpState {
return this;
}
public PumpState lowBattery(boolean lowBattery) {
this.lowBattery = lowBattery;
return this;
}
public PumpState insulinState(int insulinState) {
this.insulinState = insulinState;
return this;
}
public PumpState reservoirLevel(int reservoirLevel) {
this.reservoirLevel = reservoirLevel;
return this;
}
@Override
public String toString() {
return "PumpState{" +
@ -63,6 +79,7 @@ public class PumpState {
", suspended=" + suspended +
", lowBattery=" + lowBattery +
", insulinState=" + insulinState +
", reversoirLevel=" + reservoirLevel +
", timestamp=" + timestamp +
'}';
}