RuffyScripter: fix reading basal rate when no TBR is active
This commit is contained in:
parent
344984e201
commit
1aee181f62
1 changed files with 2 additions and 0 deletions
|
@ -557,6 +557,8 @@ public class RuffyScripter implements RuffyCommands {
|
||||||
state.tbrPercent = displayedTbr.intValue();
|
state.tbrPercent = displayedTbr.intValue();
|
||||||
MenuTime durationMenuTime = ((MenuTime) menu.getAttribute(MenuAttribute.RUNTIME));
|
MenuTime durationMenuTime = ((MenuTime) menu.getAttribute(MenuAttribute.RUNTIME));
|
||||||
state.tbrRemainingDuration = durationMenuTime.getHour() * 60 + durationMenuTime.getMinute();
|
state.tbrRemainingDuration = durationMenuTime.getHour() * 60 + durationMenuTime.getMinute();
|
||||||
|
}
|
||||||
|
if (menu.attributes().contains(MenuAttribute.BASAL_RATE)) {
|
||||||
state.basalRate = ((double) menu.getAttribute(MenuAttribute.BASAL_RATE));
|
state.basalRate = ((double) menu.getAttribute(MenuAttribute.BASAL_RATE));
|
||||||
}
|
}
|
||||||
if (menu.attributes().contains(MenuAttribute.BATTERY_STATE)) {
|
if (menu.attributes().contains(MenuAttribute.BATTERY_STATE)) {
|
||||||
|
|
Loading…
Reference in a new issue