From c4bb6b53e8ed106f8f83182846e6ce239af5debc Mon Sep 17 00:00:00 2001 From: Timothy Scott Date: Fri, 3 May 2019 09:38:47 +0200 Subject: [PATCH] Changed soft stop check --- src/modules/commander/Commander.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index 0d0e712bd2d8..496558e4e36c 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -1668,10 +1668,10 @@ Commander::run() status_changed = true; } - const bool is_not_rotary_wing = (status.vehicle_type != vehicle_status_s::VEHICLE_TYPE_ROTARY_WING); + const bool should_soft_stop = (status.vehicle_type != vehicle_status_s::VEHICLE_TYPE_ROTARY_WING); - if (armed.soft_stop != is_not_rotary_wing) { - armed.soft_stop = status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING; + if (armed.soft_stop != should_soft_stop) { + armed.soft_stop = should_soft_stop; status_changed = true; } }