Ejemplo n.º 1
0
  /** Sets the navigator to move along x and y by X and Y. */
  public void setTarget(double x, double y) {
    if (!calibrator.isCalibrated()) return;
    MathUtils.set(target, x, y);
    MathUtils.set(offtarget, target);
    calibrator.getRequiredSteps(target);
    targetSet = true;
    steps.x = (steps.x > 0) ? (int) (steps.x + 0.5) : (int) (steps.x - 0.5); // round no. of steps
    steps.y = (steps.y > 0) ? (int) (steps.y + 0.5) : (int) (steps.y - 0.5);

    calibrator.adjustBacklash(steps);
  }