RuffyScripter: fix reading basal rate when no TBR is active

This commit is contained in:
Johannes Mockenhaupt 2018-01-31 12:54:25 +01:00
parent 344984e201
commit 1aee181f62
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -557,6 +557,8 @@ public class RuffyScripter implements RuffyCommands {
state.tbrPercent = displayedTbr.intValue();
MenuTime durationMenuTime = ((MenuTime) menu.getAttribute(MenuAttribute.RUNTIME));
state.tbrRemainingDuration = durationMenuTime.getHour() * 60 + durationMenuTime.getMinute();
}
if (menu.attributes().contains(MenuAttribute.BASAL_RATE)) {
state.basalRate = ((double) menu.getAttribute(MenuAttribute.BASAL_RATE));
}
if (menu.attributes().contains(MenuAttribute.BATTERY_STATE)) {