feat: automatically stop all motors when a breakpoint is triggered#22
Conversation
lewisfm
left a comment
There was a problem hiding this comment.
The overall logic seems good, I just have a few code quality concerns to point out.
|
Okay thanks because it is kinda late I will get to them tommarow. |
lewisfm
left a comment
There was a problem hiding this comment.
A few small things mainly about the way you have docs set up, the core functionality looks good. Make sure to run rustfmt
|
@lewisfm Sorry I got really caught up in some personal things but I will try to fix this by the end of the week since it has been a long time since I opened the pr. |
|
@lewisfm could you run CI then I can fix merge conflicts and should be ready to go. |
It won't let me run CI until merge conflicts are fixed (https://github.com/orgs/community/discussions/11265), you should just be able to run them yourself: |
|
I will get to it in the morning to tired for this right now |
|
@lewisfm Should be good to go now |
|
Looks like the build is failing, I think the merge messed up the pr |
|
@lewisfm Okay everything builds and rustfmt works now. |
|
@lewisfm Everything SHOULD pass now I wasnt checking lint and rustfmt the same way ci is |
Summary
Adds a configurable feature that stops all connected Smart Motors (11W and 5,5W) when a breakpoint fires, before the GDB console loop even begins. This prevents a robot from driving away, and all motion in general.
Motivation
I want to learn the codebase, and I generally do that well by adding something to it.
API changed
Behaviour notes
monitor stop_motorson/offtakes effect on the very next breakpoint without having to restarting the program.show_debug_consolepath), not on each single step instruction. Callingstop_all_motors()on every single instruction would make stepping unusably slow and would clear motor state the user may be observing.Testing
I tested on a physical brain didn't really see how testing with Qemu would help