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

Allow TPA_LOW to be negative (for wings) (#13661)

* Allow TPA_LOW to be negative (for wings)

* Fix minimax type

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Range -128 to 127

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Proper limits for TPA

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

* separate minmaxes for wing/without wing for TPA_LOW

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Separate define for TPA_LOW_RATE_MIN

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Jan Post <Rm2k-Freak@web.de>
This commit is contained in:
Ivan Efimov 2024-06-20 06:06:30 -04:00 committed by GitHub
parent e2e1a68ba0
commit f140fec847
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 5 deletions

View file

@ -263,7 +263,7 @@ static uint8_t cmsx_simplified_gyro_filter;
static uint8_t cmsx_simplified_gyro_filter_multiplier;
static uint8_t cmsx_tpa_rate;
static uint16_t cmsx_tpa_breakpoint;
static uint8_t cmsx_tpa_low_rate;
static int8_t cmsx_tpa_low_rate;
static uint16_t cmsx_tpa_low_breakpoint;
static uint8_t cmsx_tpa_low_always;
@ -552,7 +552,7 @@ static uint8_t cmsx_feedforward_jitter_factor;
static uint8_t cmsx_tpa_rate;
static uint16_t cmsx_tpa_breakpoint;
static uint8_t cmsx_tpa_low_rate;
static int8_t cmsx_tpa_low_rate;
static uint16_t cmsx_tpa_low_breakpoint;
static uint8_t cmsx_tpa_low_always;
@ -725,7 +725,7 @@ static const OSD_Entry cmsx_menuProfileOtherEntries[] = {
{ "TPA RATE", OME_FLOAT, NULL, &(OSD_FLOAT_t) { &cmsx_tpa_rate, 0, 100, 1, 10} },
{ "TPA BRKPT", OME_UINT16, NULL, &(OSD_UINT16_t){ &cmsx_tpa_breakpoint, 1000, 2000, 10} },
{ "TPA LOW RATE", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_tpa_low_rate, 0, 100, 1} },
{ "TPA LOW RATE", OME_INT8, NULL, &(OSD_INT8_t) { &cmsx_tpa_low_rate, TPA_LOW_RATE_MIN, TPA_MAX , 1} },
{ "TPA LOW BRKPT", OME_UINT16, NULL, &(OSD_UINT16_t){ &cmsx_tpa_low_breakpoint, 1000, 2000, 10} },
{ "TPA LOW ALWYS", OME_Bool, NULL, &cmsx_tpa_low_always },