allow 30min basal rates when pump supports it
This commit is contained in:
parent
714abbbb6e
commit
6cf849ce76
|
@ -218,6 +218,8 @@ public class Profile {
|
|||
|
||||
if (isValid) {
|
||||
// Check for hours alignment
|
||||
PumpInterface pump = MainApp.getConfigBuilder().getActivePump();
|
||||
if (!pump.getPumpDescription().is30minBasalRatesCapable) {
|
||||
for (int index = 0; index < basal_v.size(); index++) {
|
||||
long secondsFromMidnight = basal_v.keyAt(index);
|
||||
if (secondsFromMidnight % 3600 != 0) {
|
||||
|
@ -225,9 +227,9 @@ public class Profile {
|
|||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check for minimal basal value
|
||||
PumpInterface pump = ConfigBuilderPlugin.getActivePump();
|
||||
if (pump != null) {
|
||||
PumpDescription description = pump.getPumpDescription();
|
||||
for (int i = 0; i < basal_v.size(); i++) {
|
||||
|
|
|
@ -39,4 +39,6 @@ public class PumpDescription {
|
|||
public boolean isRefillingCapable = false;
|
||||
|
||||
public boolean storesCarbInfo = true;
|
||||
|
||||
public boolean is30minBasalRatesCapable = false;
|
||||
}
|
||||
|
|
|
@ -155,6 +155,7 @@ public class InsightPumpPlugin implements PluginBase, PumpInterface, Constraints
|
|||
|
||||
pumpDescription.isRefillingCapable = true;
|
||||
//pumpDescription.storesCarbInfo = false;
|
||||
pumpDescription.is30minBasalRatesCapable = true;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
|
|||
pumpDescription.isRefillingCapable = false;
|
||||
|
||||
pumpDescription.storesCarbInfo = false;
|
||||
pumpDescription.is30minBasalRatesCapable = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue