mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-20 23:05:15 +03:00
Fix lua powerTable
The entries in this table should be strings.
This commit is contained in:
parent
855ab72e03
commit
b9f5536d93
1 changed files with 3 additions and 3 deletions
|
@ -588,7 +588,7 @@ TABS.vtx.initialize = function (callback) {
|
||||||
writer.onwriteend = function() {
|
writer.onwriteend = function() {
|
||||||
dump_html_to_msp();
|
dump_html_to_msp();
|
||||||
const vtxConfig = createVtxConfigInfo();
|
const vtxConfig = createVtxConfigInfo();
|
||||||
const text = creatLuaTables(vtxConfig);
|
const text = createLuaTables(vtxConfig);
|
||||||
const data = new Blob([text], { type: "application/text" });
|
const data = new Blob([text], { type: "application/text" });
|
||||||
|
|
||||||
// we get here at the end of the truncate method, change to the new end
|
// 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;
|
return vtxConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
function creatLuaTables(vtxConfig) {
|
function createLuaTables(vtxConfig) {
|
||||||
|
|
||||||
let bandsString = "bandTable = { [0]=\"U\"";
|
let bandsString = "bandTable = { [0]=\"U\"";
|
||||||
let frequenciesString = "frequencyTable = {\n";
|
let frequenciesString = "frequencyTable = {\n";
|
||||||
|
@ -957,7 +957,7 @@ TABS.vtx.initialize = function (callback) {
|
||||||
const powerList = vtxConfig.vtx_table.powerlevels_list;
|
const powerList = vtxConfig.vtx_table.powerlevels_list;
|
||||||
let powersString = "powerTable = { ";
|
let powersString = "powerTable = { ";
|
||||||
for (let index = 0, len = powerList.length; index < len; ++index) {
|
for (let index = 0, len = powerList.length; index < len; ++index) {
|
||||||
powersString += `[${(index + 1)}]=${powerList[index].label}, `;
|
powersString += `[${(index + 1)}]="${powerList[index].label}", `;
|
||||||
}
|
}
|
||||||
powersString += "},\n";
|
powersString += "},\n";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue