VW MQB: Check steer req bit (#1631)

vq mqb
This commit is contained in:
Justin Newberry 2023-09-01 16:32:08 -07:00 committed by GitHub
parent 62bb0c2e33
commit 72f1603a89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -223,7 +223,9 @@ static int volkswagen_mqb_tx_hook(CANPacket_t *to_send) {
desired_torque *= -1;
}
if (steer_torque_cmd_checks(desired_torque, -1, VOLKSWAGEN_MQB_STEERING_LIMITS)) {
bool steer_req = GET_BIT(to_send, 30U) != 0U;
if (steer_torque_cmd_checks(desired_torque, steer_req, VOLKSWAGEN_MQB_STEERING_LIMITS)) {
tx = 0;
}
}

View File

@ -85,7 +85,7 @@ class TestVolkswagenMqbSafety(common.PandaSafetyTest, common.DriverTorqueSteerin
# openpilot steering output torque
def _torque_cmd_msg(self, torque, steer_req=1):
values = {"HCA_01_LM_Offset": abs(torque), "HCA_01_LM_OffSign": torque < 0}
values = {"HCA_01_LM_Offset": abs(torque), "HCA_01_LM_OffSign": torque < 0, "HCA_01_Sendestatus": steer_req}
return self.packer.make_can_msg_panda("HCA_01", 0, values)
# Cruise control buttons