mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-05 06:03:02 +08:00
Clang warning fix
Clang build fails due to -Werr and warning on use of if (!condition != other_condition && some_condition) Clang wants to be clear that the initial '!' wasn't intended for the whole expression. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include <px4_time.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
@@ -546,7 +547,7 @@ bool handle_command(struct vehicle_status_s *status_local, const struct safety_s
|
||||
else {
|
||||
|
||||
// Refuse to arm if preflight checks have failed
|
||||
if (!status.hil_state != vehicle_status_s::HIL_STATE_ON && !status.condition_system_sensors_initialized) {
|
||||
if ((!status.hil_state) != vehicle_status_s::HIL_STATE_ON && !status.condition_system_sensors_initialized) {
|
||||
mavlink_log_critical(mavlink_fd, "Arming DENIED. Preflight checks have failed.");
|
||||
cmd_result = VEHICLE_CMD_RESULT_DENIED;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user