mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
ExpressLrs v2.0.0 support
This commit is contained in:
parent
4c034d67ee
commit
e00a3abc59
56 changed files with 6235 additions and 49 deletions
|
@ -96,6 +96,7 @@
|
|||
#include "pg/rx_pwm.h"
|
||||
#include "pg/rx_spi.h"
|
||||
#include "pg/rx_spi_cc2500.h"
|
||||
#include "pg/rx_spi_expresslrs.h"
|
||||
#include "pg/sdcard.h"
|
||||
#include "pg/vcd.h"
|
||||
#include "pg/vtx_io.h"
|
||||
|
@ -269,6 +270,7 @@ static const char * const lookupTableRxSpi[] = {
|
|||
"REDPINE",
|
||||
"FRSKY_X_V2",
|
||||
"FRSKY_X_LBT_V2",
|
||||
"EXPRESSLRS",
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -505,6 +507,24 @@ const char * const lookupTableCMSMenuBackgroundType[] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef USE_RX_EXPRESSLRS
|
||||
static const char* const lookupTableFreqDomain[] = {
|
||||
#ifdef USE_RX_SX127X
|
||||
"AU433", "AU915", "EU433", "EU868", "IN866", "FCC915",
|
||||
#endif
|
||||
#ifdef USE_RX_SX1280
|
||||
"ISM2400",
|
||||
#endif
|
||||
#if !defined(USE_RX_SX127X) && !defined(USE_RX_SX1280)
|
||||
"NONE",
|
||||
#endif
|
||||
};
|
||||
|
||||
static const char* const lookupTableSwitchMode[] = {
|
||||
"HYBRID", "WIDE",
|
||||
};
|
||||
#endif
|
||||
|
||||
#define LOOKUP_TABLE_ENTRY(name) { name, ARRAYLEN(name) }
|
||||
|
||||
const lookupTableEntry_t lookupTables[] = {
|
||||
|
@ -626,6 +646,10 @@ const lookupTableEntry_t lookupTables[] = {
|
|||
#ifdef USE_OSD
|
||||
LOOKUP_TABLE_ENTRY(lookupTableCMSMenuBackgroundType),
|
||||
#endif
|
||||
#ifdef USE_RX_EXPRESSLRS
|
||||
LOOKUP_TABLE_ENTRY(lookupTableFreqDomain),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableSwitchMode),
|
||||
#endif
|
||||
};
|
||||
|
||||
#undef LOOKUP_TABLE_ENTRY
|
||||
|
@ -1649,6 +1673,13 @@ const clivalue_t valueTable[] = {
|
|||
{ "spektrum_spi_mfg_id", VAR_UINT8 | MASTER_VALUE | MODE_ARRAY, .config.array.length = 4, PG_RX_SPEKTRUM_SPI_CONFIG, offsetof(spektrumConfig_t, mfgId) },
|
||||
{ "spektrum_spi_num_channels", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, DSM_MAX_CHANNEL_COUNT }, PG_RX_SPEKTRUM_SPI_CONFIG, offsetof(spektrumConfig_t, numChannels) },
|
||||
#endif
|
||||
#ifdef USE_RX_EXPRESSLRS
|
||||
{ "expresslrs_uid", VAR_UINT8 | MASTER_VALUE | MODE_ARRAY, .config.array.length = 6, PG_RX_EXPRESSLRS_SPI_CONFIG, offsetof(rxExpressLrsSpiConfig_t, UID) },
|
||||
{ "expresslrs_domain", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_FREQ_DOMAIN }, PG_RX_EXPRESSLRS_SPI_CONFIG, offsetof(rxExpressLrsSpiConfig_t, domain) },
|
||||
{ "expresslrs_rate_index", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, 3 }, PG_RX_EXPRESSLRS_SPI_CONFIG, offsetof(rxExpressLrsSpiConfig_t, rateIndex) },
|
||||
{ "expresslrs_switch_mode", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_SWITCH_MODE }, PG_RX_EXPRESSLRS_SPI_CONFIG, offsetof(rxExpressLrsSpiConfig_t, switchMode) },
|
||||
{ "expresslrs_model_id", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, UINT8_MAX }, PG_RX_EXPRESSLRS_SPI_CONFIG, offsetof(rxExpressLrsSpiConfig_t, modelId) },
|
||||
#endif
|
||||
|
||||
// PG_TIMECONFIG
|
||||
#ifdef USE_RTC_TIME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue