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