Commit graph

10 commits

Author SHA1 Message Date
Carlos Rafael Giani 03a32f09cf comboctl-main: Catch getParsedDisplayFrame() exceptions and rethrow later
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-20 18:59:08 +01:00
Carlos Rafael Giani 8d6171db49 comboctl-parser: Support main screens with ext/multiwave and TBR symbols
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-20 18:58:51 +01:00
Carlos Rafael Giani e9294c59a0 comboctl-parser: Parse remaining duration in TBR percentage screen
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-20 18:58:47 +01:00
Carlos Rafael Giani d50feec302 comboctl-main: Correctly handle alerts after bolus was delivered
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>
2022-11-19 13:56:01 +01:00
Carlos Rafael Giani 20d4a0c692 comboctl-main: Fix computeShortRTButtonPress() cyclic quantity bug
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-19 11:22:10 +01:00
Carlos Rafael Giani ced93e4a53 comboctl-main: Check if RT quantity adjustment hits an unexpected limit
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>
2022-11-10 19:21:02 +01:00
Carlos Rafael Giani c3c894cccb comboctl-main: Rework longPressRTButtonUntil() implementation
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>
2022-11-10 19:21:02 +01:00
Carlos Rafael Giani 01560f45be comboctl-main: Fix missing entry #1 in TDD history
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-06 00:13:43 +01:00
Carlos Rafael Giani 9aff10537e comboctl-main: Directly push MENU button to switch to TBR duration screen
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>
2022-11-06 00:13:43 +01:00
Carlos Rafael Giani 643f26b7bf Import ComboCtl
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-06 00:13:43 +01:00