diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BatteryStatusDTO.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BatteryStatusDTO.java index d12260bb75..c8bd2347d0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BatteryStatusDTO.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BatteryStatusDTO.java @@ -27,6 +27,9 @@ public class BatteryStatusDTO { int percentInt = (int) (percent * 100.0d); + if (percentInt<0) + percentInt = 1; + if (percentInt > 100) percentInt = 100;