Remove some debug code.
This commit is contained in:
parent
821e31c1c3
commit
5c36094b8b
|
@ -451,13 +451,6 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
||||||
if (unroundedPercentage != roundedPercentage) {
|
if (unroundedPercentage != roundedPercentage) {
|
||||||
log.debug("Rounded requested rate " + unroundedPercentage + "% -> " + roundedPercentage + "%");
|
log.debug("Rounded requested rate " + unroundedPercentage + "% -> " + roundedPercentage + "%");
|
||||||
}
|
}
|
||||||
/* GL jotomo/AndroidAPS#18
|
|
||||||
int stepSize = pumpDescription.tempDurationStep;
|
|
||||||
if (durationInMinutes > stepSize) {
|
|
||||||
log.debug("Reducing requested duration of " + durationInMinutes + "m to minimal duration supported by the pump: " + stepSize + "m");
|
|
||||||
durationInMinutes = stepSize;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return setTempBasalPercent(roundedPercentage, durationInMinutes);
|
return setTempBasalPercent(roundedPercentage, durationInMinutes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,26 +464,11 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
||||||
log.debug("Rounded requested percentage from " + percent + " to " + rounded);
|
log.debug("Rounded requested percentage from " + percent + " to " + rounded);
|
||||||
percent = rounded;
|
percent = rounded;
|
||||||
}
|
}
|
||||||
// TODO experimenting .... with the BT connect costing time, this leads to the TBR
|
|
||||||
// still running on the last minute when OpenAPS is run again, which will NOT enact
|
|
||||||
// anything as it sees a TBR is still running. So fake that the TBR has started earlier
|
|
||||||
// and is assumed to be over already. With the Combo, setting a TBR while an existing TBR
|
|
||||||
// is still running is a no-issue: the new TBR simply overrides the existing.
|
|
||||||
|
|
||||||
// can this lead to errors where AAPS tries to cancel a TBR that isn't running? ...
|
|
||||||
// hm, TBRs on teh pump run 20s later, so no, it'd have to be the other way round. sounds good.
|
|
||||||
|
|
||||||
|
|
||||||
// TODO check: if new TBR overrides existing one: who makes call to TempBasel end???
|
|
||||||
|
|
||||||
long tbrStart = System.currentTimeMillis();
|
|
||||||
// TODO DanaR sets tempStart to now -1 to acound for delay from pump?
|
|
||||||
|
|
||||||
|
|
||||||
CommandResult commandResult = runCommand(new SetTbrCommand(percent, durationInMinutes));
|
CommandResult commandResult = runCommand(new SetTbrCommand(percent, durationInMinutes));
|
||||||
if (commandResult.enacted) {
|
if (commandResult.enacted) {
|
||||||
// make sure we're not skipping a loop iteration by a few secs
|
// make sure we're not skipping a loop iteration by a few secs
|
||||||
TemporaryBasal tempStart = new TemporaryBasal(commandResult.completionTime); // - 5_000);
|
TemporaryBasal tempStart = new TemporaryBasal(commandResult.completionTime);
|
||||||
// TODO commandResult.state.tbrRemainingDuration might already display 29 if 30 was set, since 29:59 is shown as 29 ...
|
// TODO commandResult.state.tbrRemainingDuration might already display 29 if 30 was set, since 29:59 is shown as 29 ...
|
||||||
// we should check this, but really ... something must be really screwed up if that number was anything different
|
// we should check this, but really ... something must be really screwed up if that number was anything different
|
||||||
tempStart.durationInMinutes = durationInMinutes;
|
tempStart.durationInMinutes = durationInMinutes;
|
||||||
|
|
Loading…
Reference in a new issue