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

CTL - Motor Controller Calculators #83

Merged
merged 4 commits into from
Feb 17, 2025

Conversation

jpfbastos
Copy link
Contributor

No description provided.

Copy link

linear bot commented Feb 13, 2025

Copy link
Contributor

@TomLonergan03 TomLonergan03 left a comment

Choose a reason for hiding this comment

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

if you're doing the same approach i did with motors way back (and you defo don't need to, consider other options whether you go with them or not), you'll need all the frequency calculators to share a trait.

probably something like:

pub trait FrequencyCalculator {
    pub fn calculate_frequency(velocity: f32) -> u8;
}

this does mean some of the calculators have to take a irrelevant parameter but for test classes idm that too much

@davidbeechey davidbeechey merged commit a067cf4 into main Feb 17, 2025
14 of 15 checks passed
@davidbeechey davidbeechey deleted the hype-122-motor-controller-frequency-calculators branch February 17, 2025 15:59
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