diff --git a/locales/en/messages.json b/locales/en/messages.json index f2eee4a1..2ced5055 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -5694,7 +5694,7 @@ "description": "Save Lua script button in the VTX tab" }, "vtxLuaFileHelp" :{ - "message": "The '$t(vtxButtonSaveLua.message)' button will allow you to save a craftname.lua file containing the vtx table configuration that can be used with the betaflight lua scripts. (See more here.)", + "message": "The '$t(vtxButtonSaveLua.message)' button will allow you to save a mcuid.lua file containing the VTX table configuration that can be used with the Betaflight TX Lua Scripts.

Version 1.6.0 and above can use the file as is, but for older versions of the scripts it should be renamed to match the modelname on the TX.", "description": "Tooltip message for the Save Lua script button in the VTX tab" }, "vtxButtonLoadFile": { diff --git a/src/js/tabs/vtx.js b/src/js/tabs/vtx.js index c394d7d6..c6c32952 100644 --- a/src/js/tabs/vtx.js +++ b/src/js/tabs/vtx.js @@ -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],