|
@ -36,4 +36,15 @@ public class DiActServo extends DiActuatorBase { |
|
|
public void setCurrentPosAsMiddle() { |
|
|
public void setCurrentPosAsMiddle() { |
|
|
this.call(DiCommand.MOTOR_EASY_SET_CURRENT_POS, 2047); |
|
|
this.call(DiCommand.MOTOR_EASY_SET_CURRENT_POS, 2047); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// get current position |
|
|
|
|
|
public Integer getCurrentPos() { |
|
|
|
|
|
var response = this.call(DiCommand.MOTOR_READ_POS); |
|
|
|
|
|
return response.readInteger(0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// move to position |
|
|
|
|
|
public void moveToPosition(Integer pos) { |
|
|
|
|
|
this.moveTo(pos); |
|
|
|
|
|
} |
|
|
} |
|
|
} |