See https://www.thebluealliance.com/team/4454
This is the offical repository for 4454's robot "Ellie the Elephant bot." Code is fully commented this year for use for future/current members of our team.
for what we care about
frc_2019
/src
/main
/java
/frc
/robot
Main.java
Robot.java
GripPipeline.java
Nothing really happens here... Just WPILib required stuff. In other words, do not touch!
Where the magic happens!
controlLoop()
: This code is where all of the code required for teleop is located.
teleopPeriodic()
: When robot is in periodic mode this code is run in a constant loop until disabled.
autonomousPeriodic()
: See teleopPeriodic()
driveRobot()
: This code contains all the logic required to drive the robot!
gearShift()
: Checks what gear the robot should be in based on button presses.
getDrivePowerScale()
: Checks based on trigger presses what speed the robot should go in.
runForebar()
: Runs the 4bar mech we had this year.
setArmPiston(boolean state)
: Code for arm to see if it should be open or closed based on state
boolean.
setArmMotors(boolean in, boolean out)
: Code for running arm motors based on in
and out
booleans.
setClimber(boolean front, boolean back)
: Sets state of climber pistons based on front
and back
booleans.
runElevator()
: Runs elevator motors.
displayShuffleboard()
: Puts debugging things on the shuffleboard (smart dashboard).
autoAlign()
: Auton that lines up robot to goal when button is pressed based on vision code. See GripPipeline.java
.
elevatorHeights()
: Auton for setting what height of the elevator the robot should be.
forebarAngles()
: Auton for setting 4bar angle.
isPOVup(Joystick joystick)
: Sees if POV control of joystick
is pointing up.
isPOVdown(Joystick joystick)
: Sees if POV control of joystick
is pointing down.
isPOVleft(Joystick joystick)
: Sees if POV control of joystick
is pointing left.
isPOVright(Joystick joystick)
: Sees if POV control of joystick
is pointing right.
calculateTotalHeight(double arm_angle)
Calculates height of 4bar (used to be called arm) based on its angle ( arm_angle
).
pidWrite(double output)
: See autoAlign()
.
Code generated by GRIP. See https://wpilib.screenstepslive.com/s/currentCS/m/vision/l/672730-generating-code-from-grip