From fbdd6547f2af3d7076f78a9aebadd8735ba981be Mon Sep 17 00:00:00 2001 From: KiteAnton Date: Wed, 13 Jul 2016 19:44:11 +0200 Subject: [PATCH] MSP cleanup, commands should really be in order --- src/main/io/serial_cli.c | 2 +- src/main/io/serial_msp.h | 33 +++++++++++++++++---------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 5624fd1b7..54e99fd7b 100644 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -2507,7 +2507,7 @@ static void cliName(char *cmdline) strcpy(masterConfig.name, cmdline); cliPrintf("name %s\r\n", masterConfig.name); } else { - cliPrintf("Max allowed name size is %d\r\n", MAX_NAME_LENGTH); + cliPrintf("Max allowed name length is %d\r\n", MAX_NAME_LENGTH); } return; diff --git a/src/main/io/serial_msp.h b/src/main/io/serial_msp.h index 1a63b2b20..1287955d0 100644 --- a/src/main/io/serial_msp.h +++ b/src/main/io/serial_msp.h @@ -147,6 +147,23 @@ static const char * const boardIdentifier = TARGET_BOARD_IDENTIFIER; #define MSP_ARMING_CONFIG 61 //out message Returns auto_disarm_delay and disarm_kill_switch parameters #define MSP_SET_ARMING_CONFIG 62 //in message Sets auto_disarm_delay and disarm_kill_switch parameters +// +// Baseflight MSP commands (if enabled they exist in Cleanflight) +// +#define MSP_RX_MAP 64 //out message get channel map (also returns number of channels total) +#define MSP_SET_RX_MAP 65 //in message set rx map, numchannels to set comes from MSP_RX_MAP + +// FIXME - Provided for backwards compatibility with configurator code until configurator is updated. +// DEPRECATED - DO NOT USE "MSP_BF_CONFIG" and MSP_SET_BF_CONFIG. In Cleanflight, isolated commands already exist and should be used instead. +#define MSP_BF_CONFIG 66 //out message baseflight-specific settings that aren't covered elsewhere +#define MSP_SET_BF_CONFIG 67 //in message baseflight-specific settings save + +#define MSP_REBOOT 68 //in message reboot settings + +// DEPRECATED - Use MSP_BUILD_INFO instead +#define MSP_BF_BUILD_INFO 69 //out message build date as well as some space for future expansion + + #define MSP_DATAFLASH_SUMMARY 70 //out message - get description of dataflash chip #define MSP_DATAFLASH_READ 71 //out message - get content of dataflash chip #define MSP_DATAFLASH_ERASE 72 //in message - erase dataflash chip @@ -177,22 +194,6 @@ static const char * const boardIdentifier = TARGET_BOARD_IDENTIFIER; #define MSP_VTX_CONFIG 88 //in message Get vtx settings #define MSP_SET_VTX_CONFIG 89 //out message Set vtx settings -// -// Baseflight MSP commands (if enabled they exist in Cleanflight) -// -#define MSP_RX_MAP 64 //out message get channel map (also returns number of channels total) -#define MSP_SET_RX_MAP 65 //in message set rx map, numchannels to set comes from MSP_RX_MAP - -// FIXME - Provided for backwards compatibility with configurator code until configurator is updated. -// DEPRECATED - DO NOT USE "MSP_BF_CONFIG" and MSP_SET_BF_CONFIG. In Cleanflight, isolated commands already exist and should be used instead. -#define MSP_BF_CONFIG 66 //out message baseflight-specific settings that aren't covered elsewhere -#define MSP_SET_BF_CONFIG 67 //in message baseflight-specific settings save - -#define MSP_REBOOT 68 //in message reboot settings - -// DEPRECATED - Use MSP_BUILD_INFO instead -#define MSP_BF_BUILD_INFO 69 //out message build date as well as some space for future expansion - // Betaflight Additional Commands #define MSP_PID_ADVANCED_CONFIG 90 #define MSP_SET_PID_ADVANCED_CONFIG 91 -- 2.11.4.GIT