update method names

This commit is contained in:
Roumen Georgiev 2018-06-12 11:03:23 +03:00
parent f044ab15c0
commit 978d94499f
6 changed files with 13 additions and 6 deletions

View file

@ -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
}

View file

@ -205,6 +205,10 @@ public class DanaRUserOptionsActivity extends Activity {
} else
pump.lowReservoirRate = 10;
if (isDanaRv2) {
DanaRv2Plugin.getPlugin().setUserOptions();
}
MainApp.getConfigBuilder().getCommandQueue().setUserSettings(null);
finish();
}

View file

@ -224,7 +224,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
}
@Override
public PumpEnactResult setUserSettings() {
public PumpEnactResult setUserOptions() {
return danaRSService.setUserSettings();
}

View file

@ -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() {

View file

@ -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);

View file

@ -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();
}