1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 16:55:24 +03:00

Change the extension of blackbox saved files to BBL and add as prefix

the flight controller identifier.
This commit is contained in:
Miguel 2017-04-11 13:10:26 +02:00 committed by Michael Keller
parent 780451cd38
commit 445b9931bb
4 changed files with 11 additions and 5 deletions

View file

@ -493,8 +493,13 @@ function generateFilename(prefix, suffix) {
var date = new Date();
var filename = prefix;
if (CONFIG && CONFIG.name && CONFIG.name.trim() !== '') {
filename = filename + '_' + CONFIG.name.trim().replace(' ', '_');
if (CONFIG) {
if (CONFIG.flightControllerIdentifier) {
filename = CONFIG.flightControllerIdentifier + '_' + filename;
}
if(CONFIG.name && CONFIG.name.trim() !== '') {
filename = filename + '_' + CONFIG.name.trim().replace(' ', '_');
}
}
filename = filename + '_' + date.getFullYear()