fix max deily total units

This commit is contained in:
Milos Kozak 2016-07-08 14:06:37 +02:00
parent aa87cb7dea
commit f8ac10cddc
2 changed files with 4 additions and 4 deletions

View file

@ -21,7 +21,7 @@ public class DanaRPump {
public boolean pumpSuspended; public boolean pumpSuspended;
public boolean calculatorEnabled; public boolean calculatorEnabled;
public double dailyTotalUnits; public double dailyTotalUnits;
public int dailyMaxRate; public int maxDailyTotalUnits;
public double iob; public double iob;

View file

@ -17,7 +17,7 @@ public class MsgStatusBasic extends DanaRMessage {
boolean pumpSuspended = intFromBuff(bytes, 0, 1) == 1; boolean pumpSuspended = intFromBuff(bytes, 0, 1) == 1;
boolean calculatorEnabled = intFromBuff(bytes, 1, 1) == 1; boolean calculatorEnabled = intFromBuff(bytes, 1, 1) == 1;
double dailyTotalUnits = intFromBuff(bytes, 2, 3) / 750d; double dailyTotalUnits = intFromBuff(bytes, 2, 3) / 750d;
int dailyMaxRate = intFromBuff(bytes, 5, 2); int maxDailyTotalUnits = intFromBuff(bytes, 5, 2) / 100;
double reservoirRemainingUnits = intFromBuff(bytes, 7, 3) / 750d; double reservoirRemainingUnits = intFromBuff(bytes, 7, 3) / 750d;
boolean bolusBlocked = intFromBuff(bytes, 10, 1) == 1; boolean bolusBlocked = intFromBuff(bytes, 10, 1) == 1;
double currentBasal = intFromBuff(bytes, 11, 2) / 100d; double currentBasal = intFromBuff(bytes, 11, 2) / 100d;
@ -29,7 +29,7 @@ public class MsgStatusBasic extends DanaRMessage {
DanaRFragment.getDanaRPump().pumpSuspended = pumpSuspended; DanaRFragment.getDanaRPump().pumpSuspended = pumpSuspended;
DanaRFragment.getDanaRPump().calculatorEnabled = calculatorEnabled; DanaRFragment.getDanaRPump().calculatorEnabled = calculatorEnabled;
DanaRFragment.getDanaRPump().dailyTotalUnits = dailyTotalUnits; DanaRFragment.getDanaRPump().dailyTotalUnits = dailyTotalUnits;
DanaRFragment.getDanaRPump().dailyMaxRate = dailyMaxRate; DanaRFragment.getDanaRPump().maxDailyTotalUnits = maxDailyTotalUnits;
DanaRFragment.getDanaRPump().reservoirRemainingUnits = reservoirRemainingUnits; DanaRFragment.getDanaRPump().reservoirRemainingUnits = reservoirRemainingUnits;
DanaRFragment.getDanaRPump().bolusBlocked = bolusBlocked; DanaRFragment.getDanaRPump().bolusBlocked = bolusBlocked;
DanaRFragment.getDanaRPump().currentBasal = currentBasal; DanaRFragment.getDanaRPump().currentBasal = currentBasal;
@ -42,7 +42,7 @@ public class MsgStatusBasic extends DanaRMessage {
log.debug("Pump suspended: " + pumpSuspended); log.debug("Pump suspended: " + pumpSuspended);
log.debug("Calculator enabled: " + calculatorEnabled); log.debug("Calculator enabled: " + calculatorEnabled);
log.debug("Daily total units: " + dailyTotalUnits); log.debug("Daily total units: " + dailyTotalUnits);
log.debug("Daily max rate: " + dailyMaxRate); log.debug("Max daily total units: " + maxDailyTotalUnits);
log.debug("Reservoir remaining units: " + reservoirRemainingUnits); log.debug("Reservoir remaining units: " + reservoirRemainingUnits);
log.debug("Bolus blocked: " + bolusBlocked); log.debug("Bolus blocked: " + bolusBlocked);
log.debug("Current basal: " + currentBasal); log.debug("Current basal: " + currentBasal);