mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 16:55:29 +03:00
Merge pull request #9805 from iNavFlight/dzikuvx-drop-control-deadband
Drop control_deadband setting
This commit is contained in:
commit
1efdfabeeb
5 changed files with 4 additions and 21 deletions
|
@ -552,16 +552,6 @@ Blackbox logging rate numerator. Use num/denom settings to decide if a frame sho
|
|||
|
||||
---
|
||||
|
||||
### control_deadband
|
||||
|
||||
Stick deadband in [r/c points], applied after r/c deadband and expo. Used to check if sticks are centered.
|
||||
|
||||
| Default | Min | Max |
|
||||
| --- | --- | --- |
|
||||
| 10 | 2 | 250 |
|
||||
|
||||
---
|
||||
|
||||
### controlrate_profile
|
||||
|
||||
Control rate profile to switch to when the battery profile is selected, 0 to disable and keep the currently selected control rate profile
|
||||
|
|
|
@ -237,7 +237,7 @@ static void updateArmingStatus(void)
|
|||
|
||||
/* CHECK: pitch / roll sticks centered when NAV_LAUNCH_MODE enabled */
|
||||
if (isNavLaunchEnabled()) {
|
||||
if (isRollPitchStickDeflected(rcControlsConfig()->control_deadband)) {
|
||||
if (isRollPitchStickDeflected(CONTROL_DEADBAND)) {
|
||||
ENABLE_ARMING_FLAG(ARMING_DISABLED_ROLLPITCH_NOT_CENTERED);
|
||||
} else {
|
||||
DISABLE_ARMING_FLAG(ARMING_DISABLED_ROLLPITCH_NOT_CENTERED);
|
||||
|
|
|
@ -75,13 +75,12 @@ stickPositions_e rcStickPositions;
|
|||
|
||||
FASTRAM int16_t rcCommand[4]; // interval [1000;2000] for THROTTLE and [-500;+500] for ROLL/PITCH/YAW
|
||||
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(rcControlsConfig_t, rcControlsConfig, PG_RC_CONTROLS_CONFIG, 3);
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(rcControlsConfig_t, rcControlsConfig, PG_RC_CONTROLS_CONFIG, 4);
|
||||
|
||||
PG_RESET_TEMPLATE(rcControlsConfig_t, rcControlsConfig,
|
||||
.deadband = SETTING_DEADBAND_DEFAULT,
|
||||
.yaw_deadband = SETTING_YAW_DEADBAND_DEFAULT,
|
||||
.pos_hold_deadband = SETTING_POS_HOLD_DEADBAND_DEFAULT,
|
||||
.control_deadband = SETTING_CONTROL_DEADBAND_DEFAULT,
|
||||
.alt_hold_deadband = SETTING_ALT_HOLD_DEADBAND_DEFAULT,
|
||||
.mid_throttle_deadband = SETTING_3D_DEADBAND_THROTTLE_DEFAULT,
|
||||
.airmodeHandlingType = SETTING_AIRMODE_TYPE_DEFAULT,
|
||||
|
@ -104,7 +103,7 @@ bool areSticksInApModePosition(uint16_t ap_mode)
|
|||
|
||||
bool areSticksDeflected(void)
|
||||
{
|
||||
return (ABS(rcCommand[ROLL]) > rcControlsConfig()->control_deadband) || (ABS(rcCommand[PITCH]) > rcControlsConfig()->control_deadband) || (ABS(rcCommand[YAW]) > rcControlsConfig()->control_deadband);
|
||||
return (ABS(rcCommand[ROLL]) > CONTROL_DEADBAND) || (ABS(rcCommand[PITCH]) > CONTROL_DEADBAND) || (ABS(rcCommand[YAW]) > CONTROL_DEADBAND);
|
||||
}
|
||||
|
||||
bool isRollPitchStickDeflected(uint8_t deadband)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "config/parameter_group.h"
|
||||
|
||||
#define AIRMODE_THROTTLE_THRESHOLD 1300
|
||||
#define CONTROL_DEADBAND 10 // Used to check if sticks are centered
|
||||
|
||||
typedef enum rc_alias {
|
||||
ROLL = 0,
|
||||
|
@ -85,7 +85,6 @@ typedef struct rcControlsConfig_s {
|
|||
uint8_t deadband; // introduce a deadband around the stick center for pitch and roll axis. Must be greater than zero.
|
||||
uint8_t yaw_deadband; // introduce a deadband around the stick center for yaw axis. Must be greater than zero.
|
||||
uint8_t pos_hold_deadband; // Deadband for position hold
|
||||
uint8_t control_deadband; // General deadband to check if sticks are deflected, us PWM.
|
||||
uint8_t alt_hold_deadband; // Defines the neutral zone of throttle stick during altitude hold
|
||||
uint16_t mid_throttle_deadband; // default throttle deadband from MIDRC
|
||||
uint8_t airmodeHandlingType; // Defaults to ANTI_WINDUP triggered at sticks centered
|
||||
|
|
|
@ -1703,11 +1703,6 @@ groups:
|
|||
default_value: 10
|
||||
min: 2
|
||||
max: 250
|
||||
- name: control_deadband
|
||||
description: "Stick deadband in [r/c points], applied after r/c deadband and expo. Used to check if sticks are centered."
|
||||
default_value: 10
|
||||
min: 2
|
||||
max: 250
|
||||
- name: alt_hold_deadband
|
||||
description: "Defines the deadband of throttle during alt_hold [r/c points]"
|
||||
default_value: 50
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue