I have a discovery board which does not switch to DFU #3280

better logging
This commit is contained in:
rusefi 2021-09-28 11:30:22 -04:00
parent b64c499848
commit 0bd779fd58
2 changed files with 7 additions and 2 deletions

View File

@ -21,7 +21,7 @@ public class DfuHelper {
try {
stream.sendPacket(command);
stream.close();
messages.append("Reboot command sent!\n");
messages.append(String.format("Reboot command [%s] sent into %s!\n", Fields.CMD_REBOOT_DFU, stream));
} catch (IOException e) {
messages.append("Error " + e);
}

View File

@ -18,7 +18,7 @@ import static com.devexperts.logging.Logging.getLogging;
*/
public class SerialIoStreamJSerialComm extends AbstractIoStream {
private static final Logging log = getLogging(SerialIoStreamJSerialComm.class);
private SerialPort sp;
private final SerialPort sp;
private final String port;
private final IncomingDataBuffer dataBuffer;
@ -99,4 +99,9 @@ public class SerialIoStreamJSerialComm extends AbstractIoStream {
// FileLog.LOGGER.info("[SerialIoStreamJSerialComm] opened " + port);
return new SerialIoStreamJSerialComm(serialPort, port);
}
@Override
public String toString() {
return port + " " + super.toString();
}
}