2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
23 #if defined(USE_PWM) || defined(USE_PPM) || defined(USE_SERIAL_RX) || defined(USE_RX_MSP) || defined(USE_RX_SPI)
26 #include "pg/pg_ids.h"
29 #include "config/config_reset.h"
31 #include "drivers/io.h"
33 #include "fc/rc_controls.h"
35 #include "rx/rx_spi.h"
37 PG_REGISTER_WITH_RESET_FN(rxConfig_t
, rxConfig
, PG_RX_CONFIG
, 3);
38 void pgResetFn_rxConfig(rxConfig_t
*rxConfig
)
40 RESET_CONFIG_2(rxConfig_t
, rxConfig
,
42 .serialrx_provider
= SERIALRX_PROVIDER
,
43 .serialrx_inverted
= 0,
44 .spektrum_bind_pin_override_ioTag
= IO_TAG(SPEKTRUM_BIND_PIN
),
45 .spektrum_bind_plug_ioTag
= IO_TAG(BINDPLUG_PIN
),
46 .spektrum_sat_bind
= 0,
47 .spektrum_sat_bind_autoreset
= 1,
51 .rx_min_usec
= RX_MIN_USEC
, // any of first 4 channels below this value will trigger rx loss detection
52 .rx_max_usec
= RX_MAX_USEC
, // any of first 4 channels above this value will trigger rx loss detection
53 .rssi_src_frame_errors
= false,
55 .rssi_scale
= RSSI_SCALE_DEFAULT
,
58 .rssi_src_frame_lpf_period
= 30,
59 .fpvCamAngleDegrees
= 0,
60 .airModeActivateThreshold
= 25,
61 .max_aux_channel
= DEFAULT_AUX_CHANNEL_COUNT
,
62 .rc_smoothing_mode
= 1,
63 .rc_smoothing_setpoint_cutoff
= 0,
64 .rc_smoothing_feedforward_cutoff
= 0,
65 .rc_smoothing_throttle_cutoff
= 0,
66 .rc_smoothing_debug_axis
= ROLL
,
67 .rc_smoothing_auto_factor_rpy
= 30,
68 .rc_smoothing_auto_factor_throttle
= 30,
70 .srxl2_baud_fast
= true,
71 .sbus_baud_fast
= false,
72 .crsf_use_rx_snr
= false,
73 .msp_override_channels_mask
= 0,
74 .crsf_use_negotiated_baud
= false,
77 #ifdef RX_CHANNELS_TAER
78 parseRcChannels("TAER1234", rxConfig
);
80 parseRcChannels("AETR1234", rxConfig
);