Browse Source

fix:修复现场锁问题、增加真空泵阀门控制

master
白凤吉 2 months ago
parent
commit
650627852b
  1. 3
      src/main/java/com/iflytop/gd/app/command/control/MoveToHeatAreaCommand.java
  2. 1
      src/main/java/com/iflytop/gd/app/command/control/MoveToSolutionAreaCommand.java
  3. 16
      src/main/java/com/iflytop/gd/app/command/debug/DebugVacuumValveCloseCommand.java
  4. 17
      src/main/java/com/iflytop/gd/app/command/debug/DebugVacuumValveOpenCommand.java
  5. 2
      src/main/java/com/iflytop/gd/app/service/api/TrayService.java
  6. 31
      src/main/java/com/iflytop/gd/app/service/crafts/CraftsStepService.java
  7. 6
      src/main/java/com/iflytop/gd/app/service/device/ActionCommandService.java
  8. 3
      src/main/java/com/iflytop/gd/app/service/device/DeviceCommandTempUtilService.java
  9. 50
      src/main/java/com/iflytop/gd/app/service/device/module/HeatModuleService.java
  10. 85
      src/main/java/com/iflytop/gd/common/command/DeviceCommandGenerator.java
  11. 6
      src/main/java/com/iflytop/gd/common/enums/command/CmdDevice.java
  12. 59
      src/main/java/com/iflytop/gd/hardware/command/handlers/IOCtrlHandler.java
  13. 7
      src/main/java/com/iflytop/gd/hardware/drivers/CameraBaslerDriver.java
  14. 4
      src/main/java/com/iflytop/gd/hardware/type/IO/OutputIOMId.java

3
src/main/java/com/iflytop/gd/app/command/control/MoveToHeatAreaCommand.java

@ -85,10 +85,9 @@ public class MoveToHeatAreaCommand extends BaseCommandHandler {
actionCommandService.moveTrayToHeatModule(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleCode);//将托盘移动至指定加热模块
actionCommandService.heatModuleInstallCap(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleCode);//指定加热模块安装拍子
gantryModuleService.gantryXYMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方
solutionModuleService.releaseSolutionModule();//释放加液区等待
} finally {
deviceStateService.getDeviceState().getGantryArm().setIdle(true);//机械臂空闲
deviceStateService.getCommandMutexState().get().setMoveToHeatAreaCommandExecuting(false);//该指令结束
solutionModuleService.releaseSolutionModule();//释放加液区等待
}
});
}

1
src/main/java/com/iflytop/gd/app/command/control/MoveToSolutionAreaCommand.java

@ -91,7 +91,6 @@ public class MoveToSolutionAreaCommand extends BaseCommandHandler {
actionCommandService.heatModuleRemoveTray(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleCode);//指定加热模块移除托盘
gantryModuleService.gantryXYMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方
} finally {
deviceStateService.getDeviceState().getGantryArm().setIdle(true);//机械臂空闲
deviceStateService.getCommandMutexState().get().setMoveToSolutionAreaCommandExecuting(false);//该指令结束
}
});

16
src/main/java/com/iflytop/gd/app/command/debug/DebugVacuumValveCloseCommand.java

@ -7,6 +7,7 @@ import com.iflytop.gd.common.annotation.CommandMapping;
import com.iflytop.gd.common.command.CommandFuture;
import com.iflytop.gd.common.command.DeviceCommandBundle;
import com.iflytop.gd.common.command.DeviceCommandGenerator;
import com.iflytop.gd.common.enums.HeatModuleCode;
import com.iflytop.gd.common.utils.CommandUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -26,9 +27,20 @@ public class DebugVacuumValveCloseCommand extends BaseCommandHandler {
@Override
public CompletableFuture<Void> handle(CmdDTO cmdDTO) {
String heatId = cmdDTO.getStringParam("heatId");
HeatModuleCode heatModuleCode = HeatModuleCode.valueOf(cmdDTO.getStringParam("heatId"));
return runAsync(() -> {
DeviceCommandBundle deviceCommand;
switch (heatModuleCode) {
case heat_module_01 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve1Open();
case heat_module_02 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve2Open();
case heat_module_03 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve3Open();
case heat_module_04 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve4Open();
case heat_module_05 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve5Open();
case heat_module_06 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve6Open();
default -> throw new RuntimeException("index 未找到");
}
CommandFuture deviceCommandFuture = deviceCommandService.sendCommand(cmdDTO.getCommandId(), cmdDTO.getCommand(), deviceCommand);
CommandUtil.wait(deviceCommandFuture);
});
}
}

17
src/main/java/com/iflytop/gd/app/command/debug/DebugVacuumValveOpenCommand.java

@ -7,6 +7,7 @@ import com.iflytop.gd.common.annotation.CommandMapping;
import com.iflytop.gd.common.command.CommandFuture;
import com.iflytop.gd.common.command.DeviceCommandBundle;
import com.iflytop.gd.common.command.DeviceCommandGenerator;
import com.iflytop.gd.common.enums.HeatModuleCode;
import com.iflytop.gd.common.utils.CommandUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -26,10 +27,20 @@ public class DebugVacuumValveOpenCommand extends BaseCommandHandler {
@Override
public CompletableFuture<Void> handle(CmdDTO cmdDTO) {
String heatId = cmdDTO.getStringParam("heatId");
HeatModuleCode heatModuleCode = HeatModuleCode.valueOf(cmdDTO.getStringParam("heatId"));
return runAsync(() -> {
DeviceCommandBundle deviceCommand;
switch (heatModuleCode) {
case heat_module_01 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve1Close();
case heat_module_02 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve2Close();
case heat_module_03 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve3Close();
case heat_module_04 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve4Close();
case heat_module_05 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve5Close();
case heat_module_06 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve6Close();
default -> throw new RuntimeException("index 未找到");
}
CommandFuture deviceCommandFuture = deviceCommandService.sendCommand(cmdDTO.getCommandId(), cmdDTO.getCommand(), deviceCommand);
CommandUtil.wait(deviceCommandFuture);
});
}
}

2
src/main/java/com/iflytop/gd/app/service/api/TrayService.java

@ -28,7 +28,7 @@ public class TrayService {
* 放入了新托盘
*/
public synchronized TrayState trayIn() {
if (deviceStateService.getDeviceState().getSolutionModule().getTrayStatus() == 0) {
if (deviceStateService.getDeviceState().getSolutionModule().isIdle()) {
TrayState trayState = trayStateObjectProvider.getObject();
trayState.setInSolutionModule(true);
TubeState[] tubes = new TubeState[16];

31
src/main/java/com/iflytop/gd/app/service/crafts/CraftsStepService.java

@ -399,16 +399,11 @@ public class CraftsStepService {
*/
private void moveToHeatModule(HeatModuleCode heatModuleCode) throws Exception {
Point3D capStorageCapClawPoint3D = devicePositionService.getPosition(DevicePositionCode.capStorageCapClawPoint).getPoint3D();//获取拍子存放区上方点位;
try {
capModuleService.capUpBalanceNoWait();//提升拍子存放区至拍子夹取的高度
actionCommandService.moveTrayToHeatModule(heatModuleCode);//将托盘移动至指定加热模块
actionCommandService.heatModuleInstallCap(heatModuleCode);//指定加热模块安装拍子
gantryModuleService.gantryXYMove(capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方
} finally {
deviceStateService.getDeviceState().getGantryArm().setIdle(true);//机械臂空闲
deviceStateService.getCommandMutexState().get().setMoveToHeatAreaCommandExecuting(false);//该指令结束
solutionModuleService.releaseSolutionModule();//释放加液区等待
}
capModuleService.capUpBalanceNoWait();//提升拍子存放区至拍子夹取的高度
actionCommandService.moveTrayToHeatModule(heatModuleCode);//将托盘移动至指定加热模块
actionCommandService.heatModuleInstallCap(heatModuleCode);//指定加热模块安装拍子
gantryModuleService.gantryXYMove(capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方
solutionModuleService.releaseSolutionModule();//释放加液区等待
}
/**
@ -416,16 +411,10 @@ public class CraftsStepService {
*/
private void moveToSolutionModule(HeatModuleCode heatModuleCode) throws Exception {
Point3D capStorageCapClawPoint3D = devicePositionService.getPosition(DevicePositionCode.capStorageCapClawPoint).getPoint3D();//获取拍子存放区上方点位;
try {
solutionModuleService.requestSolutionModule();//申请使用加液区并等待
capModuleService.capUpBalanceNoWait(); //提升拍子存放区至拍子夹取的高度
actionCommandService.heatModuleRemoveCap(heatModuleCode);//指定加热模块移除拍子
actionCommandService.heatModuleRemoveTray(heatModuleCode);//指定加热模块移除托盘
gantryModuleService.gantryXYMove(capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方
} finally {
deviceStateService.getDeviceState().getGantryArm().setIdle(true);//机械臂空闲
deviceStateService.getCommandMutexState().get().setMoveToSolutionAreaCommandExecuting(false);//该指令结束
}
solutionModuleService.requestSolutionModule();//申请使用加液区并等待
capModuleService.capUpBalanceNoWait(); //提升拍子存放区至拍子夹取的高度
actionCommandService.heatModuleRemoveCap(heatModuleCode);//指定加热模块移除拍子
actionCommandService.heatModuleRemoveTray(heatModuleCode);//指定加热模块移除托盘
gantryModuleService.gantryXYMove(capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方
}
}

6
src/main/java/com/iflytop/gd/app/service/device/ActionCommandService.java

@ -58,7 +58,7 @@ public class ActionCommandService {
}
heatModuleService.heaterMotorMoveNoWait(commandId, command, heatModuleCode, trayLower);//下降加热模块
gantryModuleService.gantryZMoveZero(commandId, command);//抬升z轴
Thread.sleep(3800);
Thread.sleep(3000);
deviceCommandTempUtilService.carryMoveXYToSolutionManyPoints(commandId, command, heatModuleCode, ClawItemType.tray);//携带托盘移动至加液模块
gantryModuleService.gantryXYMove(commandId, command, liquidAreaTrayPoint3D); //将携带托盘的机械臂移动至加液模块上方
deviceCommandTempUtilService.moveTrayHeatModuleAvoidUpNoWait(commandId, command, heatModuleCode);//移动完毕恢复抬升状态
@ -94,6 +94,7 @@ public class ActionCommandService {
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTrayUp(1);//将加热模块托盘状态改为抬起
gantryModuleService.clawMove(commandId, command, clawCapPick);//将夹爪打开准备夹取拍子
gantryModuleService.gantryZMove(heatModuleCapMoveHeight);//下降z轴,使夹爪落入加热模块拍子孔位
heatModuleService.vacuumValveClose(commandId, command, heatModuleCode);
gantryModuleService.clawMove(commandId, command, clawCapGrip);//将夹爪收紧夹住拍子
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setCapExist(false);//加热模块是否存在拍子
capModuleService.capMotorMoveByNumNoWait(commandId, command, -1);//拍子存放模块下降1个拍子位置
@ -134,11 +135,12 @@ public class ActionCommandService {
capModuleService.capUpBalanceNoWait(commandId, command); //提升拍子存放区
deviceCommandTempUtilService.moveTrayHeatModuleAvoidUpNoWait(commandId, command, heatModuleCode);
Thread.sleep(3800);
Thread.sleep(3700);
gantryModuleService.gantryZMove(heatModuleCapMoveHeight);//下降z轴,使夹拍子落入加热模块
gantryModuleService.clawMove(commandId, command, clawCapPick);//将夹爪打开释放拍子
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setCapExist(true);//加热模块是否存在拍子
heatModuleService.vacuumValveOpen(commandId, command, heatModuleCode);
gantryModuleService.gantryZMoveZero(commandId, command);//抬升z轴
}

3
src/main/java/com/iflytop/gd/app/service/device/DeviceCommandTempUtilService.java

@ -341,7 +341,8 @@ public class DeviceCommandTempUtilService {
HeatModuleCode.heat_module_05,
HeatModuleCode.heat_module_06);
} else if (ClawItemType.tray.equals(clawItemType)) {//移动托盘
if(deviceStateService.getDeviceState().getHeatModuleByCode(HeatModuleCode.heat_module_05).getTrayStatus() == 1){
if(deviceStateService.getDeviceState().getHeatModuleByCode(HeatModuleCode.heat_module_05).getTrayStatus() == 1
|| deviceStateService.getDeviceState().getHeatModuleByCode(HeatModuleCode.heat_module_05).getTrayUp() == 1){
//路线 4136
points = new Point3D[]{heatArea4TrayClawPoint3D, heatArea1TrayClawPoint3D, heatArea3TrayClawPoint3D, heatArea6TrayClawPoint3D};
//不避让的模块

50
src/main/java/com/iflytop/gd/app/service/device/module/HeatModuleService.java

@ -37,6 +37,56 @@ public class HeatModuleService {
private final DeviceStateService deviceStateService;
/**
* 真空泵阀门关闭
*/
public void vacuumValveClose(HeatModuleCode heatModuleCode) throws Exception {
vacuumValveClose(null, null, heatModuleCode);
}
/**
* 真空泵阀门关闭
*/
public void vacuumValveClose(String commandId, String command, HeatModuleCode heatModuleCode) throws Exception {
DeviceCommandBundle deviceCommand;
switch (heatModuleCode) {
case heat_module_01 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve1Open();
case heat_module_02 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve2Open();
case heat_module_03 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve3Open();
case heat_module_04 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve4Open();
case heat_module_05 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve5Open();
case heat_module_06 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve6Open();
default -> throw new RuntimeException("heatModuleCode 未找到");
}
CommandFuture deviceCommandFuture = deviceCommandService.sendCommand(commandId, command, deviceCommand);
CommandUtil.wait(deviceCommandFuture);
}
/**
* 真空泵阀门开启
*/
public void vacuumValveOpen(HeatModuleCode heatModuleCode) throws Exception {
vacuumValveOpen(null, null, heatModuleCode);
}
/**
* 真空泵阀门开启
*/
public void vacuumValveOpen(String commandId, String command, HeatModuleCode heatModuleCode) throws Exception {
DeviceCommandBundle deviceCommand;
switch (heatModuleCode) {
case heat_module_01 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve1Close();
case heat_module_02 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve2Close();
case heat_module_03 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve3Close();
case heat_module_04 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve4Close();
case heat_module_05 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve5Close();
case heat_module_06 -> deviceCommand = DeviceCommandGenerator.vacuumPumpValve6Close();
default -> throw new RuntimeException("heatModuleCode 未找到");
}
CommandFuture deviceCommandFuture = deviceCommandService.sendCommand(commandId, command, deviceCommand);
CommandUtil.wait(deviceCommandFuture);
}
/**
* 加热模块升降电机移动到指定位置
*/
public void heaterMotorMoveOrigin(HeatModuleCode heatModuleId) throws Exception {

85
src/main/java/com/iflytop/gd/common/command/DeviceCommandGenerator.java

@ -9,6 +9,90 @@ import com.iflytop.gd.common.enums.command.*;
public class DeviceCommandGenerator {
/**
* 真空泵阀门 1 开启
*/
public static DeviceCommandBundle vacuumPumpValve1Open() {
return controlCmd(CmdDevice.vacuum_pump_valve_1, CmdAction.open, null, "真空泵阀门1 开启");
}
/**
* 真空泵阀门 2 开启
*/
public static DeviceCommandBundle vacuumPumpValve2Open() {
return controlCmd(CmdDevice.vacuum_pump_valve_2, CmdAction.open, null, "真空泵阀门2 开启");
}
/**
* 真空泵阀门 3 开启
*/
public static DeviceCommandBundle vacuumPumpValve3Open() {
return controlCmd(CmdDevice.vacuum_pump_valve_3, CmdAction.open, null, "真空泵阀门3 开启");
}
/**
* 真空泵阀门 4 开启
*/
public static DeviceCommandBundle vacuumPumpValve4Open() {
return controlCmd(CmdDevice.vacuum_pump_valve_4, CmdAction.open, null, "真空泵阀门4 开启");
}
/**
* 真空泵阀门 5 开启
*/
public static DeviceCommandBundle vacuumPumpValve5Open() {
return controlCmd(CmdDevice.vacuum_pump_valve_5, CmdAction.open, null, "真空泵阀门5 开启");
}
/**
* 真空泵阀门 6 开启
*/
public static DeviceCommandBundle vacuumPumpValve6Open() {
return controlCmd(CmdDevice.vacuum_pump_valve_6, CmdAction.open, null, "真空泵阀门6 开启");
}
/**
* 真空泵阀门 1 关闭
*/
public static DeviceCommandBundle vacuumPumpValve1Close() {
return controlCmd(CmdDevice.vacuum_pump_valve_1, CmdAction.close, null, "真空泵阀门1 关闭");
}
/**
* 真空泵阀门 2 关闭
*/
public static DeviceCommandBundle vacuumPumpValve2Close() {
return controlCmd(CmdDevice.vacuum_pump_valve_2, CmdAction.close, null, "真空泵阀门2 关闭");
}
/**
* 真空泵阀门 3 关闭
*/
public static DeviceCommandBundle vacuumPumpValve3Close() {
return controlCmd(CmdDevice.vacuum_pump_valve_3, CmdAction.close, null, "真空泵阀门3 关闭");
}
/**
* 真空泵阀门 4 关闭
*/
public static DeviceCommandBundle vacuumPumpValve4Close() {
return controlCmd(CmdDevice.vacuum_pump_valve_4, CmdAction.close, null, "真空泵阀门4 关闭");
}
/**
* 真空泵阀门 5 关闭
*/
public static DeviceCommandBundle vacuumPumpValve5Close() {
return controlCmd(CmdDevice.vacuum_pump_valve_5, CmdAction.close, null, "真空泵阀门5 关闭");
}
/**
* 真空泵阀门 6 关闭
*/
public static DeviceCommandBundle vacuumPumpValve6Close() {
return controlCmd(CmdDevice.vacuum_pump_valve_6, CmdAction.close, null, "真空泵阀门6 关闭");
}
/**
* 移动
*/
public static DeviceCommandBundle doorMoveToEnd() {
@ -759,7 +843,6 @@ public class DeviceCommandGenerator {
/**
* 加液泵 泵1旋转
*
*/
public static DeviceCommandBundle acidPump1Rotate(CmdDirection direction) {
DeviceCommandParams params = new DeviceCommandParams();

6
src/main/java/com/iflytop/gd/common/enums/command/CmdDevice.java

@ -37,6 +37,12 @@ public enum CmdDevice {
heat_rod_4,
heat_rod_5,
heat_rod_6,
vacuum_pump_valve_1,
vacuum_pump_valve_2,
vacuum_pump_valve_3,
vacuum_pump_valve_4,
vacuum_pump_valve_5,
vacuum_pump_valve_6,
tricolor_light,
fill_light,
cold_trap,

59
src/main/java/com/iflytop/gd/hardware/command/handlers/IOCtrlHandler.java

@ -0,0 +1,59 @@
package com.iflytop.gd.hardware.command.handlers;
import com.iflytop.gd.common.command.DeviceCommand;
import com.iflytop.gd.common.enums.command.CmdAction;
import com.iflytop.gd.common.enums.command.CmdDevice;
import com.iflytop.gd.hardware.command.CommandHandler;
import com.iflytop.gd.hardware.drivers.DODriver.OutputIOCtrlDriver;
import com.iflytop.gd.hardware.type.IO.OutputIOMId;
import com.iflytop.gd.hardware.type.MId;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
//
@Slf4j
@Component
@RequiredArgsConstructor
public class IOCtrlHandler extends CommandHandler {
private final OutputIOCtrlDriver driver_;
private final Map<CmdDevice, OutputIOMId> supportCmdDeviceIOOutputMap = Map.ofEntries(
Map.entry(CmdDevice.vacuum_pump_valve_3, OutputIOMId.DO_VACUUM_VALVE3),
Map.entry(CmdDevice.vacuum_pump_valve_4, OutputIOMId.DO_VACUUM_VALVE4),
Map.entry(CmdDevice.vacuum_pump_valve_5, OutputIOMId.DO_VACUUM_VALVE5),
Map.entry(CmdDevice.vacuum_pump_valve_6, OutputIOMId.DO_VACUUM_VALVE6)
);
private final Map<CmdDevice, MId> supportCmdDeviceMIdMap = supportCmdDeviceIOOutputMap.entrySet().stream()
.collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().mid));
private final Set<CmdAction> supportActions = Set.of(CmdAction.open, CmdAction.close);
@Override
protected Map<CmdDevice, MId> getSupportCmdDeviceMIdMap()
{
return supportCmdDeviceMIdMap;
}
@Override
protected Set<CmdAction> getSupportActions() {
return supportActions;
}
@Override
public void handleCommand(DeviceCommand command) throws Exception {
// 发送命令
if (command.getAction() == CmdAction.open) {
log.info("open {}", command.getDevice());
driver_.open(supportCmdDeviceIOOutputMap.get(command.getDevice()));
} else if (command.getAction() == CmdAction.close) {
log.info("close {}", command.getDevice());
driver_.close(supportCmdDeviceIOOutputMap.get(command.getDevice()));
}
}
}

7
src/main/java/com/iflytop/gd/hardware/drivers/CameraBaslerDriver.java

@ -2,6 +2,7 @@ package com.iflytop.gd.hardware.drivers;
import com.iflytop.gd.camera.BaslerCameraWrapper;
import lombok.extern.slf4j.Slf4j;
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
import org.opencv.imgcodecs.Imgcodecs;
@ -142,7 +143,11 @@ public class CameraBaslerDriver {
Mat colorMat = new Mat();
Imgproc.cvtColor(frameMat, colorMat, Imgproc.COLOR_BayerRG2RGB);
Imgcodecs.imwrite(filePath, colorMat);
// 上下镜像翻转flipCode = 0
Mat flippedMat = new Mat();
Core.flip(colorMat, flippedMat, 0);
Imgcodecs.imwrite(filePath, flippedMat);
log.info("彩色图片已保存到: {}", filePath);
}
}

4
src/main/java/com/iflytop/gd/hardware/type/IO/OutputIOMId.java

@ -11,6 +11,10 @@ public enum OutputIOMId {
DO_FAN6("FAN6", MId.IO1_IO, 5,false),
DO_TRAY_MOTOR_CLAMP("TRAY_MOTOR_CLAMP [ 托盘电机 ] ", MId.IO1_IO, 6,false),
DO_HBOTZ_MOTOR_CLAMP("HBOTZ_MOTOR_CLAMP [ 龙门架Z轴 ] ", MId.IO1_IO, 7,false),
DO_VACUUM_VALVE3("VACUUM_PUMP_VALVE3 [ 真空阀3 ] ", MId.IO1_IO, 8,false),
DO_VACUUM_VALVE4("VACUUM_PUMP_VALVE4 [ 真空阀4 ] ", MId.IO1_IO, 9,false),
DO_VACUUM_VALVE5("VACUUM_PUMP_VALVE5 [ 真空阀5 ] ", MId.IO1_IO, 10,false),
DO_VACUUM_VALVE6("VACUUM_PUMP_VALVE6 [ 真空阀6 ] ", MId.IO1_IO, 11,false),
DO_WATER_PUMP("WATER_PUMP [ 水泵 ] ", MId.IO1_IO, 12,false),
DO_VENTILATOR("VENTILATOR [ 风机电源 ]", MId.IO1_IO, 13,false),
DO_COLD_TRAP_POWER("COLD_TRAP_POWER[ 冷阱 电源 ]", MId.IO1_IO, 14,false),

Loading…
Cancel
Save