frc868 / 2019-Robot

Deprecated command-based code for FRC 868's 2019 robot, Burnout
2 stars 0 forks source link

Implement auto stoping of subsystems based on limits #15

Closed armaangoel78 closed 5 years ago

armaangoel78 commented 5 years ago

Not sure of a good way to do this. Using the update() function on the subsystem is less than ideal as it will be called even when the robot is disabled. Implementing it in commands is not great as it requires that we implement this in multiple files.

aryker commented 5 years ago

For limit switches, I would recommend using the hard limit switch ports on the Talons, which doesn't require code to function.

armaangoel78 commented 5 years ago

But do we have enough breakouts? Also if we do this imo it should only be done for actual limit switches, not detection switches for ball and hatch (since we don't necessarily want those to autostop).

aryker commented 5 years ago

We should have enough breakouts. Derek made a lot of them for us.

I agree, we should only use that feature for hard limits, like end of travel for the elevator/claw tilt.

If you want to be selective about the non-limit cases, I think the best way is to implement it in commands as needed. It will involve more typing, but it will also allow you to customize the behavior of the robot more completely.