Archived
last edit
This commit is contained in:
1 parent
5d0a569f82
commit
641d947ec6
1 file changed
+11
-11
@@ -255,17 +255,17 @@ public class Spindexer {
|
||||
private void moveSpindexerToPos(double pos) {
|
||||
robot.spin1.setPosition(pos);
|
||||
robot.spin2.setPosition(1-pos);
|
||||
double currentPos = servos.getSpinPos();
|
||||
if (!servos.spinEqual(pos) && Math.abs(prevPos - currentPos) <= 0){
|
||||
if (currentPos > pos){
|
||||
robot.spin1.setPosition(servos.getSpinPos() + 0.05);
|
||||
robot.spin2.setPosition(1 - servos.getSpinPos() - 0.05);
|
||||
} else {
|
||||
robot.spin1.setPosition(servos.getSpinPos() - 0.05);
|
||||
robot.spin2.setPosition(1 - servos.getSpinPos() + 0.05);
|
||||
}
|
||||
}
|
||||
prevPos = currentPos;
|
||||
// double currentPos = servos.getSpinPos();
|
||||
// if (!servos.spinEqual(pos) && Math.abs(prevPos - currentPos) <= 0){
|
||||
// if (currentPos > pos){
|
||||
// robot.spin1.setPosition(servos.getSpinPos() + 0.05);
|
||||
// robot.spin2.setPosition(1 - servos.getSpinPos() - 0.05);
|
||||
// } else {
|
||||
// robot.spin1.setPosition(servos.getSpinPos() - 0.05);
|
||||
// robot.spin2.setPosition(1 - servos.getSpinPos() + 0.05);
|
||||
// }
|
||||
// }
|
||||
// prevPos = currentPos;
|
||||
}
|
||||
|
||||
public void stopSpindexer() {
|
||||
|
||||
Reference in new issue
Block a user