Minor cleanups.

This commit is contained in:
Johannes Mockenhaupt 2017-11-03 23:40:53 +01:00
parent 6ba57ff1f7
commit 011409a6e5
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
3 changed files with 3 additions and 3 deletions

View file

@ -622,7 +622,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
pump.lastCmdResult = commandResult;
pump.lastConnectionAttempt = System.currentTimeMillis();
if (commandResult.success) {
pump.lastSuccessfulConnection = System.currentTimeMillis();
pump.lastSuccessfulConnection = pump.lastConnectionAttempt;
}
} finally {
if (activity != null) {

View file

@ -771,7 +771,7 @@
<string name="combo_no_pump_connection">No connection for %s</string>
<string name="combo_connect_attempt_failed">Last connect attempt failed</string>
<string name="combo_last_connection_time">%s (%s)</string>
<string name="combo_tbr_remaining">%d%% (%d remaining)</string>
<string name="combo_tbr_remaining">%d%% (%d min remaining)</string>
<string name="combo_last_bolus">%.1f U (%.1f %s, %s)</string>
<string name="combo_pump_state_disconnected">Pump disconnected</string>
<string name="combo_pump_state_suspended_due_to_error">Suspended due to error</string>

View file

@ -80,6 +80,7 @@ public class SetTbrCommand extends BaseCommand {
scripter.pressCheckKey();
scripter.waitForMenuToBeLeft(MenuType.TBR_DURATION);
}
result.success = true;
}
private void enterTbrMenu() {
@ -101,7 +102,6 @@ public class SetTbrCommand extends BaseCommand {
log.debug("Pressing " + (increasePercentage ? "up" : "down") + " " + percentageSteps + " times");
for (int i = 0; i < Math.abs(percentageSteps); i++) {
scripter.verifyMenuIsDisplayed(MenuType.TBR_SET);
log.debug("Push #" + (i + 1));
log.debug("Push #" + (i + 1) + "/" + Math.abs(percentageSteps));
if (increasePercentage) scripter.pressUpKey();
else scripter.pressDownKey();