示例#1
0
 public void action() {
   suppressed = false;
   Main.left.forward();
   Main.right.forward();
   while (!suppressed)
     Thread
         .yield(); // A hint to the scheduler that the current thread is willing to yield its
                   // current use of a processor.
   Main.left.stop(true); // clean up with fix for problem in detectBlackLine
   Main.right.stop(true);
 }
  @Override
  public void action() {
    turn_right = true;

    boolean temp = false;
    while (turn_right) {
      // this could work for a forward moving turning mechanic
      if (!temp) {
        sharedPilot.robot.steer(correction);
        temp = true;
      }
      Thread.yield();
    }
  }