Browse Source

feat:封装指令

master
白凤吉 3 months ago
parent
commit
61790ea857
  1. 1131
      src/main/java/com/iflytop/gd/common/cmd/DeviceCommandGenerator.java
  2. 6
      src/main/java/com/iflytop/gd/common/cmd/DeviceCommandParams.java
  3. 3
      src/main/java/com/iflytop/gd/common/enums/cmd/CmdAction.java
  4. 5
      src/main/java/com/iflytop/gd/common/enums/cmd/CmdColor.java
  5. 7
      src/main/java/com/iflytop/gd/common/enums/cmd/CmdDevice.java

1131
src/main/java/com/iflytop/gd/common/cmd/DeviceCommandGenerator.java
File diff suppressed because it is too large
View File

6
src/main/java/com/iflytop/gd/common/cmd/DeviceCommandParams.java

@ -2,6 +2,7 @@ package com.iflytop.gd.common.cmd;
import com.iflytop.gd.common.enums.cmd.CmdAxis;
import com.iflytop.gd.common.enums.cmd.CmdColor;
import com.iflytop.gd.common.enums.cmd.CmdDirection;
import lombok.Data;
@ -13,5 +14,10 @@ public class DeviceCommandParams {
private Double position;
private Double speed;
private Double angle;
private Double volume;
private Double distance;
private Double temperature;
private CmdAxis axis;
private CmdColor color;
private Double brightness;
}

3
src/main/java/com/iflytop/gd/common/enums/cmd/CmdAction.java

@ -1,5 +1,6 @@
package com.iflytop.gd.common.enums.cmd;
public enum CmdAction {
open, close, stop, start, origin, move, move_joint, set
open, close, stop, start, origin, move, move_x_joint, move_y_joint, move_joint, set, get, tight, loose,
open_power, close_power, open_circle, close_circle, open_heart, close_heart, take_photo
}

5
src/main/java/com/iflytop/gd/common/enums/cmd/CmdColor.java

@ -0,0 +1,5 @@
package com.iflytop.gd.common.enums.cmd;
public enum CmdColor {
red,green,blue
}

7
src/main/java/com/iflytop/gd/common/enums/cmd/CmdDevice.java

@ -1,5 +1,10 @@
package com.iflytop.gd.common.enums.cmd;
public enum CmdDevice {
door, shake_motor, tray_motor, dual_robot, hbot_x, hbot_y, hbot_z, heater_motor_1, heater_motor_2, heater_motor_3, heater_motor_4, heater_motor_5, heater_motor_6,
door, shake_motor, tray_motor, dual_robot, hbot_x, hbot_y, hbot_z,
heater_motor_1, heater_motor_2, heater_motor_3, heater_motor_4, heater_motor_5, heater_motor_6,
acid_pump1, acid_pump2, acid_pump3, acid_pump4, acid_pump5, acid_pump6, acid_pump7, acid_pump8,
claw, fan1, fan2, fan3, fan4, fan5, fan6, water_pump_power, ventilator_power,
heat_rod_1, heat_rod_2, heat_rod_3, heat_rod_4, heat_rod_5, heat_rod_6,
tricolor_light, fill_light, cold_trap, photo
}
Loading…
Cancel
Save