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

* calibrationd: add offroad alert for recalibration

* Update common/params.cc
This commit is contained in:
Adeeb Shihadeh
2023-05-15 13:10:36 -07:00
committed by GitHub
parent 8ca3be9788
commit c192c92a4e
3 changed files with 6 additions and 0 deletions

View File

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

View File

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

View File

@@ -48,5 +48,9 @@
"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.",
"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
}
}