Add getReservoirLevel() and getBatteryLevel() to LocalInsightPlugin

This commit is contained in:
TebbeUbben 2019-02-02 17:02:03 +01:00
parent cc189d360f
commit 183e9a321e

View file

@ -495,6 +495,18 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
else return 0; else return 0;
} }
@Override
public double getReservoirLevel() {
if (cartridgeStatus == null) return 0;
return cartridgeStatus.getRemainingAmount();
}
@Override
public int getBatteryLevel() {
if (batteryStatus == null) return 0;
return batteryStatus.getBatteryAmount();
}
@Override @Override
public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) { public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) {
PumpEnactResult result = new PumpEnactResult(); PumpEnactResult result = new PumpEnactResult();