mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 14:21:36 +08:00
vmount: remove mavlink dependency
Let's just hardcode 0 because we don't want to include the mavlink headers just for this.
This commit is contained in:
@@ -230,10 +230,10 @@ int InputMavlinkCmdMount::update_impl(unsigned int timeout_ms, ControlData **con
|
|||||||
vehicle_command_s vehicle_command;
|
vehicle_command_s vehicle_command;
|
||||||
orb_copy(ORB_ID(vehicle_command), _vehicle_command_sub, &vehicle_command);
|
orb_copy(ORB_ID(vehicle_command), _vehicle_command_sub, &vehicle_command);
|
||||||
|
|
||||||
// Process only if the command is for us or for anyone.
|
// Process only if the command is for us or for anyone (component id 0).
|
||||||
const bool sysid_correct = (vehicle_command.target_system == _mav_sys_id);
|
const bool sysid_correct = (vehicle_command.target_system == _mav_sys_id);
|
||||||
const bool compid_correct = ((vehicle_command.target_component == _mav_comp_id) ||
|
const bool compid_correct = ((vehicle_command.target_component == _mav_comp_id) ||
|
||||||
(vehicle_command.target_component == MAV_COMP_ID_ALL));
|
(vehicle_command.target_component == 0));
|
||||||
|
|
||||||
if (!sysid_correct || !compid_correct) {
|
if (!sysid_correct || !compid_correct) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user