Debug code.
This commit is contained in:
parent
865fc63bd4
commit
60d6f305b5
|
@ -521,14 +521,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
|
||||
@Override
|
||||
public void stopBolusDelivering() {
|
||||
// TODO if the pump is busy setting a TBR while a bolus was requested,
|
||||
// cancelling here, when the TBR is still being set will fail to cancel the bolus.
|
||||
// See if the queue might solve this, otherwise we could add a check in runCommand
|
||||
// (but can't currently determine if the request is a basal request)
|
||||
// or have the scripter skip the next bolus that comes in
|
||||
// TODO related: if pump can't be reached, a bolus will wait until pump is available again
|
||||
// and will then bolus all requested boluses ... because 'synchronized' makes for a dumb
|
||||
// queue
|
||||
if (bolusInProgress) {
|
||||
ruffyScripter.cancelBolus();
|
||||
}
|
||||
|
@ -575,15 +567,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
return cancelTempBasal(false);
|
||||
}
|
||||
|
||||
long thisMinute = System.currentTimeMillis() / (60 * 1000) * (60 * 1000);
|
||||
TemporaryBasal activeTbr = MainApp.getDbHelper().getTemporaryBasalsDataByDate(thisMinute);
|
||||
if (activeTbr != null && activeTbr.date == thisMinute) {
|
||||
// setting multiple TBRs within a single minute (with the first TBR having a runtime
|
||||
// of 0) is not supported. Attempting to do so sets a new TBR on the pump but adding
|
||||
// the record to the DB fails as there already is a record with that date.
|
||||
return new PumpEnactResult().success(false).enacted(false);
|
||||
}
|
||||
|
||||
int finalAdjustedPercent = adjustedPercent;
|
||||
CommandResult commandResult = runCommand(MainApp.sResources.getString(R.string.combo_pump_action_setting_tbr, percent, durationInMinutes),
|
||||
3, () -> ruffyScripter.setTbr(finalAdjustedPercent, durationInMinutes));
|
||||
|
|
|
@ -189,13 +189,6 @@ public class RuffyScripter implements RuffyCommands {
|
|||
|
||||
@Override
|
||||
public synchronized void disconnect() {
|
||||
// TODO Clean up... is this still needed? Or caused by ruffyService.isConnected bug?
|
||||
// queue is a bit overeager to close the connection, so a small gap of 100ms or so
|
||||
// would cost a full reconnect of 10-20s
|
||||
// SystemClock.sleep(1000);
|
||||
// if (!isConnected()) {
|
||||
// return;
|
||||
// }
|
||||
try {
|
||||
ruffyService.doRTDisconnect();
|
||||
} catch (RemoteException e) {
|
||||
|
|
Loading…
Reference in a new issue