update method names
This commit is contained in:
parent
f044ab15c0
commit
978d94499f
|
@ -9,5 +9,5 @@ import info.nightscout.androidaps.data.PumpEnactResult;
|
|||
public interface DanaRInterface {
|
||||
PumpEnactResult loadHistory(byte type); // for history browser
|
||||
PumpEnactResult loadEvents(); // events history to build treatments from
|
||||
PumpEnactResult setUserSettings(); // like AnyDana does
|
||||
PumpEnactResult setUserOptions(); // like AnyDana does
|
||||
}
|
||||
|
|
|
@ -205,6 +205,10 @@ public class DanaRUserOptionsActivity extends Activity {
|
|||
} else
|
||||
pump.lowReservoirRate = 10;
|
||||
|
||||
if (isDanaRv2) {
|
||||
DanaRv2Plugin.getPlugin().setUserOptions();
|
||||
}
|
||||
|
||||
MainApp.getConfigBuilder().getCommandQueue().setUserSettings(null);
|
||||
finish();
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setUserSettings() {
|
||||
public PumpEnactResult setUserOptions() {
|
||||
return danaRSService.setUserSettings();
|
||||
}
|
||||
|
||||
|
|
|
@ -390,8 +390,10 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setUserSettings() {
|
||||
return null;
|
||||
public PumpEnactResult setUserOptions() {
|
||||
DanaRv2ExecutionService service = new DanaRv2ExecutionService();
|
||||
log.debug("MsgSetingUserOptions executed!");
|
||||
return service.setUserOptions();
|
||||
}
|
||||
|
||||
public PumpEnactResult getUserOptions() {
|
||||
|
|
|
@ -476,7 +476,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
|
|||
}
|
||||
}
|
||||
|
||||
public PumpEnactResult updateUserSettings() {
|
||||
public PumpEnactResult setUserOptions() {
|
||||
if (!isConnected())
|
||||
return new PumpEnactResult().success(false);
|
||||
SystemClock.sleep(300);
|
||||
|
|
|
@ -28,8 +28,9 @@ public class CommandSetUserSettings extends Command {
|
|||
boolean isDanaRv2 = MainApp.getSpecificPlugin(DanaRv2Plugin.class) != null && MainApp.getSpecificPlugin(DanaRv2Plugin.class).isEnabled(PluginType.PUMP);
|
||||
if(isDanaRv2){
|
||||
pump.getPumpStatus();
|
||||
danaPump.setUserOptions();
|
||||
}
|
||||
PumpEnactResult r = danaPump.setUserSettings();
|
||||
PumpEnactResult r = danaPump.setUserOptions();
|
||||
if (callback != null)
|
||||
callback.result(r).run();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue