Loading src/main/java/CalibrationHardwareInterface.java +6 −1 Original line number Diff line number Diff line Loading @@ -2609,7 +2609,7 @@ public class CalibrationHardwareInterface { nanoETA=System.nanoTime()+((long)(1E9*(Math.abs(this.targetPosition[motorNumber]-this.curpos[motorNumber])*(this.coefficientETA/this.stepsPerSecond)))); return true; } /* public boolean [] checkGotTarget(){ updateMotorsPosition(0); // no wait here boolean [] result=new boolean [this.curpos.length]; Loading @@ -2618,6 +2618,11 @@ public class CalibrationHardwareInterface { } return result; } */ public boolean checkGotTarget(int motorNumber, int position){ updateMotorsPosition(0); // no wait here return Math.abs(position-this.curpos[motorNumber])<this.motorTolerance; } public boolean waitMotor( int motorNumber, Loading src/main/java/Goniometer.java +2 −2 Original line number Diff line number Diff line Loading @@ -476,7 +476,7 @@ horizontal axis: AtomicInteger stopRequested, // or null boolean updateStatus){ String status; if (!this.goniometerParameters.goniometerMotors.checkGotTarget()[axialMotor]) { if (!this.goniometerParameters.goniometerMotors.checkGotTarget(axialMotor,axialMotorPosition)) { status="Moving axial motor to "+axialMotorPosition+"..."; if (updateStatus) IJ.showStatus(status); boolean OK= this.goniometerParameters.goniometerMotors.moveMotorSetETA(axialMotor, axialMotorPosition); Loading @@ -494,7 +494,7 @@ horizontal axis: return false; } } if (!this.goniometerParameters.goniometerMotors.checkGotTarget()[tiltMotor]) { if (!this.goniometerParameters.goniometerMotors.checkGotTarget(tiltMotor,tiltMotorPosition))) { status="Moving tilt motor to "+tiltMotorPosition+"..."; if (updateStatus) IJ.showStatus(status); boolean OK= this.goniometerParameters.goniometerMotors.moveMotorSetETA(tiltMotor, tiltMotorPosition); Loading Loading
src/main/java/CalibrationHardwareInterface.java +6 −1 Original line number Diff line number Diff line Loading @@ -2609,7 +2609,7 @@ public class CalibrationHardwareInterface { nanoETA=System.nanoTime()+((long)(1E9*(Math.abs(this.targetPosition[motorNumber]-this.curpos[motorNumber])*(this.coefficientETA/this.stepsPerSecond)))); return true; } /* public boolean [] checkGotTarget(){ updateMotorsPosition(0); // no wait here boolean [] result=new boolean [this.curpos.length]; Loading @@ -2618,6 +2618,11 @@ public class CalibrationHardwareInterface { } return result; } */ public boolean checkGotTarget(int motorNumber, int position){ updateMotorsPosition(0); // no wait here return Math.abs(position-this.curpos[motorNumber])<this.motorTolerance; } public boolean waitMotor( int motorNumber, Loading
src/main/java/Goniometer.java +2 −2 Original line number Diff line number Diff line Loading @@ -476,7 +476,7 @@ horizontal axis: AtomicInteger stopRequested, // or null boolean updateStatus){ String status; if (!this.goniometerParameters.goniometerMotors.checkGotTarget()[axialMotor]) { if (!this.goniometerParameters.goniometerMotors.checkGotTarget(axialMotor,axialMotorPosition)) { status="Moving axial motor to "+axialMotorPosition+"..."; if (updateStatus) IJ.showStatus(status); boolean OK= this.goniometerParameters.goniometerMotors.moveMotorSetETA(axialMotor, axialMotorPosition); Loading @@ -494,7 +494,7 @@ horizontal axis: return false; } } if (!this.goniometerParameters.goniometerMotors.checkGotTarget()[tiltMotor]) { if (!this.goniometerParameters.goniometerMotors.checkGotTarget(tiltMotor,tiltMotorPosition))) { status="Moving tilt motor to "+tiltMotorPosition+"..."; if (updateStatus) IJ.showStatus(status); boolean OK= this.goniometerParameters.goniometerMotors.moveMotorSetETA(tiltMotor, tiltMotorPosition); Loading