1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-25 01:05:15 +03:00

Merge pull request #2465 from klutvott123/mcu-id-for-vtx-table-lua

This commit is contained in:
Michael Keller 2021-06-04 01:57:51 +12:00 committed by GitHub
commit ceea7ef60b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 9 deletions

View file

@ -608,16 +608,13 @@ TABS.vtx.initialize = function (callback) {
}
function save_lua() {
const suggestedName = 'model01';
const suffix = 'lua';
let filename;
if(FC.CONFIG.name && FC.CONFIG.name.trim() !== '') {
filename = FC.CONFIG.name.trim().replace(' ', '_');
}else{
filename = suggestedName;
}
filename += `.${suffix}`;
const uid0 = FC.CONFIG.uid[0].toString(16).padStart(8, '0');
const uid1 = FC.CONFIG.uid[1].toString(16).padStart(8, '0');
const uid2 = FC.CONFIG.uid[2].toString(16).padStart(8, '0');
const filename = `${uid0}${uid1}${uid2}.${suffix}`;
const accepts = [{
description: `${suffix.toUpperCase()} files`, extensions: [suffix],