Unbreak RuffyCommandsV1Impl.readHistory, cleanups.
This commit is contained in:
parent
be446145c0
commit
f83dd1cb67
4 changed files with 7 additions and 6 deletions
|
@ -556,8 +556,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
tempStart.percentRate = adjustedPercent;
|
||||
tempStart.isAbsolute = false;
|
||||
tempStart.source = Source.USER;
|
||||
ConfigBuilderPlugin treatmentsInterface = MainApp.getConfigBuilder();
|
||||
treatmentsInterface.addToHistoryTempBasal(tempStart);
|
||||
MainApp.getConfigBuilder().addToHistoryTempBasal(tempStart);
|
||||
|
||||
MainApp.bus().post(new EventComboPumpUpdateGUI());
|
||||
}
|
||||
|
@ -771,6 +770,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
* Checks the main screen to determine if TBR on pump matches app state.
|
||||
*/
|
||||
private void checkAndResolveTbrMismatch(PumpState state) {
|
||||
// compare with: info.nightscout.androidaps.plugins.PumpDanaR.comm.MsgStatusTempBasal.updateTempBasalInDB()
|
||||
long now = System.currentTimeMillis();
|
||||
TemporaryBasal aapsTbr = MainApp.getConfigBuilder().getTempBasalFromHistory(now);
|
||||
if (aapsTbr == null && state.tbrActive && state.tbrRemainingDuration > 2) {
|
||||
|
|
|
@ -679,7 +679,7 @@
|
|||
<string name="pump_unreachable_threshold">Pumpe ist nicht erreichbar Grenze [min]</string>
|
||||
<string name="combo_refresh">Aktualisieren</string>
|
||||
<string name="combo_pump_activity_label">Aktivität</string>
|
||||
<string name="combo_tbr_remaining">%d%% (%d verbleibend)</string>
|
||||
<string name="combo_tbr_remaining">%d%% (%d Min. verbleibend)</string>
|
||||
<string name="combopump_settings">Accu-Chek Combo settings Einstellungen</string>
|
||||
<string name="combo_no_pump_connection">Keine Verbindung zur Pumpe seit %d min</string>
|
||||
<string name="bolusstopped">Bolusabgabe gestopped</string>
|
||||
|
|
|
@ -28,9 +28,10 @@ public class RuffyCommandsV1Impl implements RuffyCommands {
|
|||
|
||||
private RuffyCommandsV1Impl() {}
|
||||
|
||||
/** Not supported by RuffyScripter */
|
||||
@Override
|
||||
public CommandResult getDateAndTime() {
|
||||
return delegate.getDateAndTime();
|
||||
return new CommandResult().success(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,7 +91,7 @@ public class RuffyCommandsV1Impl implements RuffyCommands {
|
|||
|
||||
@Override
|
||||
public CommandResult readHistory(PumpHistoryRequest request) {
|
||||
return delegate.readPumpState().history(new PumpHistory());
|
||||
return delegate.readHistory(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -787,7 +787,7 @@ public class RuffyScripter implements RuffyCommands {
|
|||
|
||||
@Override
|
||||
public CommandResult getDateAndTime() {
|
||||
return new CommandResult().success(false);
|
||||
throw new RuntimeException("Not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue