From 28c329dc01c0d855fd262afcf320fd3e018d0cfc Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 8 Jan 2017 00:19:48 +0100 Subject: [PATCH] log script params separately --- .../OpenAPSAMA/DetermineBasalAdapterAMAJS.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalAdapterAMAJS.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalAdapterAMAJS.java index 7fe60653b4..f10eb6f617 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalAdapterAMAJS.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalAdapterAMAJS.java @@ -116,15 +116,14 @@ public class DetermineBasalAdapterAMAJS { public DetermineBasalResultAMA invoke() { - mV8rt.executeVoidScript( - "console.error(\"determine_basal(\"+\n" + - "JSON.stringify(" + PARAM_glucoseStatus + ")+ \", \" +\n" + - "JSON.stringify(" + PARAM_currentTemp + ")+ \", \" +\n" + - "JSON.stringify(" + PARAM_iobData + ")+ \", \" +\n" + - "JSON.stringify(" + PARAM_profile + ")+ \", \" +\n" + - "JSON.stringify(" + PARAM_autosens_data + ")+ \", \" +\n" + - "JSON.stringify(" + PARAM_meal_data + ")+ \") \");" - ); + log.debug(">>> Invoking detemine_basal <<<"); + log.debug("Glucose status: " + mV8rt.executeStringScript("JSON.stringify(" + PARAM_glucoseStatus + ");")); + log.debug("IOB data: " + mV8rt.executeStringScript("JSON.stringify(" + PARAM_iobData + ");")); + log.debug("Current temp: " + mV8rt.executeStringScript("JSON.stringify(" + PARAM_currentTemp + ");")); + log.debug("Profile: " + mV8rt.executeStringScript("JSON.stringify(" + PARAM_profile + ");")); + log.debug("Meal data: " + mV8rt.executeStringScript("JSON.stringify(" + PARAM_meal_data + ");")); + log.debug("Autosens data: " + mV8rt.executeStringScript("JSON.stringify(" + PARAM_autosens_data + ");")); + mV8rt.executeVoidScript( "var rT = determine_basal(" + PARAM_glucoseStatus + ", " +