diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/StatusManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/StatusManager.kt
index 36103cc248..ae537d9f58 100644
--- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/StatusManager.kt
+++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/StatusManager.kt
@@ -11,6 +11,7 @@ import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
import com.mogo.commons.utils.MogoAnalyticUtils
import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
+import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.mogo.logger.*
import com.mogo.eagle.core.utilcode.util.*
@@ -189,7 +190,7 @@ object StatusManager {
if (!hasInit) {
return 0
}
- var ret = 0
+ var xor = 0
model.status.value?.second?.filter {
it is IAutopilotPreLaunchStatus
}?.takeIf {
@@ -216,7 +217,7 @@ object StatusManager {
is GearStatus -> "档位"
is RouteDownloadStatus -> if (item.state == RouteStart) "轨迹下载中" else "轨迹下载失败"
is FSMStatus -> "FSM"
- is OtherErrorStatus -> "未知"
+ is OtherErrorStatus -> "type: ${item.type}, reason:${item.reason?.getUnableLaunchReason()}"
else -> "其它"
}
}
@@ -232,19 +233,20 @@ object StatusManager {
}
}?.forEachIndexed { index, status ->
val shl = 1 shl index
- if (status.isException()) {
- ret = if (status is RouteDownloadStatus) {
- if (status.state == RouteStart) {
- ret or shl
- } else {
- ret or (shl shl 1)
- }
- } else {
- ret or shl
+ xor = if (status is RouteDownloadStatus) {
+ if (status.state == RouteStart) {
+ xor or shl
+ } else {
+ xor or (shl shl 1)
}
+ } else {
+ if (status is OtherErrorStatus) {
+ CallerDevaToolsManager.getExtra().putString(R.id.autopilot_start_error.toString(), status.reason?.getUnableLaunchReason())
+ }
+ xor or shl
}
}
- return ret
+ return xor
}
fun hasInit(): Boolean {
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/map/MapContainerLayout.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/map/MapContainerLayout.kt
index 8bc10393e2..6d508bcc45 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/map/MapContainerLayout.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/map/MapContainerLayout.kt
@@ -14,10 +14,12 @@ import android.view.animation.AccelerateDecelerateInterpolator
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.marginStart
import androidx.core.view.marginTop
+import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.function.api.datacenter.IDataCenterBizListener
import com.mogo.eagle.core.function.call.datacenter.CallerDataCenterBizListener
import com.mogo.eagle.core.function.hmi.R
+import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener
import com.mogo.map.listener.IMogoMapListener
import com.mogo.map.listener.MogoMapListenerHandler
@@ -234,7 +236,11 @@ class MapContainerLayout @JvmOverloads constructor(
private fun updateShadowBg(isSmallMap: Boolean) {
Log.d(TAG, "updateShadowBg")
if (!isSmallMap) {
- shadowView.setBackgroundResource(R.drawable.gaojing_bg)
+ if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
+ shadowView.setBackgroundResource(R.drawable.gaojing_bg)
+ } else {
+ shadowView.setBackgroundResource(R.drawable.gaojing_bus_bg)
+ }
} else {
shadowView.background = null
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/gaojing_bus_bg.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/gaojing_bus_bg.png
new file mode 100644
index 0000000000..e99ced9337
Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/gaojing_bus_bg.png differ
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt
index d5d2a840e9..994f239b8e 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SO
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_OCH_TAXI_START_AUTOPILOT_MOFANG
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotControlProvider
+import com.mogo.eagle.core.function.call.R
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope
@@ -100,9 +101,11 @@ object CallerAutoPilotControlManager {
* 刹车: 1<<3
* 双闪: 1<<4
* 档位: 1<<5
- * 轨迹下载: (下载中) 1<<6; (下载失败)1<<7
+ * 其它: 1<<6
+ * 轨迹下载: (下载中) 1<<7; (下载失败)1<<8
*/
val exceptionValue = CallerDevaToolsManager.getExceptionStatusBeforeLaunchAutopilot(source)
+ var isPlayTTS = true
if (exceptionValue != 0) {
if (isShowTip) {
val sb = StringBuilder("请检查车辆")
@@ -126,8 +129,12 @@ object CallerAutoPilotControlManager {
}
if ((exceptionValue and (1 shl 6)) != 0) {
if (!sb.contains("$")) {
- sb.setLength(0)
- sb.append("检测到除已知节点外的其它异常")
+ val reason = CallerDevaToolsManager.getExtra().getString(R.id.autopilot_start_error.toString())
+ if (!reason.isNullOrEmpty()) {
+ isPlayTTS = false
+ sb.setLength(0)
+ sb.append(reason)
+ }
}
}
if ((exceptionValue and (1 shl 7)) != 0 || ((exceptionValue and (1 shl 8)) != 0)) {
@@ -149,8 +156,10 @@ object CallerAutoPilotControlManager {
AppStateManager.currentActivity()?.also {
it.lifeCycleScope.launch {
ToastUtils.showShort(voiceText)
- runCatching {
- AIAssist.getInstance(it).speakTTSVoice(voiceText)
+ if (isPlayTTS) {
+ runCatching {
+ AIAssist.getInstance(it).speakTTSVoice(voiceText)
+ }
}
}
}
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/devatools/CallerDevaToolsManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/devatools/CallerDevaToolsManager.kt
index e4a4bb57fc..18d82a45d7 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/devatools/CallerDevaToolsManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/devatools/CallerDevaToolsManager.kt
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.call.devatools
import android.app.Activity
import android.content.Context
+import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import com.mogo.eagle.core.data.EnvConfig
@@ -29,6 +30,8 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
object CallerDevaToolsManager {
+ private val args by lazy { Bundle() }
+
private val devaToolsProviderApi: IDevaToolsProvider?
get() = CallerBase.getApiInstance(
IDevaToolsProvider::class.java,
@@ -43,6 +46,10 @@ object CallerDevaToolsManager {
devaToolsProviderApi?.checkMonitorDb()
}
+ fun getExtra(): Bundle {
+ return args
+ }
+
/**
* 检查上传崩溃日志
*/
diff --git a/core/mogo-core-utils/src/main/res/values/ids.xml b/core/mogo-core-utils/src/main/res/values/ids.xml
index 93f9bb39b1..e1b3efa377 100644
--- a/core/mogo-core-utils/src/main/res/values/ids.xml
+++ b/core/mogo-core-utils/src/main/res/values/ids.xml
@@ -3,4 +3,5 @@
+
\ No newline at end of file