fix basal rates decoding

This commit is contained in:
Milos Kozak 2016-12-07 00:15:42 +01:00
parent 2dea4615c0
commit 1db9ce287c
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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;