Skip to content

Commit

Permalink
commander: fix COM_HOME_EN missing case
Browse files Browse the repository at this point in the history
 - VEHICLE_CMD_COMPONENT_ARM_DISARM is yet another path that calls set_home_position()
  • Loading branch information
dagar committed Jan 10, 2022
1 parent 0b1402a commit 71d8b15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/commander/Commander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 71d8b15

Please sign in to comment.