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 setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, boolean force);
|
||||||
PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes);
|
PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes);
|
||||||
PumpEnactResult setExtendedBolus(Double insulin, 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
|
//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, the pump should always do a real cancel
|
//when the cancel request is requested by the user (forced), the pump should always do a real cancel
|
||||||
PumpEnactResult cancelTempBasal(boolean userRequested);
|
PumpEnactResult cancelTempBasal(boolean force);
|
||||||
PumpEnactResult cancelExtendedBolus();
|
PumpEnactResult cancelExtendedBolus();
|
||||||
|
|
||||||
// Status to be passed to NS
|
// Status to be passed to NS
|
||||||
|
|
|
@ -513,8 +513,8 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||||
PumpEnactResult result = activePump.cancelTempBasal(userRequested);
|
PumpEnactResult result = activePump.cancelTempBasal(force);
|
||||||
if (Config.logCongigBuilderActions)
|
if (Config.logCongigBuilderActions)
|
||||||
log.debug("cancelTempBasal success: " + result.success + " enacted: " + result.enacted);
|
log.debug("cancelTempBasal success: " + result.success + " enacted: " + result.enacted);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -400,7 +400,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, DanaRInterface, C
|
||||||
if (Config.logPumpActions)
|
if (Config.logPumpActions)
|
||||||
log.debug("setTempBasalAbsolute: currently running: " + running.toString());
|
log.debug("setTempBasalAbsolute: currently running: " + running.toString());
|
||||||
if (running.percentRate == percentRate) {
|
if (running.percentRate == percentRate) {
|
||||||
if (force == true) {
|
if (force) {
|
||||||
cancelTempBasal(true);
|
cancelTempBasal(true);
|
||||||
} else {
|
} else {
|
||||||
result.success = true;
|
result.success = true;
|
||||||
|
@ -576,7 +576,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, DanaRInterface, C
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||||
if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress())
|
if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress())
|
||||||
return cancelRealTempBasal();
|
return cancelRealTempBasal();
|
||||||
if (MainApp.getConfigBuilder().isInHistoryExtendedBoluslInProgress() && useExtendedBoluses) {
|
if (MainApp.getConfigBuilder().isInHistoryExtendedBoluslInProgress() && useExtendedBoluses) {
|
||||||
|
|
|
@ -398,7 +398,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, DanaRInterf
|
||||||
if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress()) {
|
if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress()) {
|
||||||
// Correct basal already set ?
|
// Correct basal already set ?
|
||||||
if (MainApp.getConfigBuilder().getRealTempBasalFromHistory(System.currentTimeMillis()).percentRate == percentRate) {
|
if (MainApp.getConfigBuilder().getRealTempBasalFromHistory(System.currentTimeMillis()).percentRate == percentRate) {
|
||||||
if (force == true) {
|
if (force) {
|
||||||
cancelTempBasal(true);
|
cancelTempBasal(true);
|
||||||
} else {
|
} else {
|
||||||
result.success = true;
|
result.success = true;
|
||||||
|
@ -574,7 +574,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, DanaRInterf
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||||
if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress())
|
if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress())
|
||||||
return cancelRealTempBasal();
|
return cancelRealTempBasal();
|
||||||
if (MainApp.getConfigBuilder().isInHistoryExtendedBoluslInProgress() && useExtendedBoluses) {
|
if (MainApp.getConfigBuilder().isInHistoryExtendedBoluslInProgress() && useExtendedBoluses) {
|
||||||
|
|
|
@ -365,7 +365,7 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, DanaRInterface,
|
||||||
if (MainApp.getConfigBuilder().isTempBasalInProgress()) {
|
if (MainApp.getConfigBuilder().isTempBasalInProgress()) {
|
||||||
// Correct basal already set ?
|
// Correct basal already set ?
|
||||||
if (MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis()).percentRate == percentRate) {
|
if (MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis()).percentRate == percentRate) {
|
||||||
if (force == true) {
|
if (force) {
|
||||||
cancelTempBasal(true);
|
cancelTempBasal(true);
|
||||||
} else {
|
} else {
|
||||||
result.success = true;
|
result.success = true;
|
||||||
|
@ -515,7 +515,7 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, DanaRInterface,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||||
PumpEnactResult result = new PumpEnactResult();
|
PumpEnactResult result = new PumpEnactResult();
|
||||||
if (pump.isTempBasalInProgress) {
|
if (pump.isTempBasalInProgress) {
|
||||||
sExecutionService.tempBasalStop();
|
sExecutionService.tempBasalStop();
|
||||||
|
|
|
@ -196,7 +196,7 @@ public class MDIPlugin implements PluginBase, PumpInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||||
PumpEnactResult result = new PumpEnactResult();
|
PumpEnactResult result = new PumpEnactResult();
|
||||||
result.success = false;
|
result.success = false;
|
||||||
result.comment = MainApp.instance().getString(R.string.pumperror);
|
result.comment = MainApp.instance().getString(R.string.pumperror);
|
||||||
|
|
|
@ -337,7 +337,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult cancelTempBasal(boolean userRequested) {
|
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||||
TreatmentsInterface treatmentsInterface = MainApp.getConfigBuilder();
|
TreatmentsInterface treatmentsInterface = MainApp.getConfigBuilder();
|
||||||
PumpEnactResult result = new PumpEnactResult();
|
PumpEnactResult result = new PumpEnactResult();
|
||||||
result.success = true;
|
result.success = true;
|
||||||
|
|
Loading…
Reference in a new issue