mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-23 11:46:37 +08:00
stop ignoring Wmissing-field-initializers and fix (#9912)
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_tasks.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -563,16 +564,12 @@ pthread_addr_t UavcanServers::run(pthread_addr_t)
|
||||
}
|
||||
|
||||
// Acknowledge the received command
|
||||
struct vehicle_command_ack_s ack = {
|
||||
.timestamp = 0,
|
||||
.result_param2 = 0,
|
||||
.command = cmd.command,
|
||||
.result = cmd_ack_result,
|
||||
.from_external = false,
|
||||
.result_param1 = 0,
|
||||
.target_system = cmd.source_system,
|
||||
.target_component = cmd.source_component
|
||||
};
|
||||
vehicle_command_ack_s ack = {};
|
||||
ack.timestamp = hrt_absolute_time();
|
||||
ack.command = cmd.command;
|
||||
ack.result = cmd_ack_result;
|
||||
ack.target_system = cmd.source_system;
|
||||
ack.target_component = cmd.source_component;
|
||||
|
||||
if (_command_ack_pub == nullptr) {
|
||||
_command_ack_pub = orb_advertise_queue(ORB_ID(vehicle_command_ack), &ack, vehicle_command_ack_s::ORB_QUEUE_LENGTH);
|
||||
|
||||
Reference in New Issue
Block a user