From b5c77522abaf727c7f2937d5967838235143e01e Mon Sep 17 00:00:00 2001 From: Philoul Date: Sat, 17 Oct 2020 22:26:03 +0200 Subject: [PATCH] Patch of xDripPlugin and Eversens plugin to disable Sensor battery level in Action tab - xDrip disabled because of an issue in xDrip today (Phone battery level sent and not Sensor battery level) - Eversens disabled because I'm not sure of data sent (String, Int ?) to avoid error or crash --- .../nightscout/androidaps/plugins/source/EversensePlugin.kt | 2 +- .../info/nightscout/androidaps/plugins/source/XdripPlugin.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/EversensePlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/EversensePlugin.kt index 43a3cb0669..ff28aa3f2a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/EversensePlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/EversensePlugin.kt @@ -57,7 +57,7 @@ class EversensePlugin @Inject constructor( if (bundle.containsKey("glucoseTimestamp")) aapsLogger.debug(LTag.BGSOURCE, "glucoseTimestamp: " + dateUtil.dateAndTimeString(bundle.getLong("glucoseTimestamp"))) if (bundle.containsKey("batteryLevel")) { aapsLogger.debug(LTag.BGSOURCE, "batteryLevel: " + bundle.getString("batteryLevel")) - sensorBatteryLevel = bundle.getString("batteryLevel").toInt() // TODO: Philoul: Line to check I don't have eversens so I don't know what kind of information is sent... + //sensorBatteryLevel = bundle.getString("batteryLevel").toInt() // TODO: Philoul: Line to check I don't have eversens so I don't know what kind of information is sent... } if (bundle.containsKey("signalStrength")) aapsLogger.debug(LTag.BGSOURCE, "signalStrength: " + bundle.getString("signalStrength")) if (bundle.containsKey("transmitterVersionNumber")) aapsLogger.debug(LTag.BGSOURCE, "transmitterVersionNumber: " + bundle.getString("transmitterVersionNumber")) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/XdripPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/XdripPlugin.kt index bb5ef91db0..bc27489da6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/XdripPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/XdripPlugin.kt @@ -46,7 +46,7 @@ class XdripPlugin @Inject constructor( bgReading.direction = bundle.getString(Intents.EXTRA_BG_SLOPE_NAME) bgReading.date = bundle.getLong(Intents.EXTRA_TIMESTAMP) bgReading.raw = bundle.getDouble(Intents.EXTRA_RAW) - if (bundle.containsKey(Intents.EXTRA_SENSOR_BATTERY)) sensorBatteryLevel = bundle.getInt(Intents.EXTRA_SENSOR_BATTERY) + //if (bundle.containsKey(Intents.EXTRA_SENSOR_BATTERY)) sensorBatteryLevel = bundle.getInt(Intents.EXTRA_SENSOR_BATTERY) val source = bundle.getString(Intents.XDRIP_DATA_SOURCE_DESCRIPTION, "no Source specified") setSource(source) MainApp.getDbHelper().createIfNotExists(bgReading, "XDRIP")