Commit c305ce42 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

corrected wait time for short movements

parent bd593f60
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ public class GoniometerMotors{

        public double coefficientETA=1.5;  // allow moving 1.5 longer than at maximal speed
        

        private long nanoETA;
        private long nanoReferenceTime; // last time the position was checked
        private int []referencePosition=null;
@@ -110,6 +111,8 @@ public class GoniometerMotors{
        	commandElphel10364Motors("http://"+this.ipAddress+"/10364.php?m"+(motorNumber+1)+"="+this.targetPosition[motorNumber]+"sleep=1");
        	enableMotors(true);
			nanoETA=System.nanoTime()+((long)(1E9*(Math.abs(this.targetPosition[motorNumber]-this.curpos[motorNumber])*(this.coefficientETA/this.stepsPerSecond))));
			
			nanoETA += (long)(1E9*this.motorsStuckTestTime); // =5.0; // seconds
			return true;
        }
/*