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

Throttle boost (#5508)

* throttle boost which temporarily boosts throttle in both directions to improve response

* fix comment and use pt1FilterGain

* incorporate review suggestions

* incorporate review suggestions

* use float constant to avoid double promotion

* formatting changes

* formatting change

* hopefully last style changes
This commit is contained in:
joelucid 2018-03-24 23:33:22 +01:00 committed by Michael Keller
parent 172642383d
commit efda704ee5
4 changed files with 22 additions and 1 deletions

View file

@ -19,6 +19,7 @@
#include <stdbool.h>
#include "common/time.h"
#include "common/filter.h"
#include "pg/pg.h"
#define MAX_PID_PROCESS_DENOM 16
@ -106,6 +107,9 @@ typedef struct pidProfile_s {
uint16_t crash_limit_yaw; // limits yaw errorRate, so crashes don't cause huge throttle increase
uint16_t itermLimit;
uint16_t dterm_lowpass2_hz; // Extra PT1 Filter on D in hz
uint8_t throttle_boost; // how much should throttle be boosted during transient changes 0-100, 100 adds 10x hpf filtered throttle
uint8_t throttle_boost_cutoff; // Which cutoff frequency to use for throttle boost. higher cutoffs keep the boost on for shorter. Specified in hz.
} pidProfile_t;
#ifndef USE_OSD_SLAVE
@ -140,3 +144,6 @@ void pidInitConfig(const pidProfile_t *pidProfile);
void pidInit(const pidProfile_t *pidProfile);
void pidCopyProfile(uint8_t dstPidProfileIndex, uint8_t srcPidProfileIndex);
bool crashRecoveryModeActive(void);
FAST_RAM float throttleBoost;
pt1Filter_t throttleLpf;