diff --git a/README-Combo.md b/README-Combo.md index 6efb5af4f8..742fca65ce 100644 --- a/README-Combo.md +++ b/README-Combo.md @@ -46,6 +46,8 @@ Setup v2: - Pair the pump, if it doesn't work, switch to the `pairing` branch, pair, then switch back the original branch. If the pump is already paired and can be controlled via ruffy, installing the above version is sufficient. + If AAPS is already installed, switch to the MDI plugin to avoid the Combo + plugin from interfering with ruffy during the pairing process. - Get AndroidAPS from https://gitlab.com/jotomo/KEF (Branch `combo-scripter-v2`) - Before enabling the Combo plugin in AAPS make sure you're profile is set up correctly and your basal profile is up to date as AAPS will sync the basal profile @@ -90,6 +92,7 @@ Usage: - If the loop requests a running TBR to be cancelled the Combo will set a TBR of 90% or 110% for 15 minutes instead. This is because cancelling a TBR causes an alert on the pump which causes a lot of vibrations. +- Long press the Refresh button on the Combo tab to force a re-read of all pump data Reporting bugs: - Note the precise time the problem occurred and describe the circumstances and steps that caused diff --git a/TODO-Combo.md b/TODO-Combo.md index 703a61aa3b..d8dc7c911e 100644 --- a/TODO-Combo.md +++ b/TODO-Combo.md @@ -93,4 +93,9 @@ - Application shut down is broken with PersistentNotification (never shut down) and WearPlugin - Android logs it as crashed and restarts it, thereby restarting the app (or just keeping it alive, also causes errors with the DB as there were attemtps to open a closed DB instance/ref. - - [ ] Check if TBRs are set to often from ConfigBuilder on high base basal rates (basalstep is 0.01; in reality larger on >1U/h base basal) + - [ ] Check if TBRs are set to often from ConfigBuilder on high base basal rates (basalstep is 0.01; in reality larger on >1U/h base basal) + - [ ] With long running commands (e.g. setting basal rate, which can take up to 5m), multiple 'set tbr' commands + may stack up. Since setting a TBR multiple times in one minute fails, the ComboPlugin rejects such + request, letting the oldest TBR run till the net iteration. This can potentially be nicely solved + through the queue branch. However, the original problem is the amount of time the Combo can + take to execute commands, which might go away (mostly) with command mode. diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index 15be6a3337..894f7cce20 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -590,7 +590,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf } long thisMinute = System.currentTimeMillis() / (60 * 1000) * (60 * 1000); - TemporaryBasal activeTbr = MainApp.getConfigBuilder().getTempBasalFromHistory(thisMinute); + TemporaryBasal activeTbr = MainApp.getDbHelper().getTemporaryBasalsDataByDate(thisMinute); if (activeTbr != null && activeTbr.date == thisMinute) { // setting multiple TBRs within a single minute (with the first TBR having a runtime // of 0) is not supported. Attempting to do so sets a new TBR on the pump but adding