Prepare for separate temp basal beep config

This commit is contained in:
Bart Sopers 2019-12-16 20:20:16 +01:00
parent be8a2fab75
commit d63f34f316

View file

@ -288,7 +288,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
@Override
public PumpEnactResult setTemporaryBasal(TempBasalPair tempBasalPair) {
boolean beepsEnabled = isBasalBeepsEnabled();
boolean beepsEnabled = isTempBasalBeepsEnabled();
try {
delegate.setTemporaryBasal(tempBasalPair, beepsEnabled, beepsEnabled);
} catch (Exception ex) {
@ -302,7 +302,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
@Override
public PumpEnactResult cancelTemporaryBasal() {
try {
delegate.cancelTemporaryBasal(isBasalBeepsEnabled());
delegate.cancelTemporaryBasal(isTempBasalBeepsEnabled());
} catch (Exception ex) {
String comment = handleAndTranslateException(ex);
return new PumpEnactResult().success(false).enacted(false).comment(comment);
@ -544,6 +544,11 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
return this.pumpStatus.beepBasalEnabled;
}
private boolean isTempBasalBeepsEnabled() {
// TODO add separate setting for temp basal beeps
return this.pumpStatus.beepBasalEnabled;
}
private String getStringResource(int id, Object... args) {
return MainApp.gs(id, args);
}