-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Flapper platform and handling servomotors #1132
Adding Flapper platform and handling servomotors #1132
Conversation
@@ -28,6 +28,7 @@ | |||
"src/utils/src/num.c", | |||
"src/modules/src/controller_mellinger.c", | |||
"src/modules/src/power_distribution_quadrotor.c", | |||
# "src/modules/src/power_distribution_flapper.c", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Python bindings might require some extra work such that they function correctly with the Flapper...
If the second power distribution is included, the build test fails...
Overall I think it looks good! There are two discussion points I can identify though:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this generally looks good!
I mainly have some comments related to ifdefs based on platform, see comments in the code.
Thanks, @tobbeanton!
I agree. In fact I have started working on another PR that should enable more than 4 motors/servos: So how about if I introduce the servo & motor separation there? EDIT: after digging more into the code, this would require much larger change than I thought... Don't think I would find time to do that myself, but am willing to contribute.
I agree it is easier to merge #1131 first |
Thanks for the quick review @krichardsson |
All the issues are fixed, pls let me know if this works. |
Hi! I just did a test flight with our flapper with a controller and the cfclient and it had a major forward pitch eventhough I didn't control it that way. I tested different versions (we have revD):
Could you try it out and see if you see the same? |
@knmcguire Thanks for testing it out! Have you trimmed the servos (especially the pitch servo) after the firmware update? It is stored as a permanent parameter, and I have changed the name of the parameter group from "_flapper" to "flapper". So you have to do it after this firmware update... |
Yes that's it! the flapper.servPitchNeutr had to be adjusted. It was set to 50 but I had to change it to 58. Let me discuss with @krichardsson if there was anything else but if that is it, we'll merge it soon! |
Looking nice and clean! |
Wohoo! Awesome, thanks!
The default value is close, but not exact, this varies from Flapper to Flapper (or from servo to servo, to be precise). The same applies for the yaw servo, though there it is less critical... |
This PR adds a "flapper" platform, together with a "flapper deck", default settings and gain values.
To enable servomotors, which need a non-zero neutral value, additions were made also to motors.c and supervisor.c
(This is a clean version of #1123)
Finally, I include some cleanup after #1121.