Lua script switch input without RC transmitter

Hi everyone,

I am playing around with the excellent EK3 source switching in ArduPilot.
Testing manually to switch between GPS and optical flow works well, but now I want to try out the applet-script to switch automatically (ahrs-source-gps-optflow.lua).
The issue is: I am flying with a tablet with sticks with a custom GCS, which works really well, but using MAV_CMD_DO_AUX_FUNCTION doesn’t work in the provided script, and I couldn’t find an alternative way to read a switch input into the script in my (rather short) research.

Any pointers?

Thanks!

As a side thought: seems it would be easy if the mavlink MANUAL_CONTROL message would be fully supported

Got an answer on Discord: rc:get_aux_cached(300) works