Shooterlights#114
Conversation
rajitzg
left a comment
There was a problem hiding this comment.
Overall looks pretty good, but there are a couple changes that need to be made. Also, try applying spotless again— it seems to be complaining (it's always very pedantic)
| Robot.lights.signalStartSpinup(); | ||
| visionContext = context.startAsync(new DriverShootNow()); | ||
| if(isAtGoodSpeed.isNewlyTriggering()) { | ||
| Robot.lights.signalAtSpeed(); |
There was a problem hiding this comment.
Also, for the startSpinup and atSpeed lights signals, it might be better to do that in BoxopOI where the shooter is actually triggered. Sorry the code is a little unclear right now, but this only rotates the robot and waits for the shooter to be ready before shooting instead of actually spinning up and down the shooter.
There was a problem hiding this comment.
Does it make a difference in how it works, or is it just to make more sense and be more organized? If it's not on getButtonPressed, wouldn't it just continually check no matter which class it's in? I can still move it to driverOI, but I think it would be the same?
There was a problem hiding this comment.
wait it does make a difference for signalStartSpinup, but probably not for signalAtSpeed
|
FYI, another way to do this (for future) would be:
that way, we tie the lights directly to the boxop starting up the shooter. |
Made the isNotZero method use the speed tolerance instead of actually using zero
Moved the if-statement for activating the signalAtSpeed method out of the button pressed if-statement
|
Looks better, but I think you forgot to re-add the lightsStartupShooter in boxopOI. It would be better to have all of the logic in there but not critical for now (although specifically for the signalShotComplete I think where you have right now in driverOI is better). Also, remember to run spotlessApply again. |
|
I did put it into BoxOpOI, it's line 180. |
Description
Lights turn cyan when spinup starts and lime green when at speed.
How Has This Been Tested?
I built it and got no errors. Other than that it has not been tested