betaflight-tx-lua-scripts
betaflight-tx-lua-scripts copied to clipboard
Changing VTX settings from script causes issues with VTX Table
I am using Betaflight Lua Scripts 1.7.0 (I've even tried the nightly), Betaflight Configurator 10.9.0, Radiomaster TX16S with EdgeTX 2.8.5 and a BetaFPV Meteor 75 Pro updated to BF 4.4.2 and I am using ELRS 3.3.0 on BetaFPV Micro 1W TX and on the quad. If I open the lua script and I adjust some settings in the VTX section and save them and I power off the quad and connect it to Betaflight configurator the VTX table is wiped completely and the settings are not stored. I've tried generating the lua script VTX table from the configurator and retrieving them from the quad but the result is the same. Pratically the VTX section of the script is unusable because after restart the VTX table is completely wiped.
Duplicate of https://github.com/betaflight/betaflight-tx-lua-scripts/issues/482
Duplicate of #482
In my opinion it's not a duplicate, it is a different issue. I have compiled the firmware with VTX and OSD already. If it can be of any help the VTX is a BetaFPV M03 with SmartAudio
Does this happen when making the same changes in the betaflight configurator?
No, it happens only when making changes to VTX parameters using the lua script from the radio. I've tried changing accelerometer trims and PID profiles without issues
can you try downloading the vtx tables again? https://github.com/betaflight/betaflight-tx-lua-scripts#setting-up-vtx-tables
Yes, I've tried multiple times both downloading them from the script on the radio and even generating the lua script from the configurator and copied it manually on the radio but the outcome is the same, as soon as I do one change the VTX table is altered and becomes unusable
That's strange. I'll have to see if I can reproduce
If there's something that I can do to troubleshoot the issue just let me know
Is it the setting of a specific parameter that causes the issue? Could you try 4.4.1 and maybe 4.4.0?
It happened when changing VTX power. I can try to go back to these versions and let you know
I have downgraded to BF 4.4.0 that was the previous release available for my board, and it happens the same. I've noticed one thing, that if I copy the VTX table lua script generated by Betaflight inside the script it works until I change a parameter, but if I download the VTX table from the quad it downloads a different VTX table that is the wiped one that I found inside the configurator. Attached there is the Lua script generated by Betaflight configurator and the lua script that is created inside the radio if I download the VTX table. And there is the VTX table json saved before and after the issue.
Seems like the lua scripts end up with the "empty" vtx table after downloading? We'll have to figure out why that happens then. I just tested this with a betafpv meteor65 board with 4.4.2, and I'm not able to reproduce. Vtx table is correctly downloaded, and I can change all parameters.
@AndreaPro Can you share a diff please?
@AndreaPro Can you share a diff please?
For sure! I have tried both with the stock CLI provided by BetaFPV and with my custom settings but I have the same issue.
Do you have stock settings for your VTX table? Because the CLI on the BetaFPV website for the Meteor 65 appears to have the same VTX table as mine
Got the same issue if I download the vtx table or copy the lua script from betaflight to my controller, it overwrites my vtx table.
Got the same issue if I download the vtx table or copy the lua script from betaflight to my controller, it overwrites my vtx table.
Could you please share more infos about radio firmware version, Betaflight version, script version, drone model, etc...?
Oh ye sure sry, Betaflight version: 4.3 Edge TX version: 2.8.0 (Radiomaster Boxer) Betaflight lua script version: 1.7 Flight controller: Speedybee F405 VTX: TBS Unify Pro32 (https://www.team-blacksheep.com/vtx-table-for-betaflight.txt) (unlocked)
After I try to switch a setting, my VTX table on the flight controller gets overwritten to the same table u shared
The only thing I can think of is that the payload somehow contains more bytes than it should, and this happens: https://github.com/betaflight/betaflight/blob/99be07729963e4b5e5cb540555450bda28bd2781/src/main/msp/msp.c#L3380-L3407
It's strange because in the BF lua scripts we're only sending four bytes back to the FC
@tomekste5 Which RX system are you using?
I am using Express LRS version 3.3 2.4GHz and as a Receiver I use the Radiomaster RP1
I am using Express LRS version 3.3 2.4GHz and as a Receiver I use the Radiomaster RP1
So we have in common ELRS 3.30 2.4GHz
maybe try disabling vtx administrator in the elrs lua script.
maybe try disabling vtx administrator in the elrs lua script.
I have tried VTX administrator in elrs lua script because the Betaflight script was destroying the VTX table, but I have never used it before discovering this issue
try disabling it by setting "band" to "off". did this happen with earlier versions of elrs? the payload sent back from the betaflight lua scripts is only 4 bytes, but if more bytes are sent the vtx tables could be reset. not sure where those bytes are coming from. needs more investigating.
try disabling it by setting "band" to "off". did this happen with earlier versions of elrs? the payload sent back from the betaflight lua scripts is only 4 bytes, but if more bytes are sent the vtx tables could be reset. not sure where those bytes are coming from. needs more investigating.
I have tried the Betaflight lua directly starting with ELRS 3.3.0. I will try disabling it but I am sure that the first time that I have noticed this issue I haven't enabled VTX admin yet
I have never enabled VTX administrator
maybe try disabling vtx administrator in the elrs lua script.
If it's not too much hassle, could you guys please try ELRS 3.0? I'm not saying elrs is the issue, but we need to rule things out. As I said, the payload sent from the bf lua scripts is 4 bytes, but it could be that zero padding or something is added somewhere along the way to the FC.
There is no target for the internal module of the Boxer radio in ExpressLRS v3.0
If it's not too much hassle, could you guys please try ELRS 3.0? I'm not saying elrs is the issue, but we need to rule things out. As I said, the payload sent from the bf lua scripts is 4 bytes, but it could be that zero padding or something is added somewhere along the way to the FC.
I can try it and let you know
Have the same issue with
- Meteor65, Betaflight 4.42, ELRS 3.3 2.4GHz LBT
- SpeedyBee F405 Mini BLS 35A 20x20 Stack, Betaflight 4.42, ELRS 3.3 2.4GHz LBT (BetaFPV lite receiver) and TBS Pro 32 Unify nano.
Transmitter
- FrSky QX7 ACCST with BetaFPV ELRS 2.4GHz 1W module at ELRS 3.3 (150Hz currently due to limits of the X7)
Configuration through betaflight works fine (OSD or Configurator), just activating the LUA script even with vtx tables from betflight configurator switches the vtx channel to another band. After that nothing works and a reboot is required to reset to the old settings.
[EDIT] Tested VTX Admin in the ELRS lua script: that works fine and is able to reset the vtx config to a normal state. Never tried that before, but after this is set in ELRS the betaflight lua vtx script no longer changes the band.