Style refactoring related to safety button

This commit is contained in:
Matthias Grob
2022-06-07 18:20:34 +02:00
committed by Igor Mišić
parent ce70b6f4ac
commit 44c4b8fa85
5 changed files with 13 additions and 21 deletions
+2 -3
View File
@@ -2298,12 +2298,11 @@ Commander::run()
}
/* safety button */
bool safety_updated = _safety.safetyButtonHandler();
const bool safety_changed = _safety.safetyButtonHandler();
_vehicle_status.safety_button_available = _safety.isButtonAvailable();
_vehicle_status.safety_off = _safety.isSafetyOff();
if (safety_updated) {
if (safety_changed) {
set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_MOTORCONTROL, _safety.isButtonAvailable(), _safety.isSafetyOff(),
_safety.isButtonAvailable(), _vehicle_status);