Stopping and restarting scripting immediately reverts to stopped, unless we loaded the script without rebooting the Pixhawk, in which case we get “Lua: open directory (/APM/scripts) failed”, followed by “Lua: no scripts to run”
I’ve got a F7 based flight controller that would barely run scripting, but it had other work to do too where the H7 I’ve got wont even notice if scripting is running plus a bunch of other workload.
So when people say to upgrade to a H7, in this case it really is a very appropriate answer.
Try disabling SRTL and Terrain, and any other optional features.
SRTL_POINTS,0
TERRAIN_ENABLE,0
If you are running harmonic notch filters, change to throttle-based and keep it very simple. No per-motor notches and loop-rate trickery. Provide a .bin flight log if you need more suggestions.