mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
Disable stick arming by default, require settings change to ena… (#9183)
Disable stick arming by default, require settings change to enable
This commit is contained in:
commit
6ecf864ad9
4 changed files with 4 additions and 1 deletions
|
@ -1384,6 +1384,7 @@ const clivalue_t valueTable[] = {
|
||||||
#endif
|
#endif
|
||||||
{ "pwr_on_arm_grace", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, 30 }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, powerOnArmingGraceTime) },
|
{ "pwr_on_arm_grace", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, 30 }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, powerOnArmingGraceTime) },
|
||||||
{ "scheduler_optimize_rate", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON_AUTO }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, schedulerOptimizeRate) },
|
{ "scheduler_optimize_rate", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON_AUTO }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, schedulerOptimizeRate) },
|
||||||
|
{ "enable_stick_arming", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_SYSTEM_CONFIG, offsetof(systemConfig_t, enableStickArming) },
|
||||||
|
|
||||||
// PG_VTX_CONFIG
|
// PG_VTX_CONFIG
|
||||||
#ifdef USE_VTX_COMMON
|
#ifdef USE_VTX_COMMON
|
||||||
|
|
|
@ -115,6 +115,7 @@ PG_RESET_TEMPLATE(systemConfig_t, systemConfig,
|
||||||
.hseMhz = SYSTEM_HSE_VALUE, // Not used for non-F4 targets
|
.hseMhz = SYSTEM_HSE_VALUE, // Not used for non-F4 targets
|
||||||
.configurationState = CONFIGURATION_STATE_DEFAULTS_BARE,
|
.configurationState = CONFIGURATION_STATE_DEFAULTS_BARE,
|
||||||
.schedulerOptimizeRate = SCHEDULER_OPTIMIZE_RATE_AUTO,
|
.schedulerOptimizeRate = SCHEDULER_OPTIMIZE_RATE_AUTO,
|
||||||
|
.enableStickArming = false,
|
||||||
);
|
);
|
||||||
|
|
||||||
uint8_t getCurrentPidProfileIndex(void)
|
uint8_t getCurrentPidProfileIndex(void)
|
||||||
|
|
|
@ -60,6 +60,7 @@ typedef struct systemConfig_s {
|
||||||
uint8_t hseMhz; // Not used for non-F4 targets
|
uint8_t hseMhz; // Not used for non-F4 targets
|
||||||
uint8_t configurationState; // The state of the configuration (defaults / configured)
|
uint8_t configurationState; // The state of the configuration (defaults / configured)
|
||||||
uint8_t schedulerOptimizeRate;
|
uint8_t schedulerOptimizeRate;
|
||||||
|
uint8_t enableStickArming; // boolean that determines whether stick arming can be used
|
||||||
} systemConfig_t;
|
} systemConfig_t;
|
||||||
|
|
||||||
PG_DECLARE(systemConfig_t, systemConfig);
|
PG_DECLARE(systemConfig_t, systemConfig);
|
||||||
|
|
|
@ -396,5 +396,5 @@ int32_t getRcStickDeflection(int32_t axis, uint16_t midrc) {
|
||||||
void rcControlsInit(void)
|
void rcControlsInit(void)
|
||||||
{
|
{
|
||||||
analyzeModeActivationConditions();
|
analyzeModeActivationConditions();
|
||||||
isUsingSticksToArm = !isModeActivationConditionPresent(BOXARM);
|
isUsingSticksToArm = !isModeActivationConditionPresent(BOXARM) && systemConfig()->enableStickArming;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue