-
Notifications
You must be signed in to change notification settings - Fork 1
Drivetrain::faceDirection method implemented #13
Conversation
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.
Add a function that will make the robot snap to the nearest (front or back)
Oh so it will check if the robot is closer to the front or back and then move to the closer one? |
Yes |
@CrashTestCoder Does this work (I haven't linked it to a button or anything but I implemented it into the Drivetrain cpp & hpp).
|
Yeah go ahead and look in the code since github completely messed up the formatting. |
Please clean up line 81, you can make errorTheta const If you move your ternary operator to line 80 (part of cleaning). You also don't need to make currentRotation degree_t as all that's accomplishing is making your code more complex in this circumstance and doesn't really add type safety because all you're doing is immediately converting back to a double |
Uh btw the code in master branch doesn't compile... |
Why didn't you make face_closest call face_direction instead of copy pasting the code from there? |
@CrashTestCoder Can we merge this now, or are we going to merge it along with velocity? |
No description provided.