Browse Source

add: 电机指令增加block

master
HSZ_HeSongZhen 3 months ago
parent
commit
18417f5292
  1. 6
      src/main/java/com/iflytop/gd/hardware/drivers/StepMotorDriver/AcidPumpDriver.java
  2. 6
      src/main/java/com/iflytop/gd/hardware/drivers/StepMotorDriver/HBotDriver.java
  3. 6
      src/main/java/com/iflytop/gd/hardware/drivers/StepMotorDriver/HeaterMotorDriver.java
  4. 6
      src/main/java/com/iflytop/gd/hardware/drivers/StepMotorDriver/ShakeMotorDriver.java
  5. 6
      src/main/java/com/iflytop/gd/hardware/drivers/StepMotorDriver/TrayMotorDriver.java

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save