frc1418 / 2018-robot

:robot: Code for our 2018 competition robot, Panthera.
MIT License
3 stars 2 forks source link

Add a threshold for what is considered joystick input. #82

Closed AndrewLester closed 6 years ago

AndrewLester commented 6 years ago

Prevent movement when nudged softly or if it starts off centered.

ErikBoesen commented 6 years ago

Sometimes the joysticks rest at slightly nonzero values, which can make the robot move ever so slightly. We should have a tunable in drive.py and ignore any joystick input under that threshold.

ErikBoesen commented 6 years ago

@JosephCarpenter Take a swing at this.

ArchdukeTim commented 6 years ago

I'll give a hint : this is 1 line of code (that probably means it's a call to a function that handles this sort of thing)

ErikBoesen commented 6 years ago

@twinters007 Can you expand? I looked around all the docs and can't find a helper function. I was expecting we'd just do it as in past years.

ArchdukeTim commented 6 years ago

http://robotpy.readthedocs.io/projects/wpilib/en/latest/wpilib.drive/RobotDriveBase.html#wpilib.drive.robotdrivebase.RobotDriveBase.setDeadband

Sadly the docs don't show inherited members

ErikBoesen commented 6 years ago

Ahhh, of course, the parent class... always forget that.