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:
parent
103bed8b46
commit
845de37651
6 changed files with 25 additions and 15 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue