1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Add ez_landing_speed parameter (#13411)

* Add ez_landing_speed parameter

The parameter is the speed at which ez_landing will be effectively disabled in tenths of meters per second.
Default value 50 (5 m/s).
EZLANDING bug field 5 is the contribution from this parameter to the ezlanding throttle cap.

* Correct ez_landing_speed logic and scaling

* ez_landing_speed should now raise the limit when the speed is above ez_landing_speed (previously only raised the limit if the speed was bellow, and had no effect above the limit)
* ez_landing_speed should now be scaled so that EzLanding is effectively disabled when speed >= ez_landing_speed (previously EzLanding would be disabeld when speed was at half of ez_landing_speed)

* Add stick input upper limit as EZLANDING debug 4

* Check for gps 3D fix before using gps speed for EzLanding

* Prevent division by 0 if ez_landing_threshold is set to 0

* Scale EzLanding speed to m/s from cm/s

* Update src/main/flight/mixer.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
This commit is contained in:
tbolin 2024-04-03 22:59:29 +02:00 committed by GitHub
parent ac846f7537
commit fb14365e66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 29 additions and 10 deletions

View file

@ -229,6 +229,7 @@ void resetPidProfile(pidProfile_t *pidProfile)
.tpa_low_always = 0,
.ez_landing_threshold = 25,
.ez_landing_limit = 15,
.ez_landing_speed = 50,
);
#ifndef USE_D_MIN