From d77fa9b0cf540c19c9763c7e7e4f66404e3b8fa5 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 16 Oct 2017 21:48:08 +0200 Subject: [PATCH 1/5] Revert "NDK filters to work around j2v8 vs. libBleCommandUtil issue." This reverts commit 7c0478700496f4deb0ee28f6b12ab10b049f8f74. --- app/build.gradle | 1 - gradle.properties | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 30158bf591..c9df240616 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -50,7 +50,6 @@ android { buildConfigField "String", "BUILDVERSION", generateGitBuild() ndk { - abiFilters "armeabi-v7a", "x86", "armeabi", "mips" moduleName "BleCommandUtil" } } diff --git a/gradle.properties b/gradle.properties index c8d0d56109..1d3591c8a4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,6 +15,4 @@ # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -android.useDeprecatedNdk=true \ No newline at end of file +# org.gradle.parallel=true \ No newline at end of file From f7a46d386e60335d8e04db433d7c40cc773a44d5 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 16 Oct 2017 21:52:06 +0200 Subject: [PATCH 2/5] Remove j2v8. --- app/build.gradle | 1 - .../androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java | 2 -- 2 files changed, 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c9df240616..0294d49f9c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -151,7 +151,6 @@ dependencies { } compile 'org.slf4j:slf4j-api:1.7.12' compile 'com.jjoe64:graphview:4.0.1' - compile 'com.eclipsesource.j2v8:j2v8:3.1.6@aar' compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.1.1' compile 'com.google.android.gms:play-services-wearable:7.5.0' compile 'junit:junit:4.12' diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java index 774ff55401..e4c23ae043 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java @@ -1,7 +1,5 @@ package info.nightscout.androidaps.plugins.OpenAPSAMA; -import com.eclipsesource.v8.V8Object; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; From 4767809931a746c08b3417595dca53f32d5affba Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 25 Oct 2017 17:49:23 +0200 Subject: [PATCH 3/5] Start KeepAliveService after pump init. --- app/src/main/java/info/nightscout/androidaps/MainApp.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java index 209adfe1c4..d3c68dbb25 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.java +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java @@ -167,9 +167,6 @@ public class MainApp extends Application { else Answers.getInstance().logCustom(new CustomEvent("AppStart")); - - startKeepAliveService(); - Thread t = new Thread(new Runnable() { @Override public void run() { @@ -177,8 +174,9 @@ public class MainApp extends Application { PumpInterface pump = MainApp.getConfigBuilder(); if (pump != null) pump.refreshDataFromPump("Initialization"); + startKeepAliveService(); } - }); + }, "pump-initialization"); t.start(); } From 707d2df345064533699b019832c0c371cd2f006a Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Wed, 25 Oct 2017 20:10:59 +0200 Subject: [PATCH 4/5] No explicit service start --- app/src/main/java/info/nightscout/androidaps/MainApp.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java index d3c68dbb25..4e2afd65d1 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.java +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java @@ -209,12 +209,6 @@ public class MainApp extends Application { private void startKeepAliveService() { if (keepAliveReceiver == null) { keepAliveReceiver = new KeepAliveReceiver(); - if (Config.DANAR) { - startService(new Intent(this, DanaRExecutionService.class)); - startService(new Intent(this, DanaRKoreanExecutionService.class)); - startService(new Intent(this, DanaRv2ExecutionService.class)); - startService(new Intent(this, DanaRSService.class)); - } keepAliveReceiver.setAlarm(this); } } From 26b216a8eeb4b0b5744bf6c2d233e6c194d0f6e6 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 26 Oct 2017 20:40:24 +0200 Subject: [PATCH 5/5] 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 {