mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Adjustable OC for F405 and F411
This commit is contained in:
parent
e596f9a7d1
commit
ac26c975dd
11 changed files with 93 additions and 47 deletions
|
@ -273,6 +273,17 @@ static const char * const lookupTableRatesType[] = {
|
|||
"BETAFLIGHT", "RACEFLIGHT"
|
||||
};
|
||||
|
||||
#ifdef USE_OVERCLOCK
|
||||
static const char * const lookupOverclock[] = {
|
||||
"OFF",
|
||||
#if defined(STM32F40_41xxx)
|
||||
"192MHZ", "216MHZ", "240MHZ"
|
||||
#elif defined(STM32F411xE)
|
||||
"108MHZ", "120MHZ"
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
const lookupTableEntry_t lookupTables[] = {
|
||||
{ lookupTableOffOn, sizeof(lookupTableOffOn) / sizeof(char *) },
|
||||
{ lookupTableUnit, sizeof(lookupTableUnit) / sizeof(char *) },
|
||||
|
@ -325,6 +336,9 @@ const lookupTableEntry_t lookupTables[] = {
|
|||
{ lookupTableGyroOverflowCheck, sizeof(lookupTableGyroOverflowCheck) / sizeof(char *) },
|
||||
#endif
|
||||
{ lookupTableRatesType, sizeof(lookupTableRatesType) / sizeof(char *) },
|
||||
#ifdef USE_OVERCLOCK
|
||||
{ lookupOverclock, sizeof(lookupOverclock) / sizeof(char *) },
|
||||
#endif
|
||||
};
|
||||
|
||||
const clivalue_t valueTable[] = {
|
||||
|
@ -790,8 +804,8 @@ const clivalue_t valueTable[] = {
|
|||
#endif
|
||||
{ "debug_mode", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_DEBUG }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, debug_mode) },
|
||||
{ "rate_6pos_switch", VAR_INT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, rateProfile6PosSwitch) },
|
||||
#if defined(STM32F4) && !defined(DISABLE_OVERCLOCK)
|
||||
{ "cpu_overclock", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, cpu_overclock) },
|
||||
#ifdef USE_OVERCLOCK
|
||||
{ "cpu_overclock", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OVERCLOCK }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, cpu_overclock) },
|
||||
#endif
|
||||
{ "pwr_on_arm_grace", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 30 }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, powerOnArmingGraceTime) },
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue