From 5d1d43545120e34166cffe60add40682b6dfcd81 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 20 Jun 2018 17:32:50 +1000 Subject: [PATCH] AP_Arming: add type-correctness for is-armed check Also, correct the constant we're testing against --- libraries/AP_Arming/AP_Arming.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Arming/AP_Arming.cpp b/libraries/AP_Arming/AP_Arming.cpp index 46ccea717c..d1817dd087 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -95,7 +95,7 @@ uint16_t AP_Arming::compass_magfield_expected() const bool AP_Arming::is_armed() { - return require == NONE || armed; + return (ArmingRequired)require.get() == NO || armed; } uint16_t AP_Arming::get_enabled_checks()