mirror of
https://github.com/infiniteCable2/opendbc.git
synced 2026-02-18 13:03:52 +08:00
VW PQ: Update HCA Status to use Mode 2 (Status 7) (#2722)
* VW PQ: Update HCA Status to use Mode 2 (Status 7) * VW PQ: update PQ safety test to use HCA status 7 --------- Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@ def create_steering_control(packer, bus, apply_torque, lkas_enabled):
|
||||
values = {
|
||||
"LM_Offset": abs(apply_torque),
|
||||
"LM_OffSign": 1 if apply_torque < 0 else 0,
|
||||
"HCA_Status": 5 if (lkas_enabled and apply_torque != 0) else 3,
|
||||
"HCA_Status": 7 if (lkas_enabled and apply_torque != 0) else 3,
|
||||
"Vib_Freq": 16,
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class TestVolkswagenPqSafetyBase(common.CarSafetyTest, common.DriverTorqueSteeri
|
||||
return self.packer.make_can_msg_safety("Lenkhilfe_3", 0, values)
|
||||
|
||||
# openpilot steering output torque
|
||||
def _torque_cmd_msg(self, torque, steer_req=1, hca_status=5):
|
||||
def _torque_cmd_msg(self, torque, steer_req=1, hca_status=7):
|
||||
values = {"LM_Offset": abs(torque), "LM_OffSign": torque < 0, "HCA_Status": hca_status if steer_req else 3}
|
||||
return self.packer.make_can_msg_safety("HCA_1", 0, values)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user