Add wait in loop to check for update from pump.

(cherry picked from commit fe8d09e)
This commit is contained in:
Johannes Mockenhaupt 2017-08-28 12:22:49 +02:00
parent 11332391b8
commit a53564fcae
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -150,6 +150,7 @@ public class SetTbrCommand extends BaseCommand {
|| (!increasingPercentage && displayedPercentage > percentage))) { || (!increasingPercentage && displayedPercentage > percentage))) {
log.debug("Waiting for pump to process scrolling input for percentage, current: " log.debug("Waiting for pump to process scrolling input for percentage, current: "
+ displayedPercentage + ", desired: " + percentage + ", scrolling up: " + increasingPercentage); + displayedPercentage + ", desired: " + percentage + ", scrolling up: " + increasingPercentage);
SystemClock.sleep(50);
displayedPercentage = scripter.readBlinkingValue(Double.class, MenuAttribute.BASAL_RATE).longValue(); displayedPercentage = scripter.readBlinkingValue(Double.class, MenuAttribute.BASAL_RATE).longValue();
} }
log.debug("Final displayed TBR percentage: " + displayedPercentage); log.debug("Final displayed TBR percentage: " + displayedPercentage);
@ -212,6 +213,7 @@ public class SetTbrCommand extends BaseCommand {
|| (!increasingPercentage && displayedDuration > duration))) { || (!increasingPercentage && displayedDuration > duration))) {
log.debug("Waiting for pump to process scrolling input for duration, current: " log.debug("Waiting for pump to process scrolling input for duration, current: "
+ displayedDuration + ", desired: " + duration + ", scrolling up: " + increasingPercentage); + displayedDuration + ", desired: " + duration + ", scrolling up: " + increasingPercentage);
SystemClock.sleep(50);
displayedDuration = scripter.readDisplayedDuration(); displayedDuration = scripter.readDisplayedDuration();
} }