Problem
Commit 9f9f988 (introduced in version 3.4.1.0) appears to have unintentionally changed the progress bar behavior for Omnipod Dash bolus delivery. The Omnipod delivers insulin in increments of 0.05U, but the progress bar now displays values such as 0.02U, 0.04U, 0.07U which are not physically deliverable by the pod.
Expected behavior
Displayed delivered insulin should always align with pod pulse steps (multiples of 0.05U).
Root cause
The commit replaced a direct UI method call with an RxBus event (likely to decouple the pump plugin from the UI). During this change:
- The percent-based constructor was used
- The rounding logic (
Round.roundTo(..., 0.05)) was dropped
This results in displaying unrounded fractional values.
Proposed fix
Current:
OmnipodDashPumpPlugin.kt, line 703 and line 731.
rxBus.send(EventOverviewBolusProgress(rh, percent = percent.toInt()));
Proposed:
rxBus.send(EventOverviewBolusProgress(
rh,
delivered = Round.roundTo(
percent * requestedBolusAmount / 100,
PodConstants.POD_PULSE_BOLUS_UNITS
)
));
@Philoul --- since this change originated from your commit, can you confirm whether this change of behavior was unintended? If so, I can open a PR with the fix above.
Problem
Commit 9f9f988 (introduced in version 3.4.1.0) appears to have unintentionally changed the progress bar behavior for Omnipod Dash bolus delivery. The Omnipod delivers insulin in increments of 0.05U, but the progress bar now displays values such as 0.02U, 0.04U, 0.07U which are not physically deliverable by the pod.
Expected behavior
Displayed delivered insulin should always align with pod pulse steps (multiples of 0.05U).
Root cause
The commit replaced a direct UI method call with an RxBus event (likely to decouple the pump plugin from the UI). During this change:
Round.roundTo(..., 0.05)) was droppedThis results in displaying unrounded fractional values.
Proposed fix
Current:
OmnipodDashPumpPlugin.kt, line 703 and line 731.Proposed:
@Philoul --- since this change originated from your commit, can you confirm whether this change of behavior was unintended? If so, I can open a PR with the fix above.