Dec-15-2020, 04:10 PM
(This post was last modified: Dec-15-2020, 04:10 PM by deanhystad.)
If I understand correctly, message.arbitration_id is an integer. 0x11ddcc08 is an integer. You can directly compare message.arbitration_id to 0x11ddcc08. You don't need to use hex() anywhere.
You can also do this:
You can also do this:
known_pid = [0x11ddcc08, 0x01ddcc08] # A list of all known PID if message.arbitration_id in known_pid: print (f'I know you 0x{message.arbitration_id:x}')