Fix PassThruConnect Flags for 11 bit CAN identifier#288
Fix PassThruConnect Flags for 11 bit CAN identifier#288kamilwierzbicki wants to merge 1 commit intopylessard:masterfrom
Conversation
|
Not sure changing the definition of the constant is a proper fix. Should be zeroed at the usage point. Also, does this limitation apply to your use case only or all use case? |
|
Then why do you change the constant value to 0? |
|
This constant contains the value that needs to be set to get 11 bit CAN identifier. According to specification bit 8 specifies the CAN identifier length. If the CAN identifier is 29 bit then bit 8 should be set (0x400). Otherwise it should be cleared (0x000). This constant value can be deleted at all but I left it to keep it more readable. |
No. Should be cleared only 8 bit. BUT i think better if const ISO15765_CAN_ID_11 will be deleted. self.txConnectFlags = 0
# Determine mode ID29 or ID11
if txid >> 11:
self.txConnectFlags |= TxStatusFlag.ISO15765_CAN_ID_29.value
self.txFlags = self.txConnectFlags | TxStatusFlag.ISO15765_FRAME_PAD.value |
|
@kirya-dev : It sure feels like adding the 29 bits flag if required makes more sense. |
I see topic start from another problem - bit 6 should be zerowed. No related with ID len. Related with FRAME_PAD flag. |
27af056 to
df6a583
Compare
|
Updated according to your comments. |
|
@kirya-dev : I still find this PR weird. Will follow your call for merge. |
|
I can approve condition style shown in my message above. |
Yes. Problem verifies when I using Autel VCMI with 11bit CAN_ID. This PR should fixit. |
|
I think will be better align with standard. https://docs.rs/j2534/latest/src/j2534/lib.rs.html#603-775 There is no constant ISO15765_CAN_ID_11. |

Issue: #287
Some of the PassThru devices report an error when an invalid bit is set in the flags parameter.
Currently the bit 6 is set but it should be zeroed.