You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Toyota, the PCM status message (PCM_CRUISE) also has the gas pressed bit, so if you for example change some code that should fail a test:
if (!cruise_engaged) {
controls_allowed=0;
}
to
if (!cruise_engaged) {
controls_allowed=1;
}
it passes, as generic_rx_checks thinks the gas is pressed and just sets controls_allowed to zero for you.
I also had to be careful in the Bolt camera harness PR which has gas and PCM cruise in the same message: #962
I think the real solution here would be to have tests that only ensure that each safety model sets all required global variables correctly, then we have one test that tests all the behavior (that's independent of all the car safety models).
I'm just not sure if it would be considered a regression to our testing, as now we test fully end to end (CAN message to behavior). This proposal would test CAN message to setting variables/some safety state, then the safety state to safety behavior and enforcement.
The text was updated successfully, but these errors were encountered:
sshane
changed the title
Toyota: PCM cruise enabled test not running
Tests don't run correctly if PCM and gas are in same message
Aug 12, 2022
On Toyota, the PCM status message (
PCM_CRUISE
) also has the gas pressed bit, so if you for example change some code that should fail a test:to
it passes, as
generic_rx_checks
thinks the gas is pressed and just sets controls_allowed to zero for you.I also had to be careful in the Bolt camera harness PR which has gas and PCM cruise in the same message: #962
I think the real solution here would be to have tests that only ensure that each safety model sets all required global variables correctly, then we have one test that tests all the behavior (that's independent of all the car safety models).
I'm just not sure if it would be considered a regression to our testing, as now we test fully end to end (CAN message to behavior). This proposal would test CAN message to setting variables/some safety state, then the safety state to safety behavior and enforcement.
The text was updated successfully, but these errors were encountered: