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

improving manual goniometer control

parent 7c971fec
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2602,7 +2602,10 @@ public class CalibrationHardwareInterface {
        	this.targetPosition[motorNumber]=position;
        	this.nanoReferenceTime=System.nanoTime();
        	this.referencePosition=this.curpos.clone();
        	commandElphel10364Motors("http://"+this.ipAddress+"/10364.php?m"+(motorNumber+1)+"="+this.targetPosition[motorNumber]+"&enable");
//        	commandElphel10364Motors("http://"+this.ipAddress+"/10364.php?m"+(motorNumber+1)+"="+this.targetPosition[motorNumber]+"&enable");
        	// set, wait, enable (to avoid continuing "old" movement that was aborted by disable
        	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))));
			return true;
        }