mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
clang-tidy readability-simplify-boolean-expr
This commit is contained in:
@@ -351,12 +351,7 @@ bool is_safe(const struct safety_s *safety, const struct actuator_armed_s *armed
|
||||
// 3) Safety switch is present AND engaged -> actuators locked
|
||||
const bool lockdown = (armed->lockdown || armed->manual_lockdown);
|
||||
|
||||
if (!armed->armed || (armed->armed && lockdown) || (safety->safety_switch_available && !safety->safety_off)) {
|
||||
return true;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return !armed->armed || (armed->armed && lockdown) || (safety->safety_switch_available && !safety->safety_off);
|
||||
}
|
||||
|
||||
transition_result_t
|
||||
|
||||
Reference in New Issue
Block a user