Closed MikePlante1 closed 6 months ago
Great job.
What do you think about maybe adding a small hint in pump settings (where max bolus is set) that explains the magic number that is 3 x max bolus = max external insulin entry
?
@Sjoerd-Bo3 is currently working on adding the external insulin dialog that is found in iAPS 3.x (so not sure if it should be added now or later or not at all).
What do you think about maybe adding a small hint in pump settings (where max bolus is set) that explains the magic number that is
3 x max bolus = max external insulin entry
?
Since popups haven't been implemented in Pump Settings, how about this instead?
Just the "i" in the suggested insulin could perhaps indicate the maxBolus constraint. Here, 7,76 * 0,7 % = 5.432
What do you think about maybe adding a small hint in pump settings (where max bolus is set) that explains the magic number that is
3 x max bolus = max external insulin entry
?Since popups haven't been implemented in Pump Settings, how about this instead?
Perhaps to display a read-only text field with "Max delivery insulin" in pump settings with the calculation of *3 ?
Perhaps create a variable in maxDeliveryBolus in pumpSettings object directly defined as 3 of maxBolus avoided to have the magic variable everywhere... like this in pumpsettings struct (not tested) : `extension PumpSettings { var maxDeliveryBolus: Decimal? { return 3.0 self.maxBolus } } `
Perhaps to display a read-only text field with "Max delivery insulin" in pump settings with the calculation of *3 ?
Perhaps create a variable in maxDeliveryBolus in pumpSettings object directly defined as 3 of maxBolus avoided to have the magic variable everywhere... like this in pumpsettings struct (not tested) : `extension PumpSettings { var maxDeliveryBolus: Decimal? { return 3.0 self.maxBolus } } `
It seems out of place to put external bolus settings into pump settings
. What about Preferences > OPENAPS OTHER SETTINGS
?
Accidentally closed this PR, so I reopened it in #100
In the bolus module, if bolus amount is set over the
Max Bolus
set inPump Settings
, disable theEnact bolus
button, change it's text toMax Bolus exceeded!
, and change alert dialog for external insulin.If bolus amount is set over 3x Max Bolus, disable the external insulin button as well.
Max Bolus is set to 10U for this test:
Cherry-picked from https://github.com/Artificial-Pancreas/iAPS/commit/581e3e2838f7ee461df8f86c17db06450d49850e and https://github.com/Artificial-Pancreas/iAPS/commit/7c7cafecf2c10b377d329559b851e417c02ebe96 but had to refactor the alert to get it to build