#
1
2 天以前 02d21f6176ac8d54f7ba121bf42821a405be40f2
src/main/java/com/zy/core/MainProcess.java
@@ -25,6 +25,7 @@
    // 所属线程
    private Thread thread;
    private Thread armThread;
    private Thread agvThread;
    // 频率
    private int i = 0;
    private int k = 0;
@@ -39,6 +40,9 @@
        armThread = new Thread(this::roboticArmDispatch);
        armThread.start();
        agvThread = new Thread(this::agvDispatch);
        agvThread.start();
    }
    private void crnAndDevRun() {
        while (!Thread.currentThread().isInterrupted()) {
@@ -177,6 +181,26 @@
        }
    }
    private void agvDispatch() {
        while (!Thread.currentThread().isInterrupted()) {
            try {
                // 间隔
                Thread.sleep(400);
                // 系统运行状态判断
                if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                    continue;
                }
                //agv任务下发
                mainService.agvTaskAssignment();//0===》1
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
    @PreDestroy
    public void shutDown(){
        if (thread != null) thread.interrupt();