|
|
@ -24,6 +24,8 @@ import org.springframework.stereotype.Component; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import static a8k.OS.threadSleep; |
|
|
|
|
|
|
|
@Component |
|
|
|
@Slf4j |
|
|
|
@RequiredArgsConstructor |
|
|
@ -56,6 +58,34 @@ public class HbotCodeScanPosVerificationPage { |
|
|
|
codeScanerDriver.pipetteModCodeScannerStopScan(); |
|
|
|
} |
|
|
|
|
|
|
|
public void testCodeScan(Integer times, Integer overtime) throws AppException { |
|
|
|
if(overtime < 0){ |
|
|
|
overtime = 0; |
|
|
|
} |
|
|
|
if(times < 1){ |
|
|
|
times = 1; |
|
|
|
} |
|
|
|
if(times > 100){ |
|
|
|
times = 100; |
|
|
|
} |
|
|
|
log.info("testCodeScan times:{} overtime:{}", times, overtime); |
|
|
|
|
|
|
|
for (int i = 0; i < times; i++) { |
|
|
|
log.info("testCodeScan times:{}", i); |
|
|
|
hbotMoveExCtrlService.moveQuickToZero(); |
|
|
|
|
|
|
|
for(var cg: ConsumableGroup.values()){ |
|
|
|
moveToPBScanPos(cg); |
|
|
|
threadSleep(overtime); |
|
|
|
String result = codeScanerDriver.pipetteModCodeScannerScanCode(); |
|
|
|
if(result == null || result.isEmpty()){ |
|
|
|
log.info("cg {} 扫码失败", cg); |
|
|
|
} |
|
|
|
log.info("cg {} 扫码结果:{}", cg, result); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostConstruct |
|
|
|
void init() { |
|
|
@ -66,6 +96,10 @@ public class HbotCodeScanPosVerificationPage { |
|
|
|
cfg.addFunction("移动到大瓶扫码位置", this::moveToLargeBSCodeScanPos); |
|
|
|
cfg.addFunction("扫码", this::startCodeScan); |
|
|
|
cfg.addFunction("停止扫码", this::stopCodeScan); |
|
|
|
|
|
|
|
cfg.newGroup("扫描测试"); |
|
|
|
cfg.addFunction("批量扫码", this::testCodeScan); |
|
|
|
|
|
|
|
extApiPageMgr.addPage(cfg); |
|
|
|
} |
|
|
|
} |