From 7ba49aeb8082e908636cf301f7d909bca2e173eb Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 17 Oct 2016 23:10:49 +0200 Subject: [PATCH] fw_pos_control_l1: make TECS handle height ekf height resets properly Signed-off-by: Roman --- src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp index 70541d0411..f5cf5c6656 100644 --- a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp +++ b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp @@ -2294,6 +2294,8 @@ FixedwingPositionControl::task_main() if (_control_mode.flag_control_altitude_enabled && _global_pos.alt_reset_counter != _alt_reset_counter) { _hold_alt += _global_pos.delta_alt; _alt_reset_counter = _global_pos.alt_reset_counter; + // make TECS accept step in altitude and demanded altitude + _tecs.handle_alt_step(_global_pos.delta_alt, _global_pos.alt); } // adjust navigation waypoints in position control mode