Exemplo n.º 1
0
  public boolean calibrateTopCamera() {
    boolean res = false;

    if (connection.isConnected()) {
      if ((getStatus() & Status.CALIBRATION_ARM_L_DOWN.getValue()) > 0) {
        res = setMode(Mode.EXPOSITION_WITH_CALIBRATION_LIGHTS.getValue());
      }
    }

    return res;
  }
Exemplo n.º 2
0
  public boolean calibrationStartWait() {
    if (connection.isConnected()) {
      for (int i = 0; i < PlcConstants.LONG_ITERATIONS; i++) {
        try {
          Thread.sleep(PlcConstants.LONG_SLEEP_TIME);
        } catch (InterruptedException e) {
          e.printStackTrace();
        }

        boolean topCalibArmDown = (getStatus() & Status.CALIBRATION_ARM_L_DOWN.getValue()) > 0;
        boolean frontCalibArmDown = (getStatus() & Status.CALIBRATION_ARM_D_DOWN.getValue()) > 0;

        if (topCalibArmDown && frontCalibArmDown) {
          return true;
        }
      }
    }

    return false;
  }