mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 21:05:30 +03:00
Add 'Pilot name' to the Configurator UI; rename 'Display name' to 'Pilot name'; rename 'name' to 'craft_name'
- add pilot name (display_name) to the Configuration tab - add handling for the 'MSP2_GET_TEXT' and 'MSP2_SET_TEXT' commands - with support for the 'MSP2TEXT_PILOT_DISPLAY_NAME' ('displayName') config prop - backup handling of the 'displayName' config prop - add a text field to configure the pilot name in the 'Configuration/Personalization' box - using the 'display_name' FC config prop and the 'MSP2_GET_TEXT' / 'MSP2_SET_TEXT' MSP commands - add tooltips for both the 'Craft name' and 'Pilot name' fileds - rename the 'Display name' OSD element to 'Display name (Pilot name)' - expand the tooltip descriptions of 'Craft name' and 'Display name (Pilot name)' - change the default 'DISPLAY_NAME' OSD element preview to 'PILOT_NAME' - remove the default 'JOE PILOT' string value of the 'displayName' FC initial config - backwards compatibility handling for 'display_name' pre MSP v1.45 - rename 'display name' to 'pilot name' - add 'FC.CONFIG.pilotName' in place of 'FC.CONFIG.displayName' - add the 'PILOT_NAME' OSD element and keep backwards compatibility for the 'DISPLAY_NAME' OSD element (depending on the MSP version) - rename 'FC.CONFIG.name' to 'FC.CONFIG.craftName' - add the 'MSP2TEXT_CRAFT_NAME' const for 'MSP2_GET_TEXT' / 'MSP2_SET_TEXT' - use 'MSP2_GET_TEXT' / 'MSP2_SET_TEXT' to get/set 'FC.CONFIG.craftName' - keep full backwards compatibility pre MSP v1.45 (using the legacy 'MSP_NAME' / 'MSP_SET_NAME')
This commit is contained in:
parent
3c776758a3
commit
3873f82c23
11 changed files with 254 additions and 47 deletions
|
@ -757,8 +757,11 @@ function generateFilename(prefix, suffix) {
|
|||
if (FC.CONFIG.flightControllerIdentifier) {
|
||||
filename = `${FC.CONFIG.flightControllerIdentifier}_${filename}`;
|
||||
}
|
||||
if(FC.CONFIG.name && FC.CONFIG.name.trim() !== '') {
|
||||
filename = `${filename}_${FC.CONFIG.name.trim().replace(' ', '_')}`;
|
||||
const craftName = semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)
|
||||
? FC.CONFIG.craftName
|
||||
: FC.CONFIG.name;
|
||||
if (craftName.trim() !== '') {
|
||||
filename = `${filename}_${craftName.trim().replace(' ', '_')}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue