1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Runaway Takeoff remove unneeded parameters and enhance deactivate logic

Removed parameters runaway_takeoff_threshold (hardcode to 60) and runaway_takeoff_activate_delay (hardcode to 75).  The previous default values worked well and required no tuning.

Enhance the deactivate logic to remove the R/P/Y stick activity condition once throttle reaches 2X runaway_takeoff_deactivate_throttle_percent.  Additionally reduce the runaway_takeoff_deactivate_delay by 50% when throttle exceeds 75%.
This commit is contained in:
Bruce Luckcuck 2018-02-27 10:05:04 -05:00
parent b0ff928afd
commit 449f5f2f5c
4 changed files with 22 additions and 22 deletions

View file

@ -60,7 +60,7 @@ FAST_RAM float axisPID_P[3], axisPID_I[3], axisPID_D[3], axisPIDSum[3];
static FAST_RAM float dT;
PG_REGISTER_WITH_RESET_TEMPLATE(pidConfig_t, pidConfig, PG_PID_CONFIG, 1);
PG_REGISTER_WITH_RESET_TEMPLATE(pidConfig_t, pidConfig, PG_PID_CONFIG, 2);
#ifdef STM32F10X
#define PID_PROCESS_DENOM_DEFAULT 1
@ -74,8 +74,6 @@ PG_REGISTER_WITH_RESET_TEMPLATE(pidConfig_t, pidConfig, PG_PID_CONFIG, 1);
PG_RESET_TEMPLATE(pidConfig_t, pidConfig,
.pid_process_denom = PID_PROCESS_DENOM_DEFAULT,
.runaway_takeoff_prevention = true,
.runaway_takeoff_threshold = 60, // corresponds to a pidSum value of 60% (raw 600) in the blackbox viewer
.runaway_takeoff_activate_delay = 75, // 75ms delay before activation (pidSum above threshold time)
.runaway_takeoff_deactivate_throttle = 25, // throttle level % needed to accumulate deactivation time
.runaway_takeoff_deactivate_delay = 500 // Accumulated time (in milliseconds) before deactivation in successful takeoff
);