-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Prevent Movement after Auto #98
Conversation
Great idea! I disagree with the implementation though. I try to "Do not repeat yourself" as much as possible. Perhaps a bool attribute (see debounce) instead so execute pulls the current orientation instead of using the controller after initialize sets the debounce and execute unsets it. |
I changed it around. I don't know that I love this option but it doesn't repeat code. |
Alright should be good now |
It may look uglier but it follows more rules than it breaks. This also uses less lines and less cycles so it is more performant. |
You did forget to set |
Ok I can fix that. Should I set it to private or public? |
I set it to private based on the minimal amount of research I did. |
Private is correct. |
Add code to prevent the robot from moving after auto as the robot will attempt to rotate back to the initial heading as desired by the default command