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

refactor(flex-stacker): linear motion system and motor task #473

Merged
merged 6 commits into from
Nov 7, 2024

Conversation

ahiuchingau
Copy link
Contributor

This PR simplifies things a bit in the motor task which helps make implementation of the homing routine a bit easier later.

Copy link
Member

@sfoster1 sfoster1 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 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 {
Copy link
Member

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

Copy link
Contributor Author

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));
Copy link
Member

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

@ahiuchingau ahiuchingau merged commit 48519bf into edge Nov 7, 2024
12 of 13 checks passed
@ahiuchingau ahiuchingau deleted the refactor_motor-task branch November 7, 2024 19:47
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