From 1eea170ead1564d4ddfd70fc2e5ec598f02e03c7 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 8 Mar 2019 22:07:20 +0100 Subject: [PATCH] SMS Plugin correct response for % TBR --- .../general/smsCommunicator/SmsCommunicatorPlugin.java | 6 +++++- app/src/main/res/values/strings.xml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPlugin.java index c158ae6c57..c6453b25f1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPlugin.java @@ -378,7 +378,11 @@ public class SmsCommunicatorPlugin extends PluginBase { @Override public void run() { if (result.success) { - String reply = String.format(MainApp.gs(R.string.smscommunicator_tempbasalset), result.absolute, result.duration); + String reply; + if (result.isPercent) + reply = String.format(MainApp.gs(R.string.smscommunicator_tempbasalset_percent), result.percent, result.duration); + else + reply = String.format(MainApp.gs(R.string.smscommunicator_tempbasalset), result.absolute, result.duration); reply += "\n" + ConfigBuilderPlugin.getPlugin().getActivePump().shortStatus(true); sendSMSToAllNumbers(new Sms(receivedSms.phoneNumber, reply)); } else { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index be0e0e2c5d..b97adda5c7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -371,6 +371,7 @@ To start basal %1$.2fU/h reply with code %2$s To suspend loop for %1$d minutes reply with code %2$s Temp basal %1$.2fU/h for %2$d min started successfully + Temp basal %1$d %% for %2$d min started successfully Temp basal start failed To stop temp basal reply with code %s Temp basal canceled