only: refactoring: get rid of unused `SerialAutoChecker.mode` field

This commit is contained in:
kifir 2024-08-13 15:18:22 +03:00 committed by rusefillc
parent 07fe982aa5
commit be42039abc
2 changed files with 2 additions and 4 deletions

View File

@ -64,7 +64,7 @@ public class PortDetector {
if (mode == DetectorMode.DETECT_ELM327) {
BaudRateHolder.INSTANCE.baudRate = ELM327_DEFAULT_BAUDRATE;
}
new SerialAutoChecker(mode, serialPort, portFound).openAndCheckResponse(mode, result, callback);
new SerialAutoChecker(serialPort, portFound).openAndCheckResponse(mode, result, callback);
}
@Override

View File

@ -19,12 +19,10 @@ import static com.rusefi.binaryprotocol.IoHelper.checkResponseCode;
public class SerialAutoChecker {
private final static Logging log = Logging.getLogging(SerialAutoChecker.class);
private final PortDetector.DetectorMode mode;
private final String serialPort;
private final CountDownLatch portFound;
public SerialAutoChecker(PortDetector.DetectorMode mode, String serialPort, CountDownLatch portFound) {
this.mode = mode;
public SerialAutoChecker(String serialPort, CountDownLatch portFound) {
this.serialPort = serialPort;
this.portFound = portFound;
}