forked from Archive/PX4-Autopilot
Fix uninitialized memory found using Valgrind
This commit is contained in:
parent
a9c3bce20d
commit
dc3341db59
|
@ -3135,7 +3135,7 @@ protected:
|
|||
|
||||
if (control_mode.flag_control_position_enabled) {
|
||||
|
||||
position_setpoint_triplet_s pos_sp_triplet;
|
||||
position_setpoint_triplet_s pos_sp_triplet = {};
|
||||
_pos_sp_triplet_sub->update(&pos_sp_triplet);
|
||||
|
||||
if (pos_sp_triplet.timestamp > 0 && pos_sp_triplet.current.valid
|
||||
|
|
|
@ -676,7 +676,7 @@ MulticopterAttitudeControl::publish_rates_setpoint()
|
|||
void
|
||||
MulticopterAttitudeControl::publish_rate_controller_status()
|
||||
{
|
||||
rate_ctrl_status_s rate_ctrl_status;
|
||||
rate_ctrl_status_s rate_ctrl_status = {};
|
||||
rate_ctrl_status.timestamp = hrt_absolute_time();
|
||||
rate_ctrl_status.rollspeed = _rates_prev(0);
|
||||
rate_ctrl_status.pitchspeed = _rates_prev(1);
|
||||
|
|
Loading…
Reference in New Issue