From 9a4e457d2ba42177634b5572ea7801dd659839ef Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 13 Oct 2017 11:54:50 +0200 Subject: [PATCH] fix RS events parsing --- .../PumpDanaRS/comm/DanaRS_Packet_APS_History_Events.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_History_Events.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_History_Events.java index e9945d2ceb..fe010eb72f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_History_Events.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_History_Events.java @@ -82,8 +82,8 @@ public class DanaRS_Packet_APS_History_Events extends DanaRS_Packet { } Date datetime = dateTimeSecFromBuff(data, 1); // 6 bytes - int param1 = ((intFromBuff(data, 7, 1) << 8) & 0xFF) + (intFromBuff(data, 8, 1) & 0xFF); - int param2 = ((intFromBuff(data, 9, 1) << 8) & 0xFF) + (intFromBuff(data, 10, 1) & 0xFF); + int param1 = ((intFromBuff(data, 7, 1) << 8) & 0xFF00) + (intFromBuff(data, 8, 1) & 0xFF); + int param2 = ((intFromBuff(data, 9, 1) << 8) & 0xFF00) + (intFromBuff(data, 10, 1) & 0xFF); TemporaryBasal temporaryBasal = new TemporaryBasal(); temporaryBasal.date = datetime.getTime();