mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 10:40:35 +08:00
Style refactoring related to safety button
This commit is contained in:
committed by
Igor Mišić
parent
ce70b6f4ac
commit
44c4b8fa85
@@ -42,9 +42,7 @@ using namespace time_literals;
|
||||
|
||||
Safety::Safety()
|
||||
{
|
||||
/*
|
||||
* Safety can be turned off with the CBRK_IO_SAFETY parameter.
|
||||
*/
|
||||
// Safety can be turned off with the CBRK_IO_SAFETY parameter.
|
||||
_safety_disabled = circuit_breaker_enabled("CBRK_IO_SAFETY", CBRK_IO_SAFETY_KEY);
|
||||
}
|
||||
|
||||
@@ -67,10 +65,8 @@ bool Safety::safetyButtonHandler()
|
||||
}
|
||||
}
|
||||
|
||||
bool safety_changed = _previous_safety_off != _safety_off;
|
||||
|
||||
const bool safety_changed = _previous_safety_off != _safety_off;
|
||||
_previous_safety_off = _safety_off;
|
||||
|
||||
return safety_changed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user