Пример #1
0
  public static final void setBigEndianOut(boolean isBigE) {
    final boolean oldEndian = isBigEndianOut;
    isBigEndianOut = isBigE;

    if (oldEndian != isBigEndianOut)
      if (isBigEndianOut) Launcher.addUserActivity("Set output endian: big endian");
      else Launcher.addUserActivity("Set output endian: little endian");
  }
Пример #2
0
    public void run() {

      while (more) {

        // System.out.println("call V");
        MyArbitrator.objects = Launcher.findObjects();
        //	System.out.println(" Arbit ball "+
        // MyArbitrator.objects[2].getCentre().x+","+MyArbitrator.objects[2].getCentre().y);

        // System.out.println("ball " + MyArbitrator.objects[2].getCentre().x);
        visCall++;
        //	System.out.println("Vision Called" + visCall);

        //	System.out.println(" mon while" + monitorw);
        //  ObjectItem[] objects = Launcher.findObjects();
        //  System.out.println("call V");
        // FIND HIGHEST PRIORITY behaviour THAT WANTS CONTROL
        synchronized (this) {
          _highestPriority = NONE;
          for (int i = maxPriority; i >= 0; i--) {
            if (MyArbitrator._behaviour[i].takeControl(MyArbitrator.objects)) {

              _highestPriority = i;
              break;
            }
          }

          int active = _active; // local copy: avoid out of bounds error in 134
          if (active != NONE && _highestPriority > active) {
            MyArbitrator._behaviour[active].suppress();
          }
        } // end synchronize block - main thread can run now
        Thread.yield();
      }
    }
Пример #3
0
  public void action() {
    System.out.println("Cannot find angle");
    Launcher.sendCommand(Constants.BACKWARD + 10);
    try {
      Thread.sleep(500);
    } catch (InterruptedException e) {

    }
  }