Skip to content
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

Python bindings for power distribution #1023

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

whoenig
Copy link
Contributor

@whoenig whoenig commented Apr 14, 2022

The current firmware code mixes power distribution and motor control,
so this change also includes refactoring for improved separation:

  • powerDistribution() now outputs motors_thrust_t
  • All low-level motor functionality (including logging and motorSet
    params) are moved to motors.c
  • powerStop() is renamed to motorsStop() to reflect the source module
  • stabilizer initializes the motors and has a more verbose call for the
    actual actuation

The current firmware code mixes power distribution and motor control,
so this change also includes refactoring for improved separation:

* powerDistribution() now outputs motors_thrust_t
* All low-level motor functionality (including logging and motorSet
  params) are moved to motors.c
* powerStop() is renamed to motorsStop() to reflect the source module
* stabilizer initializes the motors and has a more verbose call for the
  actual actuation
@whoenig whoenig requested review from tobbeanton and knmcguire April 14, 2022 12:02
Copy link
Member

@tobbeanton tobbeanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works well!

It is probably not for this PR but now everything is tied to 4 motors. Perhaps we could change the interface to arbitrary amount if motors at some point.

Copy link
Contributor

@knmcguire knmcguire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1024 mentions the enabling of more than 4 motors. Hopefully by that time, the python bindings are already part of the CI and we are aware if anything goes wrong.

@knmcguire knmcguire merged commit 444e02e into bitcraze:master Apr 19, 2022
@knmcguire knmcguire added this to the next release milestone May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants