mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Rename 'display_name' to 'pilot_name'; rename 'name' to 'craft_name'; Add the 'MSP2_GET_TEXT' and 'MSP2_SET_TEXT' MSP commands
- add the 'MSP2_GET_TEXT' and 'MSP2_SET_TEXT' MSP2 commands - Support getting/setting the 'MSP2TEXT_PILOT_DISPLAY_NAME' config prop ('pilotConfigMutable()->displayName') - rename 'display_name' to 'pilot_name' - Add the new 'OSD_PILOT_NAME' OSD element in place of the 'OSD_DISPLAY_NAME' one (as they are semantically identical) - Add the 'osd_pilot_name_pos' cli prop in place of 'osd_display_name_pos' - rename 'pilotConfigMutable()'s 'name' to 'craftName' - remove the legacy 'GET_NAME' / 'SET_NAME' MSP commands - replace the 'name' CLI prop for 'craft_name' - add the 'MSP2TEXT_CRAFT_NAME' constant for 'MSP2_GET_TEXT' and 'MSP2_SET_TEXT'
This commit is contained in:
parent
aafcd26fb5
commit
e7df32f020
12 changed files with 99 additions and 49 deletions
|
@ -3117,10 +3117,10 @@ static void cliSimplifiedTuning(const char *cmdName, char *cmdline)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void printName(dumpFlags_t dumpMask, const pilotConfig_t *pilotConfig)
|
||||
static void printCraftName(dumpFlags_t dumpMask, const pilotConfig_t *pilotConfig)
|
||||
{
|
||||
const bool equalsDefault = strlen(pilotConfig->name) == 0;
|
||||
cliDumpPrintLinef(dumpMask, equalsDefault, "\r\n# name: %s", equalsDefault ? emptyName : pilotConfig->name);
|
||||
const bool equalsDefault = strlen(pilotConfig->craftName) == 0;
|
||||
cliDumpPrintLinef(dumpMask, equalsDefault, "\r\n# name: %s", equalsDefault ? emptyName : pilotConfig->craftName);
|
||||
}
|
||||
|
||||
#if defined(USE_BOARD_INFO)
|
||||
|
@ -6286,7 +6286,7 @@ static void printConfig(const char *cmdName, char *cmdline, bool doDiff)
|
|||
}
|
||||
|
||||
if (!(dumpMask & HARDWARE_ONLY)) {
|
||||
printName(dumpMask, &pilotConfig_Copy);
|
||||
printCraftName(dumpMask, &pilotConfig_Copy);
|
||||
}
|
||||
|
||||
#ifdef USE_RESOURCE_MGMT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue