[2.14.0][adas lib] 增加AutoPilotReady字段是否存在判断,用于排除MAP版本和SSM Maser版本不匹配导致判断出错问题,细化位置原因提示。修复第二次启动自驾起不来问题,如果第一次下发了启动自动驾驶,没起来或者存在干预 此时systemState是AUTO_PILOT_STARTING 需要二次下发启动自驾命令 所以需要排除此状态

This commit is contained in:
xinfengkun
2023-02-17 13:53:35 +08:00
parent e82bf1ca86
commit ba5720afe1

View File

@@ -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 = "未知系统状态";
}
}
}