SMS Plugin correct response for % TBR
This commit is contained in:
parent
6ea49f17bc
commit
1eea170ead
2 changed files with 6 additions and 1 deletions
|
@ -378,7 +378,11 @@ public class SmsCommunicatorPlugin extends PluginBase {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (result.success) {
|
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);
|
reply += "\n" + ConfigBuilderPlugin.getPlugin().getActivePump().shortStatus(true);
|
||||||
sendSMSToAllNumbers(new Sms(receivedSms.phoneNumber, reply));
|
sendSMSToAllNumbers(new Sms(receivedSms.phoneNumber, reply));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -371,6 +371,7 @@
|
||||||
<string name="smscommunicator_basalreplywithcode">To start basal %1$.2fU/h reply with code %2$s</string>
|
<string name="smscommunicator_basalreplywithcode">To start basal %1$.2fU/h reply with code %2$s</string>
|
||||||
<string name="smscommunicator_suspendreplywithcode">To suspend loop for %1$d minutes reply with code %2$s</string>
|
<string name="smscommunicator_suspendreplywithcode">To suspend loop for %1$d minutes reply with code %2$s</string>
|
||||||
<string name="smscommunicator_tempbasalset">Temp basal %1$.2fU/h for %2$d min started successfully</string>
|
<string name="smscommunicator_tempbasalset">Temp basal %1$.2fU/h for %2$d min started successfully</string>
|
||||||
|
<string name="smscommunicator_tempbasalset_percent">Temp basal %1$d %% for %2$d min started successfully</string>
|
||||||
<string name="smscommunicator_tempbasalfailed">Temp basal start failed</string>
|
<string name="smscommunicator_tempbasalfailed">Temp basal start failed</string>
|
||||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">To stop temp basal reply with code %s</string>
|
<string name="smscommunicator_basalstopreplywithcode" formatted="false">To stop temp basal reply with code %s</string>
|
||||||
<string name="smscommunicator_tempbasalcanceled">Temp basal canceled</string>
|
<string name="smscommunicator_tempbasalcanceled">Temp basal canceled</string>
|
||||||
|
|
Loading…
Reference in a new issue