-
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
feat(flex-stacker): stream motor driver stall guard value during move #468
base: edge
Are you sure you want to change the base?
Conversation
b68fc85
to
5b80425
Compare
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.
Thank you for setting this up and I'm glad it's working!
A few comments
-
It could get hard to manage multiple tasks from the same module, usually, we have one task per module. So if we want to go the new task route it would make sense to pull the
run_stallguard_task
into its own file that follows themotor_task.hpp
andmotor_driver_task.hpp
framework. -
Alternatively, instead of creating a new task, we could also use the
freertos_timer.hpp
to set up a timer from themotor_driver_task
that callsread_stallguard
and sends the result over USB. We use the timer with the Hepa/UV in the ot3-firmware repo, you can find that here.
cb3bed8
to
5b80425
Compare
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.
10ms feels pretty fast for a text-mode UART but hey the math says it works so we good
This PR creates a freertos task that handles the streaming of the stall guard value if requested in the move. The stall guard result from the motor driver will be reported via a
M900
message every 10 ms while the motor is in motion.Any concerns regarding how the freertos task is created/executed?