stop ignoring Wmissing-field-initializers and fix (#9912)

This commit is contained in:
Daniel Agar
2018-07-22 12:45:52 -04:00
committed by GitHub
parent fc65939f0e
commit b1d3bb0403
21 changed files with 271 additions and 423 deletions
+7 -10
View File
@@ -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);