From 1cdbb38ac8788414688db8d66099ddfceab936a5 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Tue, 15 Aug 2017 14:28:37 +1200 Subject: [PATCH] Added setting of 'spi_rx_protocol' to CLI. --- src/main/fc/settings.c | 6 +++++- src/main/rx/rx.h | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/fc/settings.c b/src/main/fc/settings.c index 209f2fa00a..cf69a36b31 100644 --- a/src/main/fc/settings.c +++ b/src/main/fc/settings.c @@ -183,7 +183,8 @@ static const char * const lookupTableRxSpi[] = { "CX10", "CX10A", "H8_3D", - "INAV" + "INAV", + "FRSKY_D" }; #endif @@ -371,6 +372,9 @@ const clivalue_t valueTable[] = { #ifdef STM32F4 { "serialrx_halfduplex", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_RX_CONFIG, offsetof(rxConfig_t, halfDuplex) }, #endif +#ifdef USE_RX_SPI + { "rx_spi_protocol", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_RX_SPI }, PG_RX_CONFIG, offsetof(rxConfig_t, rx_spi_protocol) }, +#endif // PG_PWM_CONFIG #if defined(USE_PWM) diff --git a/src/main/rx/rx.h b/src/main/rx/rx.h index 1b08a1b0a6..505fc5f1a6 100644 --- a/src/main/rx/rx.h +++ b/src/main/rx/rx.h @@ -119,7 +119,8 @@ typedef struct rxConfig_s { uint8_t serialrx_provider; // type of UART-based receiver (0 = spek 10, 1 = spek 11, 2 = sbus). Must be enabled by FEATURE_RX_SERIAL first. uint8_t sbus_inversion; // default sbus (Futaba, FrSKY) is inverted. Support for uninverted OpenLRS (and modified FrSKY) receivers. uint8_t halfDuplex; // allow rx to operate in half duplex mode on F4, ignored for F1 and F3. - uint8_t rx_spi_protocol; // type of nrf24 protocol (0 = v202 250kbps). Must be enabled by FEATURE_RX_NRF24 first. + uint8_t rx_spi_protocol; // type of SPI RX protocol + // nrf24: 0 = v202 250kbps. (Must be enabled by FEATURE_RX_NRF24 first.) uint32_t rx_spi_id; uint8_t rx_spi_rf_channel_count; ioTag_t spektrum_bind_pin_override_ioTag;