[6.4.0][启自驾指引] 优化代码逻辑

This commit is contained in:
renwj
2024-04-18 17:38:13 +08:00
parent 9087eb53ba
commit 74da2a0e59
4 changed files with 19 additions and 4 deletions

View File

@@ -76,6 +76,7 @@ object CallerAutoPilotControlManager {
* 刹车: 1<<2
* 双闪: 1<<3
* 档位: 1<<4
* 轨迹下载: (下载中) 1<<5 下载失败1<<6
*/
val exceptionValue = CallerDevaToolsManager.getExceptionStatusBeforeLaunchAutopilot()
if (exceptionValue != 0) {
@@ -95,6 +96,10 @@ object CallerAutoPilotControlManager {
if ((exceptionValue and (1 shl 4)) != 0) {
sb.append("档位$")
}
if ((exceptionValue and (1 shl 5)) != 0 || ((exceptionValue and (1 shl 6)) != 0)) {
sb.setLength(0)
sb.append("轨迹未就绪,请稍后重试")
}
val voiceText = sb.toString().let { str ->
val count = str.count { it == '$' }
if (count == 1) {