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

Fix lua powerTable

The entries in this table should be strings.
This commit is contained in:
Hans Christian Olaussen 2020-02-17 22:32:15 +01:00
parent 855ab72e03
commit b9f5536d93

View file

@ -588,7 +588,7 @@ TABS.vtx.initialize = function (callback) {
writer.onwriteend = function() {
dump_html_to_msp();
const vtxConfig = createVtxConfigInfo();
const text = creatLuaTables(vtxConfig);
const text = createLuaTables(vtxConfig);
const data = new Blob([text], { type: "application/text" });
// we get here at the end of the truncate method, change to the new end
@ -935,7 +935,7 @@ TABS.vtx.initialize = function (callback) {
return vtxConfig;
}
function creatLuaTables(vtxConfig) {
function createLuaTables(vtxConfig) {
let bandsString = "bandTable = { [0]=\"U\"";
let frequenciesString = "frequencyTable = {\n";
@ -957,7 +957,7 @@ TABS.vtx.initialize = function (callback) {
const powerList = vtxConfig.vtx_table.powerlevels_list;
let powersString = "powerTable = { ";
for (let index = 0, len = powerList.length; index < len; ++index) {
powersString += `[${(index + 1)}]=${powerList[index].label}, `;
powersString += `[${(index + 1)}]="${powerList[index].label}", `;
}
powersString += "},\n";