[6.4.0][启自驾指引][埋点] 添加来源字段

This commit is contained in:
renwj
2024-05-06 16:50:28 +08:00
parent 66036e8206
commit 02a2e411b9
12 changed files with 28 additions and 27 deletions

View File

@@ -84,9 +84,9 @@ object CallerAutoPilotControlManager {
/**
* 启自驾前,是否要拦截
* @param isShowTip true: 展示Toast+语音提示; false:不展示Toast+语音提示
*
* @param source -1: 蘑方发出启自驾前状态拦截;>=0 用于其它场景的判断
*/
fun isCanStartAutopilot(isShowTip: Boolean): Boolean {
fun isCanStartAutopilot(isShowTip: Boolean, source: Int = 0): Boolean {
/**
* 方向盘: 1<<0
* 油门 : 1<<1
@@ -95,7 +95,7 @@ object CallerAutoPilotControlManager {
* 档位: 1<<4
* 轨迹下载: (下载中) 1<<5 下载失败1<<6
*/
val exceptionValue = CallerDevaToolsManager.getExceptionStatusBeforeLaunchAutopilot()
val exceptionValue = CallerDevaToolsManager.getExceptionStatusBeforeLaunchAutopilot(source)
if (exceptionValue != 0) {
if (isShowTip) {
val sb = StringBuilder("请检查车辆")

View File

@@ -379,8 +379,8 @@ object CallerDevaToolsManager {
devaToolsProviderApi?.unRegisterRouteDownloadListener(tag)
}
fun getExceptionStatusBeforeLaunchAutopilot(): Int {
return devaToolsProviderApi?.getExceptionStatusBeforeLaunchAutopilot() ?: 0
fun getExceptionStatusBeforeLaunchAutopilot(source: Int): Int {
return devaToolsProviderApi?.getExceptionStatusBeforeLaunchAutopilot(source) ?: 0
}
fun registerStartAutopilotStateListener(tag: String, block: (isCanStartAutopilot: Boolean) -> Unit) {