mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 12:55:14 +03:00
Merge pull request #2798 from krasiyan/1877-display-name-configuration
Add 'Pilot name' to the Configurator UI; rename 'Display name' to 'Pilot name'; rename 'name' to 'craft_name'
This commit is contained in:
commit
4f9348742d
11 changed files with 254 additions and 47 deletions
|
@ -763,8 +763,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