diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-06-01 09:53:04 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-06-01 09:53:04 +0200 |
commit | bb87cb8c612bb733f0d37226c2157eb080aaf07a (patch) | |
tree | f88c3e40d81ec5dbdaea376e1354cd80c3b7d0bf /src | |
parent | db925db460fc24ae4d02b87e6fc9cebf2b100b7a (diff) | |
download | px4-firmware-bb87cb8c612bb733f0d37226c2157eb080aaf07a.tar.gz px4-firmware-bb87cb8c612bb733f0d37226c2157eb080aaf07a.tar.bz2 px4-firmware-bb87cb8c612bb733f0d37226c2157eb080aaf07a.zip |
fw pos control: don't call tecs 50hz update loop if mtecs is enabled
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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 acd623c30..954431fa3 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 @@ -845,7 +845,10 @@ FixedwingPositionControl::control_position(const math::Vector<2> ¤t_positi math::Vector<3> accel_body(_sensor_combined.accelerometer_m_s2); math::Vector<3> accel_earth = _R_nb * accel_body; - _tecs.update_50hz(baro_altitude, _airspeed.indicated_airspeed_m_s, _R_nb, accel_body, accel_earth); + if (!_mTecs.getEnabled()) { + _tecs.update_50hz(baro_altitude, _airspeed.indicated_airspeed_m_s, _R_nb, accel_body, accel_earth); + } + float altitude_error = _pos_sp_triplet.current.alt - _global_pos.alt; /* no throttle limit as default */ |