From ae96e16c73630d07c234f0eb19f0118a7d319bd1 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Wed, 15 May 2019 13:35:05 +0100 Subject: [PATCH] mc_pos_control: initialize takeoff altitude reference according to @dagar's review comment. --- src/modules/mc_pos_control/mc_pos_control_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/mc_pos_control/mc_pos_control_main.cpp b/src/modules/mc_pos_control/mc_pos_control_main.cpp index 357305ad2c..4b33d4a4a6 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -106,7 +106,7 @@ private: bool _in_takeoff_ramp = false; /**< true while takeoff ramp is applied */ bool _position_triggered_takeoff = false; /**< true if takeoff was triggered by a position setpoint */ float _takeoff_ramp_velocity = -1.f; /**< current value of the smooth takeoff ramp */ - float _takeoff_reference_z; /**< z-position when takeoff ramp was initiated */ + float _takeoff_reference_z = 0.f; /**< z-position when takeoff ramp was initiated */ orb_advert_t _att_sp_pub{nullptr}; /**< attitude setpoint publication */ orb_advert_t _traj_sp_pub{nullptr}; /**< trajectory setpoints publication */