I upgraded to the latest MP beta and loaded ardurover 4.1 dev on my Pixhawk 2.4.8. Ambition is to test Lua scripts. For now using REPL to get the syntax right.
My boat has dual motors, skid steerer (ch 1 and 3). And in addition remote controlled switches for lights (ch 2), a Kogger transducer (ch 4), a battery backup (ch 5) and a Raymarine fish finder (ch 6). Plus two servos controlling dual bait trays (ch 9 and 10). Everything works, using a flysky remote, Mission Planner or my own Carp Pilot app.
I want to create some new abilities and decided to test out Lua scripts. As a start I would like my lights to blink to give a visual indication when I open my bait trays.
The problem is that I cannot get the remote control switches nor the bait trays to respond to the Lua commands. The only thing I am successful at is getting motors to spin (also when boat is not armed) using:
SRV_Channels:set_output_pwm_chan_timeout(channel - 1, pwm value, timeout in ms)
Motors spinning: No problem at all. But using similar commands for the switches or the Servos gives no result (also no error in REPL).
As stated, all switches and Servos work fine using the remote. And also works perfect using the set servo abilities in Mission Planner and Carp Pilot.
Reading through the bindings I cannot find other abilities available for Lua than SRV_Channels. Either I have misunderstood something, or the abilities matching the set servo in MP are not (yet?) available for Lua.
Anyone that have some ideas?