questionable work-around
This commit is contained in:
rusefillc 2022-07-22 07:21:35 -04:00
parent 50dc7459d4
commit 2a7cfbf3f5
2 changed files with 9 additions and 1 deletions

View File

@ -97,7 +97,9 @@ public class PCanIoStream extends AbstractIoStream {
private void readOnePacket(DataListener listener) {
// todo: can we reuse instance?
TPCANMsg rx = new TPCANMsg();
// todo: should be? TPCANMsg rx = new TPCANMsg();
// https://github.com/rusefi/rusefi/issues/4370 nasty work-around
TPCANMsg rx = new TPCANMsg((byte) 255);
TPCANStatus status = can.Read(CHANNEL, rx, null);
if (status == TPCANStatus.PCAN_ERROR_OK) {
if (log.debugEnabled())

View File

@ -69,6 +69,12 @@ public class TPCANMsg implements Cloneable
_data = new byte[8];
}
// rusEFI custom https://github.com/rusefi/rusefi/issues/4370 workaround
public TPCANMsg(byte length)
{
_data = new byte[length];
}
/**
* Constructs a new message object.
* @param id the message id