calibrationd: add offroad alert when remount detected (#28073)

* calibrationd: add offroad alert for recalibration

* Update common/params.cc
pull/28199/head
Adeeb Shihadeh 2 years ago committed by GitHub
parent 8ca3be9788
commit c192c92a4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      common/params.cc
  2. 1
      selfdrive/controls/controlsd.py
  3. 4
      selfdrive/controls/lib/alerts_offroad.json

@ -202,6 +202,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"Offroad_TemperatureTooHigh", CLEAR_ON_MANAGER_START}, {"Offroad_TemperatureTooHigh", CLEAR_ON_MANAGER_START},
{"Offroad_UnofficialHardware", CLEAR_ON_MANAGER_START}, {"Offroad_UnofficialHardware", CLEAR_ON_MANAGER_START},
{"Offroad_UpdateFailed", CLEAR_ON_MANAGER_START}, {"Offroad_UpdateFailed", CLEAR_ON_MANAGER_START},
{"Offroad_Recalibration", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
}; };
} // namespace } // namespace

@ -286,6 +286,7 @@ class Controls:
if cal_status == log.LiveCalibrationData.Status.uncalibrated: if cal_status == log.LiveCalibrationData.Status.uncalibrated:
self.events.add(EventName.calibrationIncomplete) self.events.add(EventName.calibrationIncomplete)
elif cal_status == log.LiveCalibrationData.Status.recalibrating: elif cal_status == log.LiveCalibrationData.Status.recalibrating:
set_offroad_alert("Offroad_Recalibration", True)
self.events.add(EventName.calibrationRecalibrating) self.events.add(EventName.calibrationRecalibrating)
else: else:
self.events.add(EventName.calibrationInvalid) self.events.add(EventName.calibrationInvalid)

@ -48,5 +48,9 @@
"Offroad_NoFirmware": { "Offroad_NoFirmware": {
"text": "openpilot was unable to identify your car. Check integrity of cables and ensure all connections are secure, particularly that the comma power is fully inserted in the OBD-II port of the vehicle. Need help? Join discord.comma.ai.", "text": "openpilot was unable to identify your car. Check integrity of cables and ensure all connections are secure, particularly that the comma power is fully inserted in the OBD-II port of the vehicle. Need help? Join discord.comma.ai.",
"severity": 0 "severity": 0
},
"Offroad_Recalibration": {
"text": "openpilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield.",
"severity": 0
} }
} }

Loading…
Cancel
Save