|
|
@ -35,7 +35,7 @@ public class DeviceInitializationCtrlService { |
|
|
|
|
|
|
|
@PostMapping("/api/DeviceInitializationCtrlService/initializeDevice") |
|
|
|
@ResponseBody |
|
|
|
public AppRet initializeDevice() throws HardwareException, InterruptedException { |
|
|
|
public AppRet<Object> initializeDevice() throws HardwareException, InterruptedException { |
|
|
|
logger.info("Initializing device ..."); |
|
|
|
boolean initSuc = false; |
|
|
|
try { |
|
|
@ -47,7 +47,7 @@ public class DeviceInitializationCtrlService { |
|
|
|
* 清空耗材 |
|
|
|
*/ |
|
|
|
|
|
|
|
AppRet ecode; |
|
|
|
AppRet<Object> ecode; |
|
|
|
//硬件光电初始化 |
|
|
|
logger.info("hardwareStaticInit"); |
|
|
|
ecode = hardwareStaticInit(); |
|
|
@ -91,7 +91,7 @@ public class DeviceInitializationCtrlService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private AppRet hardwareStaticInit() throws HardwareException, InterruptedException { |
|
|
|
private AppRet<Object> hardwareStaticInit() throws HardwareException, InterruptedException { |
|
|
|
/* |
|
|
|
* 硬件初始化: |
|
|
|
* 1.使能所有舵机 |
|
|
@ -111,7 +111,7 @@ public class DeviceInitializationCtrlService { |
|
|
|
return AppRet.success(); |
|
|
|
} |
|
|
|
|
|
|
|
private AppRet checkDeviceState() throws HardwareException { |
|
|
|
private AppRet<Object> checkDeviceState() throws HardwareException { |
|
|
|
//试管平移通道是否有障碍 |
|
|
|
if (canBus.getIOState(IOId.THChInterPPS) || canBus.getIOState(IOId.THChOuterPPS)) { |
|
|
|
logger.warn("THChInterPPS or THChOuterPPS is trigger"); |
|
|
@ -151,7 +151,7 @@ public class DeviceInitializationCtrlService { |
|
|
|
return AppRet.success(); |
|
|
|
} |
|
|
|
|
|
|
|
private AppRet moveMotorToZero() throws HardwareException, InterruptedException { |
|
|
|
private AppRet<Object> moveMotorToZero() throws HardwareException, InterruptedException { |
|
|
|
|
|
|
|
//进出料初始化 |
|
|
|
// canBus.stepMotorEasyMoveToZero(MId.FeedingModInfeedM); |
|
|
|