Commit graph

370 commits

Author SHA1 Message Date
Johannes Mockenhaupt 302d3494d2
Covering 105% of all failure cases. 2018-01-28 19:53:44 +01:00
Johannes Mockenhaupt 3b7045227e
Only check reservoir level before bolus if data is available. 2018-01-28 19:04:46 +01:00
Johannes Mockenhaupt bd87a893c2
Best effort to handle multiple boluses within the same minute.
(cherry picked from commit cc9094f)
2018-01-28 18:59:07 +01:00
Johannes Mockenhaupt 3a95c3c4d9
More work for bolusing with pump history records.
(cherry picked from commit 4bc3e42)
2018-01-28 17:06:16 +01:00
Johannes Mockenhaupt 8c27b32d07
Let "Initializing" be a pump state, not an action. 2018-01-28 15:48:17 +01:00
Johannes Mockenhaupt cd385a3217
ComboFragment: deal with resevoir levels being available or not. 2018-01-28 15:43:50 +01:00
Johannes Mockenhaupt e3abe04545
Bring back last bolus to combo fragment.
(cherry picked from commit 108349e)
2018-01-28 15:30:36 +01:00
Johannes Mockenhaupt 5de588b540
Enable reading reservoir level units.
This partially reverts commit b4998feee1.
2018-01-28 15:27:59 +01:00
Johannes Mockenhaupt b3a60eb5ab
Initial work on basing boluses on pump history. 2018-01-28 15:22:41 +01:00
Johannes Mockenhaupt 61bb6aa1ba
Combo: declare as not supporting carb infos. 2018-01-26 13:53:50 +01:00
Johannes Mockenhaupt 4a1970926c
Cleanup. 2018-01-26 13:53:17 +01:00
Johannes Mockenhaupt 5dcf214d08
Fix German translation. 2018-01-25 20:10:21 +01:00
Johannes Mockenhaupt f7ed34532a
Fabric-Log combo init to get an idea of user count. 2018-01-25 03:28:06 +01:00
Johannes Mockenhaupt 0eba153d8a
Combo: add 'base basal rate' to fragment.
(cherry picked from commit 2873da5)
2018-01-23 02:13:11 +01:00
Johannes Mockenhaupt 723bcc4ee3
Remove 'queued activities' from ComboFragment.
(cherry picked from commit 57a4449)
2018-01-15 11:11:58 +01:00
Johannes Mockenhaupt b4998feee1
Disable reading reservoir level units. 2018-01-10 15:05:17 +01:00
Johannes Mockenhaupt 968431d931
i18n reservoir unit. 2018-01-07 13:02:50 +01:00
Johannes Mockenhaupt 117b79619b
Check reservoir level before bolus and abort if not enough left. 2018-01-07 11:27:28 +01:00
Johannes Mockenhaupt 836abd74ab
Read reservoir level. 2018-01-07 11:21:56 +01:00
AdrianLxM 1bbd9012cb
Merge pull request #37 from jotomo/the-clock-strikes-midnight
Correctly infer pump date when crossing midnight. Fixes #35.
2018-01-02 13:28:30 +01:00
Johannes Mockenhaupt 1617d6698d
Update ComboPlugin for updated ContstraintsInterface. 2018-01-01 13:26:16 +01:00
AdrianLxM 3bfffdb1b0
brackets on string format 2018-01-01 01:23:30 +01:00
Johannes Mockenhaupt a6b938d98a
Correctly infer pump date when crossing midnight. Fixes #35.
(cherry picked from commit bda2551)
2017-12-31 00:27:41 +01:00
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