diff --git a/src/main/java/com/iflytop/handacid/app/core/command/DeviceCommandGenerator.java b/src/main/java/com/iflytop/handacid/app/core/command/DeviceCommandGenerator.java index 3d35817..fcf62e2 100644 --- a/src/main/java/com/iflytop/handacid/app/core/command/DeviceCommandGenerator.java +++ b/src/main/java/com/iflytop/handacid/app/core/command/DeviceCommandGenerator.java @@ -11,6 +11,62 @@ import com.iflytop.handacid.common.enums.MotorDirection; public class DeviceCommandGenerator { //=========================================== 阀 ================================================================= + /** + * 阀1 打开 + */ + public static DeviceCommand valve1Open() { + return controlCmd(Device.VALVE_1, Action.OPEN, null); + } + + /** + * 阀2 打开 + */ + public static DeviceCommand valve2Open() { + return controlCmd(Device.VALVE_2, Action.OPEN, null); + } + + /** + * 阀3 打开 + */ + public static DeviceCommand valve3Open() { + return controlCmd(Device.VALVE_3, Action.OPEN, null); + } + + /** + * 阀4 打开 + */ + public static DeviceCommand valve4Open() { + return controlCmd(Device.VALVE_4, Action.OPEN, null); + } + + /** + * 阀1 关闭 + */ + public static DeviceCommand valve1Close() { + return controlCmd(Device.VALVE_1, Action.CLOSE, null); + } + + /** + * 阀2 关闭 + */ + public static DeviceCommand valve2Close() { + return controlCmd(Device.VALVE_2, Action.CLOSE, null); + } + + /** + * 阀3 关闭 + */ + public static DeviceCommand valve3Close() { + return controlCmd(Device.VALVE_3, Action.CLOSE, null); + } + + /** + * 阀4 关闭 + */ + public static DeviceCommand valve4Close() { + return controlCmd(Device.VALVE_4, Action.CLOSE, null); + } + //=========================================== 泵 ================================================================= /**