Skip to content

Implement new controller for autonomous flight #91

Answered by krichardsson
alexandraH99 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

Controllers are plugins (sort of) and should be pretty straight forward to add.

Controllers are registered in https://github.com/bitcraze/crazyflie-firmware/blob/master/src/modules/src/controller.c#L24-L29
As you can see you have to implement 3 functions (init, test and update) that you pass on to the system in the registration.
Add a new line in the registration after the INDI controller and add your functions here.

Add a new identifier in https://github.com/bitcraze/crazyflie-firmware/blob/master/src/modules/interface/controller.h#L31-L37 (after the ControllerTypeINDI but before ControllerType_COUNT)

Add a new c-file for your controller and add it to the Kbuild file https://github.c…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@krichardsson
Comment options

@krichardsson
Comment options

@alexandraH99
Comment options

@krichardsson
Comment options

@alexandraH99
Comment options

Answer selected by krichardsson
Comment options

You must be logged in to vote
3 replies
@knmcguire
Comment options

@knmcguire
Comment options

@Carmol1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment