Commit graph

460 commits

Author SHA1 Message Date
Milos Kozak 15158fb5ea applyBolusConstraints refactor & tests 2018-03-21 23:01:30 +01:00
Milos Kozak c68ab9f1ca applyBasalPercentConstraints refactor & tests part2 2018-03-21 22:06:28 +01:00
Milos Kozak e2ea44a8a8 applyBasalPercentConstraints reactor & tests part1 2018-03-21 20:24:02 +01:00
Milos Kozak ca70cbdaec
Merge branch 'dev' into newconstraints 2018-03-21 10:48:23 +01:00
Milos Kozak 272fdb4747
Merge pull request #779 from jotomo/loop-results
Loop results
2018-03-21 10:44:13 +01:00
Milos Kozak 15ebfc1193 applyBasalConstraints reactor & tests 2018-03-20 22:09:22 +01:00
Milos Kozak c2cfe4e7ea isSMBModeEnabled reactor & tests 2018-03-19 23:14:04 +01:00
Milos Kozak 26ecc3dd60 isAMAModeEnabled reactor & tests 2018-03-19 22:59:25 +01:00
Milos Kozak f8a3b7aee7 isAutosensModeEnabled reactor & tests 2018-03-19 22:36:08 +01:00
Milos Kozak f6fdef7986 isClosedLoopAllowed & isLoopInvokationAllowed tests 2018-03-19 22:20:42 +01:00
AdrianLxM 01a9e76827 refactor a bit 2018-03-19 18:45:23 +01:00
Milos Kozak ce63655097 move constraints interface functions from ConfigBuilder to ConstraintsChecker class 2018-03-19 18:21:02 +01:00
Milos Kozak 52ffcba047 generic Constraint type 2018-03-19 17:38:48 +01:00
Milos Kozak 326229ebbb limitClosedLoop & remove openloop flavor 2018-03-19 17:06:22 +01:00
Johannes Mockenhaupt 86b25174e2
Combo: unbreak basal rate conversion.
This aligns the combo with the changes from the nodefaultprofile
merge.
2018-03-19 15:59:23 +01:00
Milos Kozak 5a96b88499 Merge branch 'dev' of https://github.com/MilosKozak/AndroidAPS into newconstraints 2018-03-19 15:11:50 +01:00
Johannes Mockenhaupt f918a5f303
More loop results cleanup and i18n. 2018-03-19 14:14:07 +01:00
Johannes Mockenhaupt 213fc7ccb4
Combo: when suspended, create 0% TBR record, suppress checks.
Fixes #774
2018-03-19 14:07:26 +01:00
Milos Kozak b0a9f678f0 limitRunningLoop constraint 2018-03-19 13:11:25 +01:00
Johannes Mockenhaupt a2ac21ea67
Combo: only reject bolus requests if the requested bolus was delivered
recently

Since history is being read now (also just before starting to bolus),
it's safe to only reject boluses if the previous request actually
lead to insulin delivery.

Fixes #700.
2018-03-18 14:36:58 +01:00
Johannes Mockenhaupt 30a191c6eb
Combo: ruffyscripter: abort a command if an unparsable menu is encountered.
This happens when the pump is misconfigured (e.g. quick info is
labeled wrong), or the bolus history has no entries yet.
2018-03-17 14:06:39 +01:00
Johannes Mockenhaupt 926bea55c0
Combo: align with dev changes. 2018-03-17 13:51:42 +01:00
Johannes Mockenhaupt 6a6359f1ee
Combo: Show count of boluses delivered and TBRs set on pump. 2018-03-17 13:51:13 +01:00
Johannes Mockenhaupt 0205dc40b3
Combo: set SMB flag on bolus progress update for wear. 2018-03-16 15:56:31 +01:00
Johannes Mockenhaupt 6bebb30da0
Combo: use PrivacyFabric to align with dev. 2018-03-16 15:52:21 +01:00
Johannes Mockenhaupt 30d522e1a8
Combo: update PumpDescription to align with dev. 2018-03-16 15:49:12 +01:00
Milos Kozak d3c23f6c33 allow to override zero base basal on combo 2018-02-19 10:44:15 +01:00
Johannes Mockenhaupt d155616c0b
Minor fixes. 2018-02-17 21:08:36 +01:00
Johannes Mockenhaupt 52aa27de05
Sanity check bolus timestamp on start, after bolusing. 2018-02-16 17:33:59 +01:00
Johannes Mockenhaupt c5e0eb9968
Don't disconnect after history read when queue is busy.
Temporary hack, ComboPlugin.runCommand will still run commands
synchronously.
2018-02-13 20:44:36 +01:00
Johannes Mockenhaupt aae9f7d153
Show notification to check pump date if last bolus is older than 24h. 2018-02-13 20:44:36 +01:00
Johannes Mockenhaupt 3ff56c7fa2
Disable unfinished dialogs. 2018-02-13 19:30:48 +01:00
Johannes Mockenhaupt 573c818eb7
Combo: Answer detected TBR mismatches. 2018-02-10 14:33:44 +01:00
Johannes Mockenhaupt 7fa51a9248
Revert: Combo: retry twice to establish connection before giving up.
Only increases number of failed connection attempts.
2018-02-08 22:15:36 +01:00
Johannes Mockenhaupt 46ea4be4eb
ComboFragment: display last bolus regardless of age.
(cherry picked from commit 197874e)
2018-02-07 22:51:15 +01:00
Johannes Mockenhaupt 6b36dd27d8
Don't create a cancel record for requests to cancel a TBR when none is running.
(cherry picked from commit a46b475)
2018-02-07 22:08:16 +01:00
Johannes Mockenhaupt 6fb5f5bad4
Check result.success when hard cancelling TBR.
(cherry picked from commit 654f984)
2018-02-07 15:30:02 +01:00
Johannes Mockenhaupt c781601cbb
Commit missing string. 2018-02-06 00:04:24 +01:00
Johannes Mockenhaupt e9f0fa3c04
Warn when finding multiple boluses in the same minute with same amount.
Not much can be done if the user manages to bolus multiple boluses
within the same minute, with the same amount. This should almost
never happen, but if it does, at least warn the user one of those
boluses isn't accounted for wrt to IOB.
2018-02-05 23:58:19 +01:00
Johannes Mockenhaupt a861afa208
Log bolus amount when saving to DB failed. 2018-02-05 23:19:43 +01:00
Johannes Mockenhaupt 5b21844423
Did it again. 2018-02-05 23:14:25 +01:00
Johannes Mockenhaupt e812c7119f
Fix setting 'pumpHistoryChanged'. 2018-02-05 23:14:25 +01:00
Johannes Mockenhaupt f07017a4f6
Document global state variables. 2018-02-05 23:14:25 +01:00
Johannes Mockenhaupt 8c25bc4002
Answers cleanup. 2018-02-04 01:29:27 +01:00
Johannes Mockenhaupt 87771e8753
A few fixes. 2018-02-03 23:44:17 +01:00
Johannes Mockenhaupt 956a611af4
Fix checking/updating history.
(cherry picked from commit 5413a0f)
2018-02-03 22:07:42 +01:00
Johannes Mockenhaupt 2a5c28cf6b
ReadQuickInfoCommand: only read as many boluses as are available.
(cherry picked from commit 7857abb)
2018-02-03 22:07:41 +01:00
Johannes Mockenhaupt 183edfcc09
When checking for changed pump history, compare the last two records.
This ensures changes are also detected if a bolus was added on the
pump within the same minute of the previous record.
2018-02-03 20:03:30 +01:00
Johannes Mockenhaupt 1e8e2a59fd
ReadHistoryCommand: fetch records including the requested timestamp.
To ensure we retrieve records with the same timestamp.
2018-02-03 19:56:27 +01:00
Johannes Mockenhaupt 6fded4c1bd
ComboPlugin.deliverBolus: avoid creating boluses within the same minute. 2018-02-03 19:32:00 +01:00