allow longer lowtemp on RS an Rv2
This commit is contained in:
parent
a99b478eea
commit
720e938ebf
|
@ -486,8 +486,12 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
||||||
// Convert duration from minutes to hours
|
// Convert duration from minutes to hours
|
||||||
if (Config.logPumpActions)
|
if (Config.logPumpActions)
|
||||||
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
|
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
|
||||||
// use special APS temp basal call ... 100+/15min .... 100-/30min
|
if (percentRate == 0 && durationInMinutes > 30) {
|
||||||
result = setHighTempBasalPercent(percentRate);
|
result = setTempBasalPercent(percentRate, durationInMinutes, profile, false);
|
||||||
|
} else {
|
||||||
|
// use special APS temp basal call ... 100+/15min .... 100-/30min
|
||||||
|
result = setHighTempBasalPercent(percentRate);
|
||||||
|
}
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
log.error("setTempBasalAbsolute: Failed to set hightemp basal");
|
log.error("setTempBasalAbsolute: Failed to set hightemp basal");
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -268,8 +268,12 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
||||||
// Convert duration from minutes to hours
|
// Convert duration from minutes to hours
|
||||||
if (Config.logPumpActions)
|
if (Config.logPumpActions)
|
||||||
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
|
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
|
||||||
// use special APS temp basal call ... 100+/15min .... 100-/30min
|
if (percentRate == 0 && durationInMinutes > 30) {
|
||||||
result = setHighTempBasalPercent(percentRate);
|
result = setTempBasalPercent(percentRate, durationInMinutes, profile, false);
|
||||||
|
} else {
|
||||||
|
// use special APS temp basal call ... 100+/15min .... 100-/30min
|
||||||
|
result = setHighTempBasalPercent(percentRate);
|
||||||
|
}
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
log.error("setTempBasalAbsolute: Failed to set hightemp basal");
|
log.error("setTempBasalAbsolute: Failed to set hightemp basal");
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue