-
Notifications
You must be signed in to change notification settings - Fork 12
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
refactor(flex-stacker): linear motion system and motor task #473
Conversation
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.
Looks good to me, two nits
// NOLINTNEXTLINE(misc-non-private-member-variables-in-classes) | ||
float pulley_diameter; // mm | ||
[[nodiscard]] constexpr auto get_mm_per_rev() const -> float { | ||
class BeltConfig { |
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.
[nit] If everything is going to be public might as well keep it a struct
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.
yes yes
break; | ||
} | ||
motor_state(m.motor_id).lms_config.microstep = | ||
static_cast<float>(pow(2, m.microsteps_power)); |
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 that if you make this pow(2.f, m.microsteps_power)
it'll remain a float without the static cast
This PR simplifies things a bit in the motor task which helps make implementation of the homing routine a bit easier later.