From ba5720afe1fdeba47d469b91be2860b420b1a740 Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Fri, 17 Feb 2023 13:53:35 +0800 Subject: [PATCH] =?UTF-8?q?[2.14.0][adas=20lib]=20=E5=A2=9E=E5=8A=A0AutoPi?= =?UTF-8?q?lotReady=E5=AD=97=E6=AE=B5=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E5=88=A4=E6=96=AD=EF=BC=8C=E7=94=A8=E4=BA=8E=E6=8E=92=E9=99=A4?= =?UTF-8?q?MAP=E7=89=88=E6=9C=AC=E5=92=8CSSM=20Maser=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=8D=E5=8C=B9=E9=85=8D=E5=AF=BC=E8=87=B4=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=87=BA=E9=94=99=E9=97=AE=E9=A2=98=EF=BC=8C=E7=BB=86=E5=8C=96?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E5=8E=9F=E5=9B=A0=E6=8F=90=E7=A4=BA=E3=80=82?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=AC=E4=BA=8C=E6=AC=A1=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E8=87=AA=E9=A9=BE=E8=B5=B7=E4=B8=8D=E6=9D=A5=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E7=AC=AC=E4=B8=80=E6=AC=A1=E4=B8=8B?= =?UTF-8?q?=E5=8F=91=E4=BA=86=E5=90=AF=E5=8A=A8=E8=87=AA=E5=8A=A8=E9=A9=BE?= =?UTF-8?q?=E9=A9=B6=EF=BC=8C=E6=B2=A1=E8=B5=B7=E6=9D=A5=E6=88=96=E8=80=85?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E5=B9=B2=E9=A2=84=20=E6=AD=A4=E6=97=B6system?= =?UTF-8?q?State=E6=98=AFAUTO=5FPILOT=5FSTARTING=20=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E4=B8=8B=E5=8F=91=E5=90=AF=E5=8A=A8=E8=87=AA?= =?UTF-8?q?=E9=A9=BE=E5=91=BD=E4=BB=A4=20=E6=89=80=E4=BB=A5=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=8E=92=E9=99=A4=E6=AD=A4=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adas/high/common/AutopilotAbilityManager.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/common/AutopilotAbilityManager.java b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/common/AutopilotAbilityManager.java index 26d38467f5..733e87d82a 100644 --- a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/common/AutopilotAbilityManager.java +++ b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/common/AutopilotAbilityManager.java @@ -137,7 +137,8 @@ public class AutopilotAbilityManager { } } } - if (version > 1) { + //如果 maser version 大于1,还需要判断AutoPilotReady字段是否存在,以确保MAP版本和SSM Maser版本不陪配情况逻辑能正常执行 + if (version > 1 && statusInfo.hasAutoPilotReady()) { isAutopilotAbility = statusInfo.getAutoPilotReady(); if (!isAutopilotAbility) { SystemStatusInfo.NodeFaultList nodeFaultList = statusInfo.getAutoPilotUnreadyList(); @@ -150,12 +151,12 @@ public class AutopilotAbilityManager { if (state < NODE_INFO_STATE.length) { builder.append(NODE_INFO_STATE[state]); } else { - builder.append("未知 "); + builder.append("未知异常 "); } } unableAutopilotReason = builder.toString(); } else { - unableAutopilotReason = "未知"; + unableAutopilotReason = "未知异常节点"; } } } else { @@ -169,7 +170,9 @@ public class AutopilotAbilityManager { } else if (systemState == SystemStatusInfo.SystemState.SYS_FAULT) { unableAutopilotReason = "系统异常"; } else if (systemState == SystemStatusInfo.SystemState.AUTO_PILOT_STARTING) { - unableAutopilotReason = "正在开始自动驾驶"; + //如果第一次下发了启动自动驾驶,没起来或者存在干预 此时systemState是AUTO_PILOT_STARTING 需要二次下发启动自驾命令 所以需要排除此状态 + isAutopilotAbility = true; + //unableAutopilotReason = "正在开始自动驾驶"; } else if (systemState == SystemStatusInfo.SystemState.AUTO_PILOT_RUNNING) { unableAutopilotReason = "自动驾驶运行中"; } else if (systemState == SystemStatusInfo.SystemState.REMOTE_PILOT_STARTING) { @@ -177,7 +180,7 @@ public class AutopilotAbilityManager { } else if (systemState == SystemStatusInfo.SystemState.REMOTE_PILOT_RUNNING) { unableAutopilotReason = "平行驾驶运行中"; } else { - unableAutopilotReason = "未知"; + unableAutopilotReason = "未知系统状态"; } } }