コード例 #1
0
ファイル: GUI.java プロジェクト: ThePrimus/LegoPraktikum
 /*
  * 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();
   }
 }
コード例 #2
0
ファイル: GUI.java プロジェクト: ThePrimus/LegoPraktikum
  /*
   * Initializing the bridge mode.
   */
  private void bridge() {
    this.bridge = new Bridge(drive, sonicMotor, leftMotor, rightMotor, sonicSensor, colorSensor);
    bridge.run();

    // Change bridge -> elevator
    if (RACE_MODE && PROGRAM_CHANGED && PROGRAM_STATUS == PROGRAM_ELEVATOR) {
      PROGRAM_CHANGED = false;
      LCD.clear();
      System.out.println("Mode: Elevator");
      elevator();
    }
  }