add 'remount device' to permanent calibration invalid alert (#27407)

pull/27408/head
Adeeb Shihadeh 3 years ago committed by GitHub
parent dff054d4df
commit ea419c5764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/controls/lib/events.py

@ -292,7 +292,7 @@ def calibration_invalid_alert(CP: car.CarParams, CS: car.CarState, sm: messaging
rpy = sm['liveCalibration'].rpyCalib
yaw = math.degrees(rpy[2] if len(rpy) == 3 else math.nan)
pitch = math.degrees(rpy[1] if len(rpy) == 3 else math.nan)
angles = f"Pitch: {pitch:.1f}°, Yaw: {yaw:.1f}°"
angles = f"Remount Device (Pitch: {pitch:.1f}°, Yaw: {yaw:.1f}°)"
return NormalPermanentAlert("Calibration Invalid", angles)

Loading…
Cancel
Save