From 71d8b15b73bbc5669f438f9a190dc683efbee1fb Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sun, 9 Jan 2022 19:51:43 -0500 Subject: [PATCH] commander: fix COM_HOME_EN missing case - VEHICLE_CMD_COMPONENT_ARM_DISARM is yet another path that calls set_home_position() --- src/modules/commander/Commander.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index 79a1f3defd..1c30058f38 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -1656,7 +1656,7 @@ Commander::set_home_position() // Need global and local position fix to be able to set home // but already set the home position in local coordinates if available // in case the global position is only valid after takeoff - if (_status_flags.condition_local_position_valid) { + if (_param_com_home_en.get() && _status_flags.condition_local_position_valid) { // Set home position in local coordinates const vehicle_local_position_s &lpos = _local_position_sub.get();