Beispiel #1
0
 /*
  * Terminates all programs that might currently run.
  */
 private void endAllPrograms() {
   if (barcode != null) {
     barcode.end();
   }
   if (lineFollowing != null) {
     lineFollowing.end();
   }
   if (maze != null) {
     maze.end();
   }
   if (bridge != null) {
     bridge.end();
   }
   if (elevator != null) {
     elevator.end();
   }
   if (seesaw != null) {
     seesaw.end();
   }
   if (chainBridge != null) {
     chainBridge.end();
   }
   if (rolls != null) {
     rolls.end();
   }
   if (finalSpurt != null) {
     finalSpurt.end();
   }
   if (endboss != null) {
     endboss.end();
   }
 }
Beispiel #2
0
  /*
   * Initializing the chain bridge mode.
   */
  private void chainBridge() {
    this.chainBridge =
        new ChainBridge(
            drive, sonicSensor, sonicMotor, colorSensor, touchLeftSensor, touchRightSensor);
    chainBridge.run();

    // Start search for barcode.
    if (RACE_MODE && PROGRAM_FINISHED_START_BARCODE) {
      PROGRAM_FINISHED_START_BARCODE = false;
      LCD.clear();
      System.out.println("Mode: Barcode");
      barcode(true);
    }
  }