mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-27 00:42:05 +08:00
Subaru: match panda standstill (#25789)
* subaru: match panda standstill * subaru: match panda standstill * actually test standstill * bump panda to master
This commit is contained in:
+1
-1
Submodule panda updated: 19983f13b3...f120999e19
@@ -32,9 +32,8 @@ class CarState(CarStateBase):
|
||||
cp_wheels.vl["Wheel_Speeds"]["RR"],
|
||||
)
|
||||
ret.vEgoRaw = (ret.wheelSpeeds.fl + ret.wheelSpeeds.fr + ret.wheelSpeeds.rl + ret.wheelSpeeds.rr) / 4.
|
||||
# Kalman filter, even though Subaru raw wheel speed is heaviliy filtered by default
|
||||
ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw)
|
||||
ret.standstill = ret.vEgoRaw < 0.01
|
||||
ret.standstill = ret.vEgoRaw == 0
|
||||
|
||||
# continuous blinker signals for assisted lane change
|
||||
ret.leftBlinker, ret.rightBlinker = self.update_blinker_from_lamp(50, cp.vl["Dashlights"]["LEFT_BLINKER"],
|
||||
@@ -50,7 +49,7 @@ class CarState(CarStateBase):
|
||||
ret.steeringAngleDeg = cp.vl["Steering_Torque"]["Steering_Angle"]
|
||||
ret.steeringTorque = cp.vl["Steering_Torque"]["Steer_Torque_Sensor"]
|
||||
ret.steeringTorqueEps = cp.vl["Steering_Torque"]["Steer_Torque_Output"]
|
||||
|
||||
|
||||
steer_threshold = 75 if self.CP.carFingerprint in PREGLOBAL_CARS else 80
|
||||
ret.steeringPressed = abs(ret.steeringTorque) > steer_threshold
|
||||
|
||||
@@ -313,4 +312,4 @@ class CarState(CarStateBase):
|
||||
checks += CarState.get_global_es_distance_signals()[1]
|
||||
return CANParser(DBC[CP.carFingerprint]["pt"], signals, checks, 1)
|
||||
|
||||
return None
|
||||
return None
|
||||
|
||||
@@ -194,7 +194,7 @@ routes = [
|
||||
CarTestRoute("c321c6b697c5a5ff|2020-06-23--11-04-33", SUBARU.FORESTER),
|
||||
CarTestRoute("791340bc01ed993d|2019-03-10--16-28-08", SUBARU.IMPREZA),
|
||||
CarTestRoute("8bf7e79a3ce64055|2021-05-24--09-36-27", SUBARU.IMPREZA_2020),
|
||||
CarTestRoute("1bbe6bf2d62f58a8|2022-07-14--17-11-43", SUBARU.OUTBACK, segment=3),
|
||||
CarTestRoute("1bbe6bf2d62f58a8|2022-07-14--17-11-43", SUBARU.OUTBACK, segment=10),
|
||||
CarTestRoute("c56e69bbc74b8fad|2022-08-18--09-43-51", SUBARU.LEGACY, segment=3),
|
||||
# Pre-global, dashcam
|
||||
CarTestRoute("95441c38ae8c130e|2020-06-08--12-10-17", SUBARU.FORESTER_PREGLOBAL),
|
||||
|
||||
@@ -234,7 +234,7 @@ 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 not in ("hyundai", "volkswagen", "subaru", "gm", "body"):
|
||||
if self.CP.carName not in ("hyundai", "volkswagen", "gm", "body"):
|
||||
# TODO: fix standstill mismatches for other makes
|
||||
checks['standstill'] += CS.standstill == self.safety.get_vehicle_moving()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user