Did it again.

This commit is contained in:
Johannes Mockenhaupt 2018-02-05 22:59:25 +01:00
parent e812c7119f
commit 5b21844423
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -553,7 +553,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
long maxWaitTimeout = waitStartTime + 65 * 1000; long maxWaitTimeout = waitStartTime + 65 * 1000;
int waitLoops = 0; int waitLoops = 0;
while (previousBolus.timestamp == timeCheckResult.state.pumpTime while (previousBolus.timestamp == timeCheckResult.state.pumpTime
&& maxWaitTimeout < System.currentTimeMillis()) { && maxWaitTimeout > System.currentTimeMillis()) {
if (cancelBolus) { if (cancelBolus) {
return new PumpEnactResult().success(true).enacted(false); return new PumpEnactResult().success(true).enacted(false);
} }
@ -619,7 +619,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
return new PumpEnactResult().success(false).enacted(true) return new PumpEnactResult().success(false).enacted(true)
.comment(MainApp.gs(R.string.combo_error_updating_treatment_record)); .comment(MainApp.gs(R.string.combo_error_updating_treatment_record));
// update `recentBoluses` so the bolus was just delivered won't be detected as an new // update `recentBoluses` so the bolus was just delivered won't be detected as a new
// bolus that has been delivered on the pump // bolus that has been delivered on the pump
recentBoluses = postBolusStateResult.history.bolusHistory; recentBoluses = postBolusStateResult.history.bolusHistory;