commaai / opendbc

a Python API for your car
MIT License
1.96k stars 1.15k forks source link

Unit test for matching panda rate limits #1352

Open sshane opened 1 year ago

sshane commented 1 year ago

When the user overrides, panda expects the down rate is at least as high as the rate limit, but up needs to be under the limit. Add a test like in panda, but add user overriding. Would have caught mismatch in https://github.com/commaai/openpilot/pull/26934, or the panda PR that changed it, when bumped.

sshane commented 1 year ago

@adeebshihadeh do you think a good place for this is https://github.com/commaai/openpilot/blob/8d3e661f795260ebd708975105d98f1bdbbcf181/selfdrive/car/tests/test_models.py#L204 with fake actuators and driver torque?

Can start adding more cases like these for torque cars