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:
Mark Charlebois
2015-04-28 12:29:50 -07:00
parent 2446dfec16
commit 523a4aa785
+2 -1
View File
@@ -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;