ecarb ignore 0 carbs

This commit is contained in:
AdrianLxM 2018-05-03 21:58:21 +02:00
parent fb75346bcd
commit 8d6997f519

View file

@ -347,6 +347,10 @@ public class ActionStringHandler {
if ( (carbsAfterConstraints - carbs != 0)) { if ( (carbsAfterConstraints - carbs != 0)) {
rMessage += "\n" + MainApp.gs(R.string.constraintapllied); rMessage += "\n" + MainApp.gs(R.string.constraintapllied);
} }
if(carbsAfterConstraints <= 0){
sendError("Carbs = 0! No action taken!");
return;
}
rAction += "ecarbs " + carbsAfterConstraints + " " + starttimestamp + " " + duration; rAction += "ecarbs " + carbsAfterConstraints + " " + starttimestamp + " " + duration;
} else return; } else return;