text
stringlengths 0
715
|
---|
Brain.Screen.print("Battery current: "); |
Brain.Screen.print(Brain.Battery.current()); |
Brain.Screen.newLine(); |
Brain.Screen.print("Left Motors temp: "); |
Brain.Screen.print(Left1.temperature(percent)); |
Brain.Screen.print(" "); |
Brain.Screen.print(Left2.temperature(percent)); |
Brain.Screen.print(" "); |
Brain.Screen.print(Left3.temperature(percent)); |
Brain.Screen.newLine(); |
Brain.Screen.print("Right motors temp: "); |
Brain.Screen.print(Right1.temperature(percent)); |
Brain.Screen.print(" "); |
Brain.Screen.print(Right2.temperature(percent)); |
Brain.Screen.print(" "); |
Brain.Screen.print(Right3.temperature(percent)); |
Brain.Screen.newLine(); |
Brain.Screen.print("Kicker temp: "); |
Brain.Screen.print(Kicker.temperature(percent)); |
Brain.Screen.newLine(); |
Brain.Screen.newLine(); |
autonTask.stop(); |
auton = false; |
} |
void buttonYPressed() { |
//start autonomous if A is held down while pressing Y |
if (Controller1.ButtonA.pressing()) { |
autonomousProgramWrapper(); |
} else { |
autonType++; |
if (autonType > 7) autonType = 0; |
printControllerSetup(); |
Controller1.Screen.print("Auton type: "); |
Controller1.Screen.print(autonType); |
} |
} |
void buttonXPressed() { |
//turn on or off the kicker |
kickerOn = !kickerOn; |
if (kickerOn) { |
KickerLED.on(); |
} else { |
KickerLED.off(); |
Kicker.stop(); |
} |
} |
void buttonR2Pressed() { |
wingsActive = !wingsActive; |
if (wingsActive) { |
Wings1.set(true); |
Wings2.set(true); |
} else { |
Wings1.set(false); |
Wings2.set(false); |
} |
} |
void buttonL1Pressed() { |
Intake.spin(forward, 11, volt); |
} |
void buttonL1Released() { |
Intake.stop(); |
} |
void buttonL2Pressed() { |
Intake.spin(reverse, 11, volt); |
intakeOn = true; |
if (Controller1.ButtonB.pressing()){ |
curveDrive = !curveDrive; |
if (curveDrive) { |
printControllerSetup(); |
Controller1.Screen.print("Curve Drive Active"); |
} else { |
printControllerSetup(); |
Controller1.Screen.print("Linear Drive Active: "); |
} |
} |
} |
void buttonL2Released() { |
Intake.stop(); |
intakeOn = false; |
} |
void buttonUpPressed() { |
elevationActive = !elevationActive; |
if (elevationActive) { |
ElevationPiston.set(true); |
} else { |
ElevationPiston.set(false); |
} |
} |
void buttonDownPressed() { |
scraperActive = !scraperActive; |
if (scraperActive) { |
Scraper.set(true); |
} else { |
Scraper.set(false); |
} |
} |
void buttonLeftPressed() { |
//recalibrate inertial |
Inertial.calibrate(); |
int calibrateTimer = 0; |
Subsets and Splits