You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log('Axis %d can\'t go to angle %d (%d), violates circularity at %d',axis,angle.toFixed(4),radToDeg(angle).toFixed(2),circularPosition.toFixed(4));
114
+
return;
115
+
}
113
116
if(simulateCircularMotion){
114
117
constcurrentAngle=wrapToCircle(positions[axis]);
115
118
vardiff=circularPosition-currentAngle;
116
119
if(diff<-0.5)
117
120
diff+=1;
121
+
console.log('Axis %d going to %s (%s), target pos %s',axis,angle.toFixed(2),radToDeg(angle).toFixed(2),circularPosition.toFixed(4));
console.log('Axis %d can\'t go to angle %d (%d), violates circularity at %d',axis,angle.toFixed(4),radToDeg(angle).toFixed(2),circularPosition.toFixed(4))
91
+
return
92
+
}
91
93
if(simulateCircularMotion){
92
94
constcurrentAngle=wrapToCircle(positions[axis])
93
95
vardiff=circularPosition-currentAngle
94
-
if(diff<-0.5)
96
+
if(diff<-0.5)
95
97
diff+=1
98
+
console.log('Axis %d going to %s (%s), target pos %s',axis,angle.toFixed(2),radToDeg(angle).toFixed(2),circularPosition.toFixed(4))
96
99
circularPosition=positions[axis]+diff
97
100
}
98
-
if(wait)
99
-
awaitgoToRaw(axis,circularPosition,10000)
100
-
else
101
-
sendToRaw(axis,circularPosition)
101
+
// if(wait)
102
+
// await goToRaw(axis, circularPosition, 10000)
103
+
//else
104
+
// sendToRaw(axis, circularPosition)
102
105
}
103
106
104
107
constgoToAngles=async({ x, y, z }: {x: number;y: number;z: number},wait=true)=>{
0 commit comments