[6.4.0][启自驾指引] 添加下载状态ui

This commit is contained in:
renwj
2024-04-18 16:37:58 +08:00
parent dfd4a016f7
commit 033df02a24
20 changed files with 337 additions and 6 deletions

View File

@@ -105,6 +105,7 @@ object CallerAutoPilotControlManager {
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
providerApi?.sendTrajectoryDownloadReq(autoPilotLine)
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, 0)
}
}
@@ -115,6 +116,7 @@ object CallerAutoPilotControlManager {
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType)
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, downloadType)
}
}

View File

@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.call.autopilot
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLine
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
@@ -268,4 +269,10 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
lineId = autopilotControlParameters?.autoPilotLine?.lineId ?: 0
invokeAutoPilotStatus(mAutopilotStatusInfo)
}
fun invokeTrajectoryDownloadReq(autoPilotLine: AutoPilotLine, downloadType: Int) {
M_LISTENERS.forEach { itx ->
itx.value.onAutopilotTrajectoryDownloadReq(autoPilotLine, downloadType)
}
}
}

View File

@@ -355,4 +355,12 @@ object CallerDevaToolsManager {
fun attachAutopilotBeforeLaunchView(ctx: Context, group: ViewGroup) {
devaToolsProviderApi?.attachAutopilotStatusView(ctx, group)
}
fun registerRouteDownloadListener(tag: String, block:(state: Int) -> Unit) {
devaToolsProviderApi?.registerRouteDownloadListener(tag, block)
}
fun unRegisterRouteDownloadListener(tag: String) {
devaToolsProviderApi?.unRegisterRouteDownloadListener(tag)
}
}