mirror of https://github.com/commaai/panda.git
driver torque limit: make driver torque message abstract (#1377)
* abs * uncomment * fixy
This commit is contained in:
parent
99809f7071
commit
63db708491
|
@ -334,6 +334,10 @@ class DriverTorqueSteeringSafetyTest(TorqueSteeringSafetyTestBase, abc.ABC):
|
|||
cls.safety = None
|
||||
raise unittest.SkipTest
|
||||
|
||||
@abc.abstractmethod
|
||||
def _torque_driver_msg(self, torque):
|
||||
pass
|
||||
|
||||
def test_non_realtime_limit_up(self):
|
||||
self.safety.set_torque_driver(0, 0)
|
||||
super().test_non_realtime_limit_up()
|
||||
|
|
|
@ -35,9 +35,9 @@ class TestMazdaSafety(common.PandaSafetyTest, common.DriverTorqueSteeringSafetyT
|
|||
values = {"STEER_TORQUE_MOTOR": torque}
|
||||
return self.packer.make_can_msg_panda("STEER_TORQUE", 0, values)
|
||||
|
||||
# def _torque_driver_msg(self, torque):
|
||||
# values = {"STEER_TORQUE_DRIVER": torque}
|
||||
# return self.packer.make_can_msg_panda("STEER_TORQUE", 0, values)
|
||||
def _torque_driver_msg(self, torque):
|
||||
values = {"STEER_TORQUE_SENSOR": torque}
|
||||
return self.packer.make_can_msg_panda("STEER_TORQUE", 0, values)
|
||||
|
||||
def _torque_cmd_msg(self, torque, steer_req=1):
|
||||
values = {"LKAS_REQUEST": torque}
|
||||
|
|
Loading…
Reference in New Issue