CAN parser: assert signals exist
sshane opened this issue · comments
Shane Smiskol commented
We already assert messages exist, but signals are unchecked. This was the cause of commaai/openpilot#28404, CRUISE_INACTIVE
inside SCC_CONTROL
doesn't exist, but it never complained or gave a warning before. @deanlee see any reason not to check signals too?
Code to reproduce:
from opendbc.can.parser import CANParser
cp = CANParser('hyundai_canfd', [("ANYTHING123", "SCC_CONTROL")], [("SCC_CONTROL", 50)], 2)
Shane Smiskol commented
Related to #500
Adeeb Shihadeh commented
This should absolutely have an assert.
Shane Smiskol commented
The signal option name is passed all the way to the cpp code, which only loops through the DBC signals to find any matches, it doesn't check it finds one
Lines 144 to 150 in e51a787