fix basal rates decoding
This commit is contained in:
parent
2dea4615c0
commit
1db9ce287c
|
@ -25,7 +25,7 @@ public class MsgSettingBasal extends MessageBase {
|
|||
for (int index = 0; index < 24; index++) {
|
||||
int basal = intFromBuff(bytes, 2 * index, 2);
|
||||
if (basal < 10) basal = 0;
|
||||
pump.pumpProfiles[pump.activeProfile][index] = basal / 100 / 24d; // in units/day
|
||||
pump.pumpProfiles[pump.activeProfile][index] = basal / 100;
|
||||
}
|
||||
|
||||
if (Config.logDanaMessageDetail)
|
||||
|
|
|
@ -16,7 +16,7 @@ public class MsgStatusBasic extends MessageBase {
|
|||
}
|
||||
|
||||
public void handleMessage(byte[] bytes) {
|
||||
double currentBasal = intFromBuff(bytes, 0, 2) / 100 / 24d; // in units/day
|
||||
double currentBasal = intFromBuff(bytes, 0, 2) / 100;
|
||||
int batteryRemaining = intFromBuff(bytes, 2, 1);
|
||||
double reservoirRemainingUnits = intFromBuff(bytes, 3, 3) / 750d;
|
||||
double dailyTotalUnits = intFromBuff(bytes, 6, 3) / 750d;
|
||||
|
|
Loading…
Reference in a new issue