Skip to content

Commit

Permalink
AP_TECS: fix incorrect reference to plane pitch_trim
Browse files Browse the repository at this point in the history
  • Loading branch information
timtuxworth committed Dec 19, 2023
1 parent 62a9b7f commit cdfd337
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_TECS/AP_TECS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ void AP_TECS::_update_throttle_without_airspeed(int16_t throttle_nudge)
_pitch_demand_lpf.apply(_pitch_dem, _DT);
const float pitch_demand_hpf = _pitch_dem - _pitch_demand_lpf.get();
_pitch_measured_lpf.apply(_ahrs.pitch, _DT);
const float pitch_corrected_lpf = _pitch_measured_lpf.get() - radians(aparm.pitch_trim);
const float pitch_corrected_lpf = _pitch_measured_lpf.get();
const float pitch_blended = pitch_demand_hpf + pitch_corrected_lpf;

if (pitch_blended > 0.0f && _PITCHmaxf > 0.0f)
Expand Down

0 comments on commit cdfd337

Please sign in to comment.