mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-05 14:17:20 +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 <px4_time.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -546,7 +547,7 @@ bool handle_command(struct vehicle_status_s *status_local, const struct safety_s
|
|||||||
else {
|
else {
|
||||||
|
|
||||||
// Refuse to arm if preflight checks have failed
|
// 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.");
|
mavlink_log_critical(mavlink_fd, "Arming DENIED. Preflight checks have failed.");
|
||||||
cmd_result = VEHICLE_CMD_RESULT_DENIED;
|
cmd_result = VEHICLE_CMD_RESULT_DENIED;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user