Add time delay to GUIDED mode

How can I add a time delay option to GUIDED mode?
So that the vehicle is not always in it, but only for the specified time. And when it expires, switch back to AUTO mode.

Look into Lua scripting to enable such a feature.

How can I add a numerical time parameter from the ground station to the script? Use some already existing parameter?

Assuming you are using a capable autopilot, Lua scripts run onboard (not on the GCS).

If you want to send information from the GCS, a custom parameter can easily be created and used. You could modify that parameter directly via Mission Planner or even use an RC switch to increment/decrement it.

Yes, I want to send information from the GCS Mission Planner. How can I created and used custom parameter? In Mission Planeer I need to add to set this parameter?

You add the parameter via scripting, and when you reboot and refresh the parameter list, it will be available in Mission Planner.


Thanks for the help. Another problem has surfaced. My PixhackV3X does not want to run scripts in any way. SCR_ENABLED=1. SCR_HEAP_SIZE=16000. In the messages he writes: Scripting: stopped.
If I change SCR_HEAP_SIZE, then in general - Scripting: Unable to allocate memory. Firmware latest 4.3.1

Set up LOG_FILE_BUFSIZE = 8 - and all it is OK!

1 Like