From de693c0f7636a63d4c3bc9b2de0a04f0de0f3df7 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 23 Aug 2017 13:08:22 +0200 Subject: [PATCH] Add reservoirLevel to PumpState. --- .../de/jotomo/ruffyscripter/PumpState.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/de/jotomo/ruffyscripter/PumpState.java b/app/src/main/java/de/jotomo/ruffyscripter/PumpState.java index 4d519b4669..f40f542e4f 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/PumpState.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/PumpState.java @@ -20,7 +20,8 @@ public class PumpState { public String errorMsg; public boolean suspended; public boolean lowBattery; - public int insulinState; + public int insulinState = -1; + public int reservoirLevel = -1; public PumpState tbrActive(boolean tbrActive) { this.tbrActive = tbrActive; @@ -52,6 +53,21 @@ public class PumpState { return this; } + public PumpState lowBattery(boolean lowBattery) { + this.lowBattery = lowBattery; + return this; + } + + public PumpState insulinState(int insulinState) { + this.insulinState = insulinState; + return this; + } + + public PumpState reservoirLevel(int reservoirLevel) { + this.reservoirLevel = reservoirLevel; + return this; + } + @Override public String toString() { return "PumpState{" + @@ -63,6 +79,7 @@ public class PumpState { ", suspended=" + suspended + ", lowBattery=" + lowBattery + ", insulinState=" + insulinState + + ", reversoirLevel=" + reservoirLevel + ", timestamp=" + timestamp + '}'; }