minor logging progress
This commit is contained in:
parent
83c43cb8df
commit
a22a4ce9df
|
@ -101,9 +101,10 @@ public class PCanIoStream extends AbstractIoStream {
|
|||
TPCANStatus status = can.Read(CHANNEL, rx, null);
|
||||
if (status == TPCANStatus.PCAN_ERROR_OK) {
|
||||
if (log.debugEnabled())
|
||||
log.debug("Got [" + rx + "] id=" + rx.getID() + " len=" + rx.getLength() + ": " + IoStream.printByteArray(rx.getData()));
|
||||
log.debug("Got [" + rx + "] id=" + String.format("%X", rx.getID()) + " len=" + rx.getLength() + ": " + IoStream.printByteArray(rx.getData()));
|
||||
if (rx.getID() != CAN_ECU_SERIAL_TX_ID) {
|
||||
log.info("Skipping non " + CAN_ECU_SERIAL_TX_ID + " packet");
|
||||
// if (log.debugEnabled())
|
||||
log.info("Skipping non " + String.format("%X", CAN_ECU_SERIAL_TX_ID) + " packet: " + String.format("%X", rx.getID()));
|
||||
return;
|
||||
}
|
||||
byte[] decode = canDecoder.decodePacket(rx.getData());
|
||||
|
|
|
@ -103,10 +103,10 @@ public class SocketCANIoStream extends AbstractIoStream {
|
|||
try {
|
||||
CanFrame rx = socket.read();
|
||||
if (log.debugEnabled())
|
||||
log.debug("GOT " + rx);
|
||||
log.debug("GOT " + String.format("%X", rx));
|
||||
if (rx.getId() != CAN_ECU_SERIAL_TX_ID) {
|
||||
if (log.debugEnabled())
|
||||
log.debug("Skipping non " + CAN_ECU_SERIAL_TX_ID + " packet");
|
||||
log.debug("Skipping non " + String.format("%X", CAN_ECU_SERIAL_TX_ID) + " packet: " + String.format("%X", rx.getId()));
|
||||
return;
|
||||
}
|
||||
byte[] raw = new byte[rx.getDataLength()];
|
||||
|
|
|
@ -64,6 +64,7 @@ public class BinaryProtocolProxy {
|
|||
while (!targetEcu.isClosed()) {
|
||||
byte firstByte = clientStream.getDataBuffer().readByte(timeoutMs);
|
||||
if (firstByte == Fields.TS_GET_PROTOCOL_VERSION_COMMAND_F) {
|
||||
log.info("Responding to GET_PROTOCOL_VERSION with " + TS_PROTOCOL);
|
||||
clientStream.write(TS_PROTOCOL.getBytes());
|
||||
clientStream.flush();
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue