initialize offboard structs

This commit is contained in:
Andreas Antener
2016-04-28 13:39:01 +02:00
committed by Lorenz Meier
parent 3345a586d2
commit a6878fb653
+3 -3
View File
@@ -681,7 +681,7 @@ MavlinkReceiver::handle_message_set_position_target_local_ned(mavlink_message_t
mavlink_set_position_target_local_ned_t set_position_target_local_ned;
mavlink_msg_set_position_target_local_ned_decode(msg, &set_position_target_local_ned);
struct offboard_control_mode_s offboard_control_mode;
struct offboard_control_mode_s offboard_control_mode = {};
memset(&offboard_control_mode, 0, sizeof(offboard_control_mode));//XXX breaks compatibility with multiple setpoints
bool values_finite =
@@ -758,7 +758,7 @@ MavlinkReceiver::handle_message_set_position_target_local_ned(mavlink_message_t
} else {
/* It's not a pure force setpoint: publish to setpoint triplet topic */
struct position_setpoint_triplet_s pos_sp_triplet;
struct position_setpoint_triplet_s pos_sp_triplet = {};
pos_sp_triplet.previous.valid = false;
pos_sp_triplet.next.valid = false;
pos_sp_triplet.current.valid = true;
@@ -861,7 +861,7 @@ MavlinkReceiver::handle_message_set_actuator_control_target(mavlink_message_t *m
struct offboard_control_mode_s offboard_control_mode;
memset(&offboard_control_mode, 0, sizeof(offboard_control_mode));//XXX breaks compatibility with multiple setpoints
struct actuator_controls_s actuator_controls;
struct actuator_controls_s actuator_controls = {};
memset(&actuator_controls, 0, sizeof(actuator_controls));//XXX breaks compatibility with multiple setpoints
bool values_finite =