[6.7.0][启自驾指引] 修改因其它原因导致启不了自驾的提示文案
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user