mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 05:03:34 +08:00
vehicle_command commands are uint16, not uint32
This commit is contained in:
@@ -4149,7 +4149,7 @@ void answer_command(struct vehicle_command_s &cmd, unsigned result,
|
||||
.result_param2 = 0,
|
||||
.command = cmd.command,
|
||||
.result = (uint8_t)result,
|
||||
.from_external = 0,
|
||||
.from_external = false,
|
||||
.result_param1 = 0,
|
||||
.target_system = cmd.source_system,
|
||||
.target_component = cmd.source_component
|
||||
|
||||
@@ -174,7 +174,7 @@ void SendEvent::answer_command(const vehicle_command_s &cmd, unsigned result)
|
||||
.result_param2 = 0,
|
||||
.command = cmd.command,
|
||||
.result = (uint8_t)result,
|
||||
.from_external = 0,
|
||||
.from_external = false,
|
||||
.result_param1 = 0,
|
||||
.target_system = cmd.source_system,
|
||||
.target_component = cmd.source_component
|
||||
|
||||
@@ -2012,7 +2012,7 @@ void Logger::ack_vehicle_command(orb_advert_t &vehicle_command_ack_pub, vehicle_
|
||||
.result_param2 = 0,
|
||||
.command = cmd->command,
|
||||
.result = (uint8_t)result,
|
||||
.from_external = 0,
|
||||
.from_external = false,
|
||||
.result_param1 = 0,
|
||||
.target_system = cmd->source_system,
|
||||
.target_component = cmd->source_component
|
||||
|
||||
@@ -498,7 +498,7 @@ MavlinkReceiver::handle_message_command_long(mavlink_message_t *msg)
|
||||
.source_system = msg->sysid,
|
||||
.source_component = msg->compid,
|
||||
.confirmation = cmd_mavlink.confirmation,
|
||||
.from_external = 1
|
||||
.from_external = true
|
||||
};
|
||||
|
||||
if (_cmd_pub == nullptr) {
|
||||
@@ -517,7 +517,7 @@ out:
|
||||
.result_param2 = 0,
|
||||
.command = cmd_mavlink.command,
|
||||
.result = (ret == PX4_OK ? vehicle_command_ack_s::VEHICLE_RESULT_ACCEPTED : vehicle_command_ack_s::VEHICLE_RESULT_FAILED),
|
||||
.from_external = 0,
|
||||
.from_external = false,
|
||||
.result_param1 = 0,
|
||||
.target_system = msg->sysid,
|
||||
.target_component = msg->compid
|
||||
@@ -595,7 +595,7 @@ MavlinkReceiver::handle_message_command_int(mavlink_message_t *msg)
|
||||
.source_system = msg->sysid,
|
||||
.source_component = msg->compid,
|
||||
.confirmation = 0,
|
||||
.from_external = 1
|
||||
.from_external = true
|
||||
};
|
||||
|
||||
if (_cmd_pub == nullptr) {
|
||||
@@ -614,7 +614,7 @@ out:
|
||||
.result_param2 = 0,
|
||||
.command = cmd_mavlink.command,
|
||||
.result = (ret == PX4_OK ? vehicle_command_ack_s::VEHICLE_RESULT_ACCEPTED : vehicle_command_ack_s::VEHICLE_RESULT_FAILED),
|
||||
.from_external = 0,
|
||||
.from_external = false,
|
||||
.result_param1 = 0,
|
||||
.target_system = msg->sysid,
|
||||
.target_component = msg->compid
|
||||
@@ -643,7 +643,7 @@ MavlinkReceiver::handle_message_command_ack(mavlink_message_t *msg)
|
||||
.result_param2 = ack.result_param2,
|
||||
.command = ack.command,
|
||||
.result = ack.result,
|
||||
.from_external = 1,
|
||||
.from_external = true,
|
||||
.result_param1 = ack.progress,
|
||||
.target_system = ack.target_system,
|
||||
.target_component = ack.target_component
|
||||
@@ -802,7 +802,7 @@ MavlinkReceiver::handle_message_set_mode(mavlink_message_t *msg)
|
||||
.source_system = msg->sysid,
|
||||
.source_component = msg->compid,
|
||||
.confirmation = 1,
|
||||
.from_external = 1
|
||||
.from_external = true
|
||||
};
|
||||
|
||||
if (_cmd_pub == nullptr) {
|
||||
|
||||
@@ -411,7 +411,7 @@ void VotedSensorsUpdate::parameters_update()
|
||||
}
|
||||
|
||||
int topic_device_id = report.device_id;
|
||||
bool is_external = (bool)report.is_external;
|
||||
bool is_external = report.is_external;
|
||||
_mag_device_id[topic_instance] = topic_device_id;
|
||||
|
||||
// find the driver handle that matches the topic_device_id
|
||||
|
||||
@@ -570,7 +570,7 @@ pthread_addr_t UavcanServers::run(pthread_addr_t)
|
||||
.result_param2 = 0,
|
||||
.command = cmd.command,
|
||||
.result = cmd_ack_result,
|
||||
.from_external = 0,
|
||||
.from_external = false,
|
||||
.result_param1 = 0,
|
||||
.target_system = cmd.source_system,
|
||||
.target_component = cmd.source_component
|
||||
|
||||
Reference in New Issue
Block a user