wear multiple watch situation and disable fillbolus for wider testing

This commit is contained in:
AdrianLxM 2017-02-09 23:39:23 +01:00
parent eb96cf6713
commit aff82642af
2 changed files with 14 additions and 1 deletions

View file

@ -75,6 +75,17 @@ public class ActionStringHandler {
rAction += "fill " + insulinAfterConstraints;
} else if ("fill".equals(act[0])) {
///////////////////////////////////// PRIME/FILL
double amount = SafeParse.stringToDouble(act[1]);
Double insulinAfterConstraints = MainApp.getConfigBuilder().applyBolusConstraints(amount);
rMessage += MainApp.instance().getString(R.string.primefill) + ": " + insulinAfterConstraints + "U";
if (insulinAfterConstraints - amount != 0)
rMessage += "\n" + MainApp.instance().getString(R.string.constraintapllied);
rAction += "fill " + insulinAfterConstraints;
} else if ("status".equals(act[0])) {
///////////////////////////////////// STATUS
rTitle = "STATUS";
@ -130,7 +141,7 @@ public class ActionStringHandler {
// do the parsing, check constraints and enact!
String[] act = actionString.split("\\s+");
if ("fill".equals(act[0])){
if (false && "fill".equals(act[0])){
Double amount = SafeParse.stringToDouble(act[1]);
Double insulinAfterConstraints = MainApp.getConfigBuilder().applyBolusConstraints(amount);
if(amount - insulinAfterConstraints != 0){

View file

@ -290,6 +290,8 @@ public class ListenerService extends WearableListenerService implements GoogleAp
NotificationManagerCompat.from(this);
notificationManager.notify(BOLUS_PROGRESS_NOTIF_ID, notificationBuilder.build());
notificationManager.cancel(CONFIRM_NOTIF_ID); // multiple watch setup
if (progresspercent == 100){
scheduleDismiss(BOLUS_PROGRESS_NOTIF_ID, 5);