Commit graph

169 commits

Author SHA1 Message Date
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 cc26eb8ed8 combov2: Also limit TBR percentage when AAPS sets absolute TBR
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-19 23:47:49 +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 3f265c855c combov2: Fix last bolus field in combov2 UI fragment
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-11 18:05:31 +01:00
Carlos Rafael Giani 03d226e725 combov2: Show dedicated message when hitting unexpected TBR % limit
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-10 23:41:45 +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 c535e96ec7 combov2: Reset states associated with pump when unpairing
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-06 16:30:34 +01:00
Carlos Rafael Giani cdfb197c54 combov2: Minor cleanup to reduce some code smell
* 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>
2022-11-06 16:30:06 +01:00
Carlos Rafael Giani 8fda1ab0b8 combov2: More adjustments to pairing activity text
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-06 14:40:08 +01:00
Carlos Rafael Giani c996c39b54 combov2: Add note about pairing confirmation to pairing activity text
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-06 13:50:08 +01:00
Carlos Rafael Giani c447df3599 combov2: Restrict contents of "status" label in JSON pump status
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-06 13:48: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 4201fe08a5 combov2: Improve shortStatus output
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-06 00:13:43 +01:00
Carlos Rafael Giani 7d9925db47 Begin implementation of new combo plugin, called "combov2"
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