mirror of https://github.com/commaai/panda.git
parent
f4d0904d94
commit
fbe81a1753
|
@ -176,7 +176,9 @@ static int gm_tx_hook(CANPacket_t *to_send) {
|
|||
int desired_torque = ((GET_BYTE(to_send, 0) & 0x7U) << 8) + GET_BYTE(to_send, 1);
|
||||
desired_torque = to_signed(desired_torque, 11);
|
||||
|
||||
if (steer_torque_cmd_checks(desired_torque, -1, GM_STEERING_LIMITS)) {
|
||||
bool steer_req = (GET_BIT(to_send, 3U) != 0U);
|
||||
|
||||
if (steer_torque_cmd_checks(desired_torque, steer_req, GM_STEERING_LIMITS)) {
|
||||
tx = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ class TestGmSafetyBase(common.PandaSafetyTest, common.DriverTorqueSteeringSafety
|
|||
return self.packer.make_can_msg_panda("PSCMStatus", 0, values)
|
||||
|
||||
def _torque_cmd_msg(self, torque, steer_req=1):
|
||||
values = {"LKASteeringCmd": torque}
|
||||
values = {"LKASteeringCmd": torque, "LKASteeringCmdActive": steer_req}
|
||||
return self.packer.make_can_msg_panda("ASCMLKASteeringCmd", 0, values)
|
||||
|
||||
def _button_msg(self, buttons):
|
||||
|
|
Loading…
Reference in New Issue