Skip to content

Instantly share code, notes, and snippets.

@joelgallant
Created March 10, 2013 20:40
Show Gist options
  • Save joelgallant/5130334 to your computer and use it in GitHub Desktop.
Save joelgallant/5130334 to your computer and use it in GitHub Desktop.
Autonomous commands for gordian
encoderDistance() - Returns the current distance of the left side (resets to 0 at beginning of autonomous and when moving commands are run) (double)
isPastSetpoint() - Returns whether the shooter is at the setpoint RPM (boolean)
gyro() - Returns the angle of the gyro (double)
isEnabled() - Returns whether the driverstation is actually enabled (boolean)
print(Value) - Prints the value to the console
log(Value) - Prints the value to the drivestation, log file and console
arcade(Double, Double) - Drives using speed value and turn value respectively
tank(Double, Double) - Drives using left speed value and right speed value respectively
stop() - Stops the drivetrain
shiftGear() - Switches gear of the drivetrain
driveToSetpoint(Double) - Using PID, drives to an encoder distance
gyroTurn(Double, Double, Double) - Drives until gyro changes by the first value, using the second value as the left speed and the third value as the right speed
moveTo(Double, Double, Double, Double) - Moves to a spot. First value is the x encoder value, second value is the y encoder value, third value is the speed to send the turning side and forth value is the speed to send the non-turning side
autoShoot() - Shoots if the shooter is at setpoint RPM
shoot() - Shoots regardless of RPM
alignShooter(Double) - Moves shooter to a potentiometer value
setShooterSpeed(Double) - Sets the shooter to go at an RPM
stopShooter() - Sets the shooter to 0 RPM
resetDistance() - Resets the encoder distance to 0
collapseAlignment() - Sets the alignment pistons to collapse
extendAlignment() - Sets the alignment pistons to extend out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment