@ -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 ) :