From d749fce37836ae65440956957cd149b77cb44811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 3 Feb 2021 11:04:38 -0300 Subject: [PATCH] AP_LandingGear: Simplify boolean expression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_LandingGear/AP_LandingGear.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_LandingGear/AP_LandingGear.cpp b/libraries/AP_LandingGear/AP_LandingGear.cpp index 1fede15971..680762575c 100644 --- a/libraries/AP_LandingGear/AP_LandingGear.cpp +++ b/libraries/AP_LandingGear/AP_LandingGear.cpp @@ -164,7 +164,7 @@ bool AP_LandingGear::deployed() if (_pin_deployed == -1) { return _deployed; } else { - return hal.gpio->read(_pin_deployed) == _pin_deployed_polarity ? true : false; + return hal.gpio->read(_pin_deployed) == _pin_deployed_polarity; } }