Servers by jDrones

Is there a way to get Smart Audio?

I have been looking back through older posts concerning Smart Audio functionality - or the lack of. I am wondering if anything as changed?

I have been using Ardupilot for a few years now, mainly copter. I am in the process of building my first proper plane, and i really want to stick with Ardupilot. But i really want to be able to have at least a very basic control over my vtx, really all i am interested in is switching the power levels. I really am not bothered about having the osd function, just being able to switch between 2 or 3 power levels via a switch on my Taranis would be more than enough. Does anyone know if this can be done? My vtx is tucked away in a bay on the underside of a wing, so not easy to get at to quickly change it manually before take off.

Any suggestions on how and if this could be achieved would be gratefully received. Thanks.

It would be possible to write a onboard lua script for this on master, lua access to serial ports has not made it to stable yet.

If I wanted to run a Lua script from the Simulator in Mission Planner, what directory would I place it in?

Nevermind, I found it I think. I created a scripts folder and put the sample script in it and no more “no lua scrips to run” errors so it’s probably working.

1 Like

Thank you both. I have never used Lua scripts before, to be honest i would not have a clue how to compile one, or what it would need to include. I will do a bit of googling to learn about them and how to write and use them. And hopefully i will find some info on what needs to go into one for Smart Audio.
If i can get that far i will come back and ask for help on how i can use it with Ardupilot and Mission Planner. I am guessing i would have to use the command line interface?, that is something else i have not delved into before.

But thank you again for your replies, at least i have a direction to look to now. :slight_smile:

Have a look here it goes into some depth but might help, I too have been looking at how I can intigrate lua scripting as it has a ton of functionality to it.

This is the scripting read-me

There are several examples

The only limitation is you need a board with greater the 1MB of flash, this rules out some of the ‘betaflight’ boards

Yes. Matek F765-Wing is one of the few. Or the only one…

Thanks again for the replies. I have a feeling that it’s going to be over my head, i am not very good at that type of thing. Also, for the time being i will be using an Omnibus F4 SD f/c, which i believe is only 1mb of flash memory. But i would be open to changing the f/c to some kind of pixhawk if the script option was a bit easier to understand.

I can only hope that Smart Audio support will one day make it into a master or beta build. Being able to switch vtx power levels remotely really is a great idea, especially if fiddling around with some things once the craft is powered on, with your vtx getting hotter by the second.

If anyone has got any other ideas on a way of simply switching the power level i would love to hear it. Thanks!

I think i may have found a way around my problem. I had a spare F4 nano v6 f/c that was looking for a use. I have connected it to the SBUS line coming from my receiver to my main flight controller. I have Arduplane on the main f/c, and have betaflight on the nano f/c. So far the two of them seem to be quite happy together - would i be correct in thinking SBUS is only a one way link between rx and f/c? If so it is my hope that they will not interfere with each other. Which, so far in testing this appears to be the case - i have both Betaflight and Mission Planner connected to the flight controllers, and i have duplicate control over both of them at the same time.

My crazy idea is to run my video feed through a cheap video switcher - i have had no issues with the hobbyking one in the past, then i can connect my smart audio cable to the betaflight controller. Then when i want to make a change to the vtx power settings i can flick a switch to change over to the video feed from the Betaflight controller. I could also stop and start recording on my Runcam hybrid from the Betaflight f/c.

I am going to carry on testing. I will not implement it on the final build yet, this is my first plane, and my first time with Arduplane, all my previous experience with ardupilot was with hexacopters and quads. So i want to get used to flying a plane, and i want to get used to the various flight modes, because obviously if i am going to be using the sticks to enter the Smart Audio menu i don’t want the plane freaking out whilst i am doing that. In fact i might see if i can map a couple of switches on my Taranis to take me into the Smart-Audio menu.

The Nano and the video switcher together only weigh about 13g, so i am not bothered about the extra weight. A mad idea i know, but like i said, i am at a loss when it comes to things like Lua scripts and how to use them, so i will try this roundabout route!

1 Like

I have simplified my idea, i think i can now do all that i need without the use of a video switcher. Thanks to a video posted by Painless360 i have learnt that if i put iNav onto my second f/c i can simply set a spare 3 position switch to change my vtx power levels. Still via smart audio, but doing away with the need of having to do via the osd menu.

So, once it is all together i will be able to stop and start recording on my Runcam Hybrid, plus change power levels of my vtx. All done separately from the main f/c that is running Ardupilot. I have spent a lot of time on the bench running both the iNav f/c and the Ardupilot f/c together from the same RX (R9 Slim). I have not been able to create any kind of conflict between the f/c’s even though they share the same Sbus line. So hopefully all will be well. All i need now is some decent weather to go out and get some flying in!

Servers by jDrones