Servers by jDrones

User hooks vs Python scripts

(Spencer Manning) #1

What are the advantages and disadvantages of user hooks vs python scripts when writing custom code for the Pixhawk?

For example, if I wanted to write a flight plan that caused the drone to take-off on a button press, hover at a certain height, then land on sensor input, would I use user hooks for that, or a python script?

So far, it looks like there is a lot more online support for writing Python scripts over user hooks. Also user hooks seem to be more applicable for short, modifications to the already running Ardupilot loops, whereas Python scripts seem to be better at longer modifications. Is that about right?

Thank you!