wear multiple watch situation and disable fillbolus for wider testing
This commit is contained in:
parent
eb96cf6713
commit
aff82642af
|
@ -75,6 +75,17 @@ public class ActionStringHandler {
|
||||||
|
|
||||||
rAction += "fill " + insulinAfterConstraints;
|
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])) {
|
} else if ("status".equals(act[0])) {
|
||||||
///////////////////////////////////// STATUS
|
///////////////////////////////////// STATUS
|
||||||
rTitle = "STATUS";
|
rTitle = "STATUS";
|
||||||
|
@ -130,7 +141,7 @@ public class ActionStringHandler {
|
||||||
// do the parsing, check constraints and enact!
|
// do the parsing, check constraints and enact!
|
||||||
String[] act = actionString.split("\\s+");
|
String[] act = actionString.split("\\s+");
|
||||||
|
|
||||||
if ("fill".equals(act[0])){
|
if (false && "fill".equals(act[0])){
|
||||||
Double amount = SafeParse.stringToDouble(act[1]);
|
Double amount = SafeParse.stringToDouble(act[1]);
|
||||||
Double insulinAfterConstraints = MainApp.getConfigBuilder().applyBolusConstraints(amount);
|
Double insulinAfterConstraints = MainApp.getConfigBuilder().applyBolusConstraints(amount);
|
||||||
if(amount - insulinAfterConstraints != 0){
|
if(amount - insulinAfterConstraints != 0){
|
||||||
|
|
|
@ -290,6 +290,8 @@ public class ListenerService extends WearableListenerService implements GoogleAp
|
||||||
NotificationManagerCompat.from(this);
|
NotificationManagerCompat.from(this);
|
||||||
|
|
||||||
notificationManager.notify(BOLUS_PROGRESS_NOTIF_ID, notificationBuilder.build());
|
notificationManager.notify(BOLUS_PROGRESS_NOTIF_ID, notificationBuilder.build());
|
||||||
|
notificationManager.cancel(CONFIRM_NOTIF_ID); // multiple watch setup
|
||||||
|
|
||||||
|
|
||||||
if (progresspercent == 100){
|
if (progresspercent == 100){
|
||||||
scheduleDismiss(BOLUS_PROGRESS_NOTIF_ID, 5);
|
scheduleDismiss(BOLUS_PROGRESS_NOTIF_ID, 5);
|
||||||
|
|
Loading…
Reference in a new issue