Commands: only check inputs for sanity, not therapy limits.

Updated README to ask the user to configure the pump to enforce limits
and only make sure inputs to the command are sane since there's
no facility in place to report errors back, which is fine given this
proactively guards against bugs, not a valid usage scenario.

(cherry picked from commit 033ace4)
This commit is contained in:
Johannes Mockenhaupt 2018-01-19 13:56:24 +01:00
parent fcd7c91b82
commit dfb78f5f89
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
3 changed files with 5 additions and 6 deletions

View file

@ -57,6 +57,9 @@ Setup:
- Disable end of TBR alert - Disable end of TBR alert
- Set TBR duration step-size to 15 min - Set TBR duration step-size to 15 min
- Set low cartridge alarm to your liking - Set low cartridge alarm to your liking
- Configure a max bolus suited for your therapy to protect against bugs in the software
- Similarly, configure maximum TBR duration as a safeguard. Allow at least 3 hours, since
the option to disconnect the pump for 3 hours sets a 0% for 3 hours.
- Enable keylock (can also be set on the pump directly, see usage section on reasoning) - Enable keylock (can also be set on the pump directly, see usage section on reasoning)
- Get Android Studio 3 https://developer.android.com/studio/index.html - Get Android Studio 3 https://developer.android.com/studio/index.html
- Follow the link http://ruffy.AndroidAPS.org and clone via git (branch `combo-scripter-v2`) - Follow the link http://ruffy.AndroidAPS.org and clone via git (branch `combo-scripter-v2`)

View file

@ -39,8 +39,8 @@ public class BolusCommand extends BaseCommand {
public List<String> validateArguments() { public List<String> validateArguments() {
List<String> violations = new ArrayList<>(); List<String> violations = new ArrayList<>();
if (bolus <= 0 || bolus > 25) { if (bolus <= 0) {
violations.add("Requested bolus " + bolus + " out of limits (0-25)"); violations.add("Requested bolus non-positive: " + bolus);
} }
return violations; return violations;

View file

@ -47,10 +47,6 @@ public class SetTbrCommand extends BaseCommand {
} }
} }
if (percentage == 0 && duration > 180) {
violations.add("Max allowed zero-temp duration is 3h");
}
return violations; return violations;
} }