In particular, if a bolus brings the reservoir level below the low
threshold, a W1 warning shows up on the pump itself during bolus delivery.
Once delivery is done, the W1 shows up in the RT mode as well. Bolus
delivery is special in that the deliverBolus() function has to manually
switch back to RT mode to get the reservoir level post-bolus to update
the reservoirLevel value. When that is done, the aforementioned alert
screen can show up. Add code to handle alert screen handling to that
special post-bolus check.
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
This is important for example if the Combo is not properly configured
and the user tries to set a TBR percentage beyond the configured limit.
The RT UI will then clamp the percentage to that limit, and the quantity
won't increase anymore. Without this new check, this causes the code
to be stuck in an endless loop.
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
The new implementation overshoots less often, runs generally faster,
and correctly forwards exceptions thrown by the checkScreen callback.
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
* Kotlin code convention specifies that ignored exceptions must be named
"_", not "ignored."
* Add explanation about empty overridden method implementations.
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
There's no reason to use the full navigation function to switch from the
TBR percentage to the TBR duration screen, since these are next to each
other, and switching over is done by pressing MENU once.
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>