Wrong handling of specialBasalDurations (Duration15 and Duartion30 flags), and added some logging.

This commit is contained in:
Andy Rozman 2018-05-10 12:40:31 +01:00
parent f5a23b2921
commit 6f19ad1407
2 changed files with 14 additions and 1 deletions

View file

@ -311,6 +311,15 @@ public enum PumpType {
public PumpCapability getSpecialBasalDurations() {
return specialBasalDurations;
if (isParentSet())
{
return parent.getSpecialBasalDurations();
}
else
{
return specialBasalDurations == null ? //
PumpCapability.BasalRate_Duration15and30minNotAllowed : specialBasalDurations;
}
}
}

View file

@ -420,9 +420,13 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
PumpType pumpTypeNew = PumpType.getByDescription(pumptype);
log.debug("Pump in configuration: {}, PumpType object: {}", pumptype, pumpTypeNew);
if (pumpType == pumpTypeNew)
return;
log.debug("New pump configuration found ({}), changing from previous ({})", pumpTypeNew, pumpType);
// reset
pumpDescription.resetSettings();