mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-21 16:23:50 +08:00
openpilot v0.8.3 release
This commit is contained in:
+4
-3
@@ -486,13 +486,14 @@ class IsoTpMessage():
|
||||
|
||||
FUNCTIONAL_ADDRS = [0x7DF, 0x18DB33F1]
|
||||
|
||||
def get_rx_addr_for_tx_addr(tx_addr):
|
||||
def get_rx_addr_for_tx_addr(tx_addr, rx_offset=0x8):
|
||||
if tx_addr in FUNCTIONAL_ADDRS:
|
||||
return None
|
||||
|
||||
if tx_addr < 0xFFF8:
|
||||
# standard 11 bit response addr (add 8)
|
||||
return tx_addr + 8
|
||||
# pseudo-standard 11 bit response addr (add 8) works for most manufacturers
|
||||
# allow override; some manufacturers use other offsets for non-OBD2 access
|
||||
return tx_addr + rx_offset
|
||||
|
||||
if tx_addr > 0x10000000 and tx_addr < 0xFFFFFFFF:
|
||||
# standard 29 bit response addr (flip last two bytes)
|
||||
|
||||
Reference in New Issue
Block a user