-
Notifications
You must be signed in to change notification settings - Fork 53
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
add arcade-drive-xbox-controller example #83
add arcade-drive-xbox-controller example #83
Conversation
self.myRobot = wpilib.drive.DifferentialDrive(m_left, m_right) | ||
self.myRobot.setExpiration(0.1) | ||
|
||
# xbox controller #0 |
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.
Comment not in original example
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.
I left this, but made it match what's in the tank-drive examples for consistency
Responding to all comments in one. Those were cloned from the standard arcade-drive one and mixed with the new stuff from the cpp example. I'll clean that up and make it one-for-one, and update the arcade-drive one as well while I'm in there. |
Thanks. Historically I didn't care as much about matching the official examples, but since going official and being used in documentation I think it's more important to match now. |
I understand completely, and agree. I haven't done much of anything with robotpy (or python at all for that matter), so wasn't sure if there was a reason for it. In any case, should be good now. |
right.setInverted(True) | ||
|
||
def teleopPeriodic(self): | ||
""" |
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.
Generally """
comments describe the whole function's purpose, not a single statement's purpose.
d7add5c
to
af76d1b
Compare
I added comments to match the cpp example. Let me know if you'd rather it be a little simpler like the existing arcade-drive example.
Confirmed it runs in sim