From 26b216a8eeb4b0b5744bf6c2d233e6c194d0f6e6 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 26 Oct 2017 20:40:24 +0200 Subject: [PATCH] fix RS response code --- .../plugins/NSClientInternal/data/NSDeviceStatus.java | 2 +- .../comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.java | 2 +- .../PumpDanaRS/comm/DanaRS_Packet_APS_Set_Event_History.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSDeviceStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSDeviceStatus.java index 2a2e1b8044..2df50b2bd1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSDeviceStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSDeviceStatus.java @@ -254,7 +254,7 @@ public class NSDeviceStatus { long clockEnacted = 0L; JSONObject suggested = null; - JSONObject enacted = null; + public JSONObject enacted = null; } public void updateOpenApsData(JSONObject object) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.java index d46805c28f..06608b5a74 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.java @@ -51,7 +51,7 @@ public class DanaRS_Packet_APS_Basal_Set_Temporary_Basal extends DanaRS_Packet { @Override public void handleMessage(byte[] data) { int result = byteArrayToInt(getBytes(data, DATA_START, 1)); - if (result != 1) { + if (result != 0) { failed = true; log.error("Set APS temp basal start result: " + result + " FAILED!!!"); } else { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_Set_Event_History.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_Set_Event_History.java index d6b47e9579..4e559a77df 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_Set_Event_History.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/comm/DanaRS_Packet_APS_Set_Event_History.java @@ -61,7 +61,7 @@ public class DanaRS_Packet_APS_Set_Event_History extends DanaRS_Packet { @Override public void handleMessage(byte[] data) { int result = intFromBuff(data, 0, 1); - if (result != 1) { + if (result != 0) { failed = true; log.error("Set history entry result: " + result + " FAILED!!!"); } else {