New flight Mode

Hello all,

I wanna program a new flight mode in PIXHAWk, i’m new on drone programmation. I read the PX4 tutorial (Hello sky!) now I know how to subscribe and publish in uORB message, but it’s far from programming a flight mode.
Wich message i need to publish to control motors ?
There are any other tutorial, or documents that can help?

Thank’s

Have you seen these docs?
https://dev.px4.io/en/concept/architecture.html

There is also a library for Flight Tasks which should allow you to add your flight task on a high level. The mode change itself is a bit tricky because it involves communicating that mode via either RC or MAVLink. For now I would suggest, as a hack, that you add your Flight Task and then use a parameter to enable it for you instead of another mode.

1 Like

I read the docs, it’s useful.

I’m begginner in PX4, would you be more specific. where i need to add flight task, In C file like the px4_simple_app ? there is any tutorial ?

Ty

Read this again please, this should be a starting point.

1 Like

I saw the flighttasks library in src/lib, do you mean by “that you add your Flight Task and then use a parameter to enable it for you instead of another mode” to write an application using flighttasks functions ?

First write your Flight task and enable it using a parameter instead of another flight task.