allow longer lowtemp on RS an Rv2

This commit is contained in:
Milos Kozak 2018-06-28 10:30:45 +02:00
parent a99b478eea
commit 720e938ebf
2 changed files with 12 additions and 4 deletions

View file

@ -486,8 +486,12 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
// Convert duration from minutes to hours
if (Config.logPumpActions)
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
// use special APS temp basal call ... 100+/15min .... 100-/30min
result = setHighTempBasalPercent(percentRate);
if (percentRate == 0 && durationInMinutes > 30) {
result = setTempBasalPercent(percentRate, durationInMinutes, profile, false);
} else {
// use special APS temp basal call ... 100+/15min .... 100-/30min
result = setHighTempBasalPercent(percentRate);
}
if (!result.success) {
log.error("setTempBasalAbsolute: Failed to set hightemp basal");
return result;

View file

@ -268,8 +268,12 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
// Convert duration from minutes to hours
if (Config.logPumpActions)
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
// use special APS temp basal call ... 100+/15min .... 100-/30min
result = setHighTempBasalPercent(percentRate);
if (percentRate == 0 && durationInMinutes > 30) {
result = setTempBasalPercent(percentRate, durationInMinutes, profile, false);
} else {
// use special APS temp basal call ... 100+/15min .... 100-/30min
result = setHighTempBasalPercent(percentRate);
}
if (!result.success) {
log.error("setTempBasalAbsolute: Failed to set hightemp basal");
return result;