rename 'userRequested' to 'force' as parameter to cancelTempBasal in order to have the same naming as with setTempBasalAbsolute
This commit is contained in:
parent
8db9cb8887
commit
6bbb785574
7 changed files with 13 additions and 13 deletions
|
@ -34,9 +34,9 @@ public interface PumpInterface {
|
|||
PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, boolean force);
|
||||
PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes);
|
||||
PumpEnactResult setExtendedBolus(Double insulin, Integer durationInMinutes);
|
||||
//some pumps might set a very short temp close to 100% as canecelling a temp can be noisy
|
||||
//when the cancel request is requested by the user, the pump should always do a real cancel
|
||||
PumpEnactResult cancelTempBasal(boolean userRequested);
|
||||
//some pumps might set a very short temp close to 100% as cancelling a temp can be noisy
|
||||
//when the cancel request is requested by the user (forced), the pump should always do a real cancel
|
||||
PumpEnactResult cancelTempBasal(boolean force);
|
||||
PumpEnactResult cancelExtendedBolus();
|
||||
|
||||
// Status to be passed to NS
|
||||
|
|
|
@ -513,8 +513,8 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
|||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
||||
PumpEnactResult result = activePump.cancelTempBasal(userRequested);
|
||||
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||
PumpEnactResult result = activePump.cancelTempBasal(force);
|
||||
if (Config.logCongigBuilderActions)
|
||||
log.debug("cancelTempBasal success: " + result.success + " enacted: " + result.enacted);
|
||||
return result;
|
||||
|
|
|
@ -400,7 +400,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, DanaRInterface, C
|
|||
if (Config.logPumpActions)
|
||||
log.debug("setTempBasalAbsolute: currently running: " + running.toString());
|
||||
if (running.percentRate == percentRate) {
|
||||
if (force == true) {
|
||||
if (force) {
|
||||
cancelTempBasal(true);
|
||||
} else {
|
||||
result.success = true;
|
||||
|
@ -576,7 +576,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, DanaRInterface, C
|
|||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
||||
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||
if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress())
|
||||
return cancelRealTempBasal();
|
||||
if (MainApp.getConfigBuilder().isInHistoryExtendedBoluslInProgress() && useExtendedBoluses) {
|
||||
|
|
|
@ -398,7 +398,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, DanaRInterf
|
|||
if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress()) {
|
||||
// Correct basal already set ?
|
||||
if (MainApp.getConfigBuilder().getRealTempBasalFromHistory(System.currentTimeMillis()).percentRate == percentRate) {
|
||||
if (force == true) {
|
||||
if (force) {
|
||||
cancelTempBasal(true);
|
||||
} else {
|
||||
result.success = true;
|
||||
|
@ -574,7 +574,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, DanaRInterf
|
|||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
||||
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||
if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress())
|
||||
return cancelRealTempBasal();
|
||||
if (MainApp.getConfigBuilder().isInHistoryExtendedBoluslInProgress() && useExtendedBoluses) {
|
||||
|
|
|
@ -365,7 +365,7 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, DanaRInterface,
|
|||
if (MainApp.getConfigBuilder().isTempBasalInProgress()) {
|
||||
// Correct basal already set ?
|
||||
if (MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis()).percentRate == percentRate) {
|
||||
if (force == true) {
|
||||
if (force) {
|
||||
cancelTempBasal(true);
|
||||
} else {
|
||||
result.success = true;
|
||||
|
@ -515,7 +515,7 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, DanaRInterface,
|
|||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
||||
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
if (pump.isTempBasalInProgress) {
|
||||
sExecutionService.tempBasalStop();
|
||||
|
|
|
@ -196,7 +196,7 @@ public class MDIPlugin implements PluginBase, PumpInterface {
|
|||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
||||
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
result.success = false;
|
||||
result.comment = MainApp.instance().getString(R.string.pumperror);
|
||||
|
|
|
@ -337,7 +337,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
|
|||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
||||
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||
TreatmentsInterface treatmentsInterface = MainApp.getConfigBuilder();
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
result.success = true;
|
||||
|
|
Loading…
Reference in a new issue