1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-20 06:45:14 +03:00

Added nav_fw_pitch2thr_smoothing to cli settings and osd menu

This commit is contained in:
Airwide 2020-09-28 23:02:55 +02:00
parent 103bed8b46
commit 845de37651
6 changed files with 25 additions and 15 deletions

View file

@ -464,7 +464,7 @@ int16_t applyFixedWingMinSpeedController(timeUs_t currentTimeUs)
int16_t fixedWingPitchToThrottleCorrection(int16_t pitch)
{
// Calculate base throttle correction from pitch moving average
const int16_t movingAverageCycles = 128; //Number of main loop cycles for average calculation
const int16_t movingAverageCycles = navConfig()->fw.pitch_to_throttle_smooth;
static int16_t averagePitch = 0;
averagePitch = (averagePitch * movingAverageCycles + pitch - averagePitch) / movingAverageCycles;