mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-24 18:53:53 +08:00
Toyota: same standstill check as panda (#25570)
* Same standstill check as panda * test honda in the same place * bump panda * bump panda * bump panda * bump to master * bump panda
This commit is contained in:
2
panda
2
panda
Submodule panda updated: 1776165a3d...6d2e2bde86
@@ -234,6 +234,9 @@ class TestCarModelBase(unittest.TestCase):
|
||||
|
||||
checks['gasPressed'] += CS.gasPressed != self.safety.get_gas_pressed_prev()
|
||||
checks['cruiseState'] += CS.cruiseState.enabled and not CS.cruiseState.available
|
||||
if self.CP.carName in ("honda", "toyota"):
|
||||
# TODO: fix standstill mismatches for other makes
|
||||
checks['standstill'] += CS.standstill == self.safety.get_vehicle_moving()
|
||||
|
||||
# TODO: remove this exception once this mismatch is resolved
|
||||
brake_pressed = CS.brakePressed
|
||||
@@ -263,8 +266,6 @@ class TestCarModelBase(unittest.TestCase):
|
||||
|
||||
if self.CP.carName == "honda":
|
||||
checks['mainOn'] += CS.cruiseState.available != self.safety.get_acc_main_on()
|
||||
# TODO: fix standstill mismatches for other makes
|
||||
checks['standstill'] += CS.standstill == self.safety.get_vehicle_moving()
|
||||
|
||||
CS_prev = CS
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class CarState(CarStateBase):
|
||||
ret.vEgoRaw = mean([ret.wheelSpeeds.fl, ret.wheelSpeeds.fr, ret.wheelSpeeds.rl, ret.wheelSpeeds.rr])
|
||||
ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw)
|
||||
|
||||
ret.standstill = ret.vEgoRaw < 0.001
|
||||
ret.standstill = ret.vEgoRaw == 0
|
||||
|
||||
ret.steeringAngleDeg = cp.vl["STEER_ANGLE_SENSOR"]["STEER_ANGLE"] + cp.vl["STEER_ANGLE_SENSOR"]["STEER_FRACTION"]
|
||||
torque_sensor_angle_deg = cp.vl["STEER_TORQUE_SENSOR"]["STEER_ANGLE"]
|
||||
|
||||
Reference in New Issue
Block a user