locationd: disable locationd temporary error alert on the body (#30608)

* Disable locationd temporary error alert on the body

* Disable locationd/paramsd/planner alerts on body with joystick mode

* joystick_enabled param not joystick_mode
old-commit-hash: 7f07f47302
chrysler-long2
Kacper Rączy 1 year ago committed by GitHub
parent 8c2f29dfb2
commit 9cf15f3c74
  1. 24
      selfdrive/controls/controlsd.py

@ -93,7 +93,8 @@ class Controls:
else:
self.CI, self.CP = CI, CI.CP
self.joystick_mode = self.params.get_bool("JoystickDebugMode") or self.CP.notCar
self.joystick_enabled = self.params.get_bool("JoystickDebugMode")
self.joystick_mode = self.joystick_enabled or self.CP.notCar
# set alternative experiences from parameters
self.disengage_on_accelerator = self.params.get_bool("DisengageOnAccelerator")
@ -370,16 +371,17 @@ class Controls:
else:
self.logged_comm_issue = None
if not self.sm['lateralPlan'].mpcSolutionValid:
self.events.add(EventName.plannerError)
if not self.sm['liveLocationKalman'].posenetOK:
self.events.add(EventName.posenetInvalid)
if not self.sm['liveLocationKalman'].deviceStable:
self.events.add(EventName.deviceFalling)
if not self.sm['liveLocationKalman'].inputsOK:
self.events.add(EventName.locationdTemporaryError)
if not self.sm['liveParameters'].valid and not TESTING_CLOSET and (not SIMULATION or REPLAY):
self.events.add(EventName.paramsdTemporaryError)
if not (self.CP.notCar and self.joystick_enabled):
if not self.sm['lateralPlan'].mpcSolutionValid:
self.events.add(EventName.plannerError)
if not self.sm['liveLocationKalman'].posenetOK:
self.events.add(EventName.posenetInvalid)
if not self.sm['liveLocationKalman'].deviceStable:
self.events.add(EventName.deviceFalling)
if not self.sm['liveLocationKalman'].inputsOK:
self.events.add(EventName.locationdTemporaryError)
if not self.sm['liveParameters'].valid and not TESTING_CLOSET and (not SIMULATION or REPLAY):
self.events.add(EventName.paramsdTemporaryError)
# conservative HW alert. if the data or frequency are off, locationd will throw an error
if any((self.sm.frame - self.sm.rcv_frame[s])*DT_CTRL > 10. for s in self.sensor_packets):

Loading…
Cancel
Save