From 6c115b43122a8a1fef213991754cb3bb54e6352c Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Thu, 23 Mar 2017 08:11:23 +1300 Subject: [PATCH] Fixed display of SERIAL resources in CLI. --- src/main/fc/cli.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index b0d626cca..b0ec95744 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -923,6 +923,7 @@ static motorMixer_t customMotorMixerCopy[MAX_SUPPORTED_MOTORS]; static mixerConfig_t mixerConfigCopy; static flight3DConfig_t flight3DConfigCopy; static serialConfig_t serialConfigCopy; +static serialPinConfig_t serialPinConfigCopy; static imuConfig_t imuConfigCopy; static armingConfig_t armingConfigCopy; static rcControlsConfig_t rcControlsConfigCopy; @@ -1238,6 +1239,10 @@ static const cliCurrentAndDefaultConfig_t *getCurrentAndDefaultConfigs(pgn_t pgn ret.currentConfig = &serialConfigCopy; ret.defaultConfig = serialConfig(); break; + case PG_SERIAL_PIN_CONFIG: + ret.currentConfig = &serialPinConfigCopy; + ret.defaultConfig = serialPinConfig(); + break; case PG_IMU_CONFIG: ret.currentConfig = &imuConfigCopy; ret.defaultConfig = imuConfig(); @@ -3916,8 +3921,8 @@ const cliResourceValue_t resourceTable[] = { #ifdef LED_STRIP { OWNER_LED_STRIP, PG_LED_STRIP_CONFIG, offsetof(ledStripConfig_t, ioTag), 0 }, #endif - { OWNER_SERIAL_TX, PG_SERIAL_CONFIG, offsetof(serialPinConfig_t, ioTagTx[0]), SERIAL_PORT_MAX_INDEX }, - { OWNER_SERIAL_RX, PG_SERIAL_CONFIG, offsetof(serialPinConfig_t, ioTagRx[0]), SERIAL_PORT_MAX_INDEX }, + { OWNER_SERIAL_TX, PG_SERIAL_PIN_CONFIG, offsetof(serialPinConfig_t, ioTagTx[0]), SERIAL_PORT_MAX_INDEX }, + { OWNER_SERIAL_RX, PG_SERIAL_PIN_CONFIG, offsetof(serialPinConfig_t, ioTagRx[0]), SERIAL_PORT_MAX_INDEX }, }; static ioTag_t *getIoTag(const cliResourceValue_t value, uint8_t index)