I have a discovery board which does not switch to DFU #3280
better logging
This commit is contained in:
parent
114ce78353
commit
3ae5912f28
|
@ -21,7 +21,7 @@ public class DfuHelper {
|
||||||
try {
|
try {
|
||||||
stream.sendPacket(command);
|
stream.sendPacket(command);
|
||||||
stream.close();
|
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) {
|
} catch (IOException e) {
|
||||||
messages.append("Error " + e);
|
messages.append("Error " + e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ import static com.devexperts.logging.Logging.getLogging;
|
||||||
*/
|
*/
|
||||||
public class SerialIoStreamJSerialComm extends AbstractIoStream {
|
public class SerialIoStreamJSerialComm extends AbstractIoStream {
|
||||||
private static final Logging log = getLogging(SerialIoStreamJSerialComm.class);
|
private static final Logging log = getLogging(SerialIoStreamJSerialComm.class);
|
||||||
private SerialPort sp;
|
private final SerialPort sp;
|
||||||
private final String port;
|
private final String port;
|
||||||
private final IncomingDataBuffer dataBuffer;
|
private final IncomingDataBuffer dataBuffer;
|
||||||
|
|
||||||
|
@ -99,4 +99,9 @@ public class SerialIoStreamJSerialComm extends AbstractIoStream {
|
||||||
// FileLog.LOGGER.info("[SerialIoStreamJSerialComm] opened " + port);
|
// FileLog.LOGGER.info("[SerialIoStreamJSerialComm] opened " + port);
|
||||||
return new SerialIoStreamJSerialComm(serialPort, port);
|
return new SerialIoStreamJSerialComm(serialPort, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return port + " " + super.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue