Commit c305ce42 authored by Andrey Filippov's avatar Andrey Filippov

corrected wait time for short movements

parent bd593f60
......@@ -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;
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment