Combo: minor cleanups.

This commit is contained in:
Johannes Mockenhaupt 2021-04-29 22:17:01 +02:00
parent 92b441927e
commit 572d7c4565
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -1102,11 +1102,10 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
* Checks the main screen to determine if TBR on pump matches app state. * Checks the main screen to determine if TBR on pump matches app state.
*/ */
private void checkAndResolveTbrMismatch(PumpState state) { private void checkAndResolveTbrMismatch(PumpState state) {
// compare with: info.nightscout.androidaps.plugins.PumpDanaR.comm.MsgStatusTempBasal.updateTempBasalInDB()
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
// Combo doesn't have nor uses IDs for TBRs, see note in #setTempBasalPercent // Combo doesn't have nor uses IDs for TBRs, see note in #setTempBasalPercent
//noinspection UnnecessaryLocalVariable
long tbrId = now; long tbrId = now;
//TemporaryBasal aapsTbr = treatmentsPlugin.getTempBasalFromHistoryIncludingConvertedExtended(now);
PumpSync.PumpState.TemporaryBasal aapsTbr = pumpSync.expectedPumpState().getTemporaryBasal(); PumpSync.PumpState.TemporaryBasal aapsTbr = pumpSync.expectedPumpState().getTemporaryBasal();
if (aapsTbr == null && state.tbrActive && state.tbrRemainingDuration > 2) { if (aapsTbr == null && state.tbrActive && state.tbrRemainingDuration > 2) {
getAapsLogger().debug(LTag.PUMP, "Creating temp basal from pump TBR"); getAapsLogger().debug(LTag.PUMP, "Creating temp basal from pump TBR");