1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Change SFHSS bind parameter rxSfhssSpiConfig to rxFrSkySpiConfig

This commit is contained in:
chibaron 2018-10-03 00:32:18 +09:00
parent 002d9aa504
commit 9a452f4a1e
6 changed files with 16 additions and 30 deletions

View file

@ -2561,25 +2561,23 @@ static void cliBeeper(char *cmdline)
}
#endif
#ifdef USE_RX_BIND
void cliRxBind(char *cmdline){
UNUSED(cmdline);
switch (rxSpiConfig()->rx_spi_protocol) {
#ifdef USE_RX_CC2500_BIND
case RX_SPI_FRSKY_D:
case RX_SPI_FRSKY_X:
case RX_SPI_SFHSS:
cc2500SpiBind();
cliPrint("Binding...");
break;
#endif
default:
cliPrint("Not supported.");
break;
}
}
#endif
static void printMap(uint8_t dumpMask, const rxConfig_t *rxConfig, const rxConfig_t *defaultRxConfig)
{
@ -4466,9 +4464,8 @@ const clicmd_t cmdTable[] = {
CLI_COMMAND_DEF("flash_write", NULL, "<address> <message>", cliFlashWrite),
#endif
#endif
#ifdef USE_RX_BIND
CLI_COMMAND_DEF("frsky_bind", "initiate binding for FrSky SPI RX", NULL, cliRxBind),
CLI_COMMAND_DEF("sfhss_bind", "initiate binding for S-FHSS SPI RX", NULL, cliRxBind),
#ifdef USE_RX_CC2500_BIND
CLI_COMMAND_DEF("bind", "initiate binding for RX", NULL, cliRxBind),
#endif
CLI_COMMAND_DEF("get", "get variable value", "[name]", cliGet),
#ifdef USE_GPS

View file

@ -1114,10 +1114,6 @@ const clivalue_t valueTable[] = {
{ "frsky_spi_bind_hop_data", VAR_UINT8 | MASTER_VALUE | MODE_ARRAY, .config.array.length = 50, PG_RX_FRSKY_SPI_CONFIG, offsetof(rxFrSkySpiConfig_t, bindHopData) },
{ "frsky_x_rx_num", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 255 }, PG_RX_FRSKY_SPI_CONFIG, offsetof(rxFrSkySpiConfig_t, rxNum) },
{ "frsky_spi_use_external_adc", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_RX_FRSKY_SPI_CONFIG, offsetof(rxFrSkySpiConfig_t, useExternalAdc) },
#endif
#ifdef USE_RX_SFHSS_SPI
{ "sfhss_tx_id", VAR_UINT8 | MASTER_VALUE | MODE_ARRAY, .config.array.length = 2, PG_RX_SFHSS_SPI_CONFIG, offsetof(rxSfhssSpiConfig_t, bindTxId) },
{ "sfhss_offset", VAR_INT8 | MASTER_VALUE, .config.minmax = { -127, 127 }, PG_RX_SFHSS_SPI_CONFIG, offsetof(rxSfhssSpiConfig_t, bindOffset) },
#endif
{ "led_inversion", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, ((1 << STATUS_LED_NUMBER) - 1) }, PG_STATUS_LED_CONFIG, offsetof(statusLedConfig_t, inversion) },
#ifdef USE_DASHBOARD