Commit graph

347 commits

Author SHA1 Message Date
Johannes Mockenhaupt 5ecc0ea430
Fix crash in Combo fragment when accessing resoures. 2017-12-30 19:53:22 +01:00
Johannes Mockenhaupt f658da42a7
Abort bolusing when reading initial state fails.
Otherwise request time is zero and and any old bolus will be regarded
as the last bolus delivered when recovery kicks in.
Also add a safety check to not count a bolus bigger than the
requested bolus as a partially delivered bolus.
2017-12-30 15:51:26 +01:00
Johannes Mockenhaupt f970e5e20e
Minor cleanups. 2017-12-27 21:16:03 +01:00
Johannes Mockenhaupt ee1236c4e4
ComboPlugin: assume valid BR unless proven otherwise.
(cherry picked from commit bc93a4b)
2017-12-27 13:04:35 +01:00
Johannes Mockenhaupt 3333d7a6b7
Clean up all the basal rate sanity checks.
* Disable loop entirely if no valid basal rate is set on the pump.
  Neither closed nor open loop mode makes sense without it.
* Check active BR before updating the pump profile
* Show 'loop disabled' state in Combo fragement.
* Cancel active TBR when basal profile switch to profile != 1
  is detected or when an unsupported bolus is active.
2017-12-27 12:49:04 +01:00
Johannes Mockenhaupt 88b3857fb9
Clean up pump init. 2017-12-27 12:28:01 +01:00
Johannes Mockenhaupt 6af28479d6
Disable loop if unsupported basal rate profile is selected. Fixes #31. 2017-12-27 12:28:01 +01:00
Johannes Mockenhaupt c84ba24c77
Provide message when setting basal profile fails. Fixes #29. 2017-12-27 01:33:54 +01:00
Johannes Mockenhaupt 715ffa28d2
Remove empty Combo prefs. 2017-12-27 01:33:42 +01:00
Johannes Mockenhaupt 3266cb4944
Don't show ComboPlugin as constraints plugin. 2017-12-27 01:33:38 +01:00
Johannes Mockenhaupt d081345da2
Define lowest non-zero basal rate as minimum basal rate for the Combo. 2017-12-25 11:05:51 +01:00
Johannes Mockenhaupt 7073688920
Update ComboPlugin to match updated PumpInterface. 2017-12-22 10:46:54 +01:00
Johannes Mockenhaupt 42418d4146
ComboFragment: make warning/error bold for a better readability.
On lower DPI devices they're already bold, but on higher DPI devices
the yellow "Low" is hardly discernible from white.

(cherry picked from commit 693ba73)
2017-12-21 22:45:27 +01:00
Johannes Mockenhaupt 7c04f528cc
Revert "Handle edge case of setting basal rate in range 0.00 - 0.05."
This reverts commit 2054e76cde.
2017-12-20 18:06:50 +01:00
Johannes Mockenhaupt 2054e76cde
Handle edge case of setting basal rate in range 0.00 - 0.05. 2017-12-20 16:40:45 +01:00
Johannes Mockenhaupt 40edb9ff5c
Don't update pump basal profile during startup.
* Avoids issues of no profile being set yet
* Making startup take minutes
* KeepAlive will update profile as needed every 5m.
2017-12-20 13:01:24 +01:00
Johannes Mockenhaupt 181338e9e2
Another NPE check for failure scenarios. 2017-12-20 00:04:14 +01:00
Johannes Mockenhaupt 715366b2b4
Don't consider pump initialized if updating basal profile on start failed. 2017-12-19 22:24:46 +01:00
Johannes Mockenhaupt 28961da253
Declare profile switches being supported by the Combo. 2017-12-19 00:00:00 +01:00
Johannes Mockenhaupt 34f3428d99
ComboPlugin.setTempBasal: clean up, fix potential bug.
(cherry picked from commit 41c45a1)
2017-12-17 15:39:38 +01:00
Johannes Mockenhaupt fd71ab6b68
Update fake reservoir numbers to trigger default NS warnings.
(cherry picked from commit 6e5f9fc)
2017-12-16 12:09:44 +01:00
Johannes Mockenhaupt 92d0630c55
Fix partial bolus displayed in error popup. 2017-12-15 23:05:09 +01:00
Johannes Mockenhaupt a6a87d0790
Minor fixes and polish around bolus cancellation. 2017-12-15 10:41:07 +01:00
Johannes Mockenhaupt b6bc957813
Minor tewaks and cleanups. 2017-12-13 21:37:44 +01:00
Johannes Mockenhaupt 618e00d71d
Update bolus progress dialog when recovery kicks in. 2017-12-13 21:22:13 +01:00
Johannes Mockenhaupt 67eb6b20ed
Handle errors when reading the history for verification fails. 2017-12-13 20:42:43 +01:00
Johannes Mockenhaupt 25f46fe601
Cleanup. 2017-12-13 20:42:43 +01:00
Johannes Mockenhaupt 7eb40653b2
The pump doesn't accept connections while a bolus delivery is in progress.
Remove the code which checked for a bolus delivery in progress
and waited.
2017-12-13 20:42:43 +01:00
Johannes Mockenhaupt a169245dc3
On bolusing failure, attempt verify by reading last bolus from history. 2017-12-13 20:39:08 +01:00
Johannes Mockenhaupt 71355f0421
Typo that typo and other minor cleanups. 2017-12-13 16:29:53 +01:00
Johannes Mockenhaupt f83dd1cb67
Unbreak RuffyCommandsV1Impl.readHistory, cleanups. 2017-12-12 00:57:04 +01:00
Johannes Mockenhaupt a5ea94de7d
Fix #12: properly update TBR from pump on mismatch. 2017-12-10 14:11:07 +01:00
Johannes Mockenhaupt ca9fe3e755
Fixes around bolus cancellation. 2017-12-10 01:39:58 +01:00
Johannes Mockenhaupt fe281b9224
Minor cleanups. 2017-12-09 22:40:51 +01:00
Johannes Mockenhaupt 26fa63d571
ComboFragment: always show refresh button.
To allow force starting a conecting attempt if the pump is still
in disconnected state.
2017-12-09 22:08:38 +01:00
Johannes Mockenhaupt 3316ab2081
ComboFragment: use queue to refresh state, explicit disconnects for tdd/alert.s 2017-12-09 19:46:28 +01:00
Johannes Mockenhaupt 8699d9a384
Add missing listener registration. 2017-12-09 19:46:28 +01:00
Johannes Mockenhaupt 27e9cfda6f
Overhaul Combo tab buttons and dialogs. 2017-12-09 19:46:28 +01:00
Johannes Mockenhaupt 063a5ba6b9
Only read Tdd and Alerts through buttons on Combo tab, not treatment history. 2017-12-09 19:45:58 +01:00
Johannes Mockenhaupt a7f07b26f9
Pump time warning: urgency level based on how much the time is off. 2017-12-09 19:43:53 +01:00
AdrianLxM 4d356096cf
Check pump time not last connection time 2017-12-09 19:43:53 +01:00
Johannes Mockenhaupt d2f2266a2b
Re-add warning if pump time is off (needed for basal rates). 2017-12-09 19:43:53 +01:00
Johannes Mockenhaupt cf142a4538
Merge pull request #4 from jotomo/verify-record-date-after-bolus-cancel
Verify and return delivered bolus amount in BolusCommand
2017-12-09 19:41:16 +01:00
Johannes Mockenhaupt b409b737e5
On connect, take over TBR CANCELLED warning and raise message. Fixes #9. 2017-12-09 17:33:11 +01:00
Johannes Mockenhaupt f09464e5d6
Move detection of partial bolus delivery to BolusCommand.
Have BolusCommand verify delivered bolus if needed and return the
actually delivered bolus amount. This makes more sense now,
given history is only read if unavoidable.
2017-12-08 12:56:15 +01:00
Johannes Mockenhaupt 60d6f305b5
Debug code. 2017-12-06 19:31:51 +01:00
Johannes Mockenhaupt de06c54f1d
Minor cleanups in ComboPlugin. 2017-12-06 17:14:30 +01:00
Johannes Mockenhaupt 86b63cb27d
Combo tab: show command queue if non-empty. 2017-12-06 17:14:30 +01:00
Johannes Mockenhaupt 5caec45760
Fix add bolus record from pump history when bolus was cancelled. 2017-12-05 23:41:22 +01:00
Johannes Mockenhaupt 960cb92789
Remove idle-disconnect-monitor and let the command queue take care of that. 2017-12-05 23:17:05 +01:00