mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 07:13:34 +08:00
commander: handle_command: do not filter command if componentid == 0
This commit is contained in:
@@ -396,7 +396,7 @@ bool handle_command(struct vehicle_status_s *status, const struct safety_s *safe
|
|||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
/* only handle commands that are meant to be handled by this system and component */
|
/* only handle commands that are meant to be handled by this system and component */
|
||||||
if (cmd->target_system != status->system_id || cmd->target_component != status->component_id) {
|
if (cmd->target_system != status->system_id || ((cmd->target_component != status->component_id) && (cmd->target_component != 0))) { // component_id 0: valid for all components
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user