skyouc
6 小时以前 03d71647b8ab3f394713a7d2fd37acf5a6b08c93
防止方向走错
1个文件已修改
13 ■■■■■ 已修改文件
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -934,6 +934,19 @@
                            lastDirection = nextDirection;
                        }
                        // 如果当前地码和下一个地码都在站点地码集合内,则根据在集合中的顺序决定行进方向和是否倒退
                        if (turnCodes.contains(lastCode.getData()) && turnCodes.contains(nextCode.getData())) {
                            int lastIndex = turnCodes.indexOf(lastCode.getData());
                            int nextIndex = turnCodes.indexOf(nextCode.getData());
                            if (nextIndex > lastIndex) {
                                nextDirection = 180D;
                                reverse = false;
                            } else if (nextIndex < lastIndex) {
                                nextDirection = 0D;
                                reverse = true;
                            }
                        }
                        // run
                        ActionTypeType actionType = ActionTypeType.StraightAheadTurnable;
                        if (reverse) {