Skip to content

Commit df6a583

Browse files
author
Kamil Wierzbicki
committed
Fix PassThruConnect Flags for 11 bit CAN identifier
1 parent 0629774 commit df6a583

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

udsoncan/j2534.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def __init__(self, windll, rxid, txid):
6262
self.rxid = rxid.to_bytes(4, 'big')
6363
self.txid = txid.to_bytes(4, 'big')
6464
# Determine mode ID29 or ID11
65-
self.txConnectFlags = TxStatusFlag.ISO15765_CAN_ID_29.value if txid >> 11 else TxStatusFlag.ISO15765_CAN_ID_11.value
65+
# If CAN identifier length is 29 bit set the proper flag
66+
self.txConnectFlags = TxStatusFlag.ISO15765_CAN_ID_29.value if txid >> 11 else 0
6667
self.txFlags = self.txConnectFlags | TxStatusFlag.ISO15765_FRAME_PAD.value
6768

6869
self.logger = logging.getLogger()
@@ -357,7 +358,6 @@ class Filter(Enum):
357358
class TxStatusFlag(Enum):
358359
ISO15765_CAN_ID_BOTH = 0x00000800
359360
ISO15765_CAN_ID_29 = 0x00000100
360-
ISO15765_CAN_ID_11 = 0x00000040
361361
ISO15765_FRAME_PAD = 0x00000040
362362
WAIT_P3_MIN_ONLY = 0x00000200
363363
SW_CAN_HV_TX = 0x00000400 # OP2.0: Not supported

0 commit comments

Comments
 (0)