Browse Source

add: 门电机指令增加block

master
HSZ_HeSongZhen 3 months ago
parent
commit
6e1bdad9f2
  1. 6
      src/main/java/com/iflytop/gd/hardware/drivers/StepMotorDriver/DoorDriver.java

6
src/main/java/com/iflytop/gd/hardware/drivers/StepMotorDriver/DoorDriver.java

@ -35,7 +35,7 @@ public class DoorDriver{
// ==== ==== ==== ==== ==== ==== Ctrl ==== ==== ==== ==== ==== ==== // ==== ==== ==== ==== ==== ==== Ctrl ==== ==== ==== ==== ==== ====
public void moveToHome(StepMotorMId stepMotorMId) throws Exception public void moveToHome(StepMotorMId stepMotorMId) throws Exception
{ {
stepMotorCtrlDriver_.stepMotorEasyMoveToZero(stepMotorMId);
stepMotorCtrlDriver_.stepMotorEasyMoveToZeroBlock(stepMotorMId);
} }
public void moveTo(StepMotorMId stepMotorMId, double position) throws Exception public void moveTo(StepMotorMId stepMotorMId, double position) throws Exception
@ -46,7 +46,7 @@ public class DoorDriver{
} }
int motorPosition = StepMotorHelper.toMotorPosition(position); int motorPosition = StepMotorHelper.toMotorPosition(position);
stepMotorCtrlDriver_.stepMotorEasyMoveTo(stepMotorMId, motorPosition);
stepMotorCtrlDriver_.stepMotorEasyMoveToBlock(stepMotorMId, motorPosition);
} }
public void moveBy(StepMotorMId stepMotorMId, double distance) throws Exception public void moveBy(StepMotorMId stepMotorMId, double distance) throws Exception
@ -57,7 +57,7 @@ public class DoorDriver{
} }
int motorPosition = StepMotorHelper.toMotorPosition(distance); int motorPosition = StepMotorHelper.toMotorPosition(distance);
stepMotorCtrlDriver_.stepMotorEasyMoveBy(stepMotorMId, motorPosition);
stepMotorCtrlDriver_.stepMotorEasyMoveByBlock(stepMotorMId, motorPosition);
} }
public void stop(StepMotorMId stepMotorMId) throws Exception { public void stop(StepMotorMId stepMotorMId) throws Exception {

Loading…
Cancel
Save