[Opt]直接从相关的Caller类中获取缓存的全局路径规划轨迹点

This commit is contained in:
chenfufeng
2023-02-02 16:53:14 +08:00
parent 0a4b0be72a
commit 8851a1ef00
4 changed files with 16 additions and 28 deletions

View File

@@ -11,12 +11,19 @@ import mogo.telematics.pad.MessagePad
*/
object CallerPlanningRottingListenerManager : CallerBase<IMoGoPlanningRottingListener>() {
private var globalPathResp: MessagePad.GlobalPathResp? = null
override fun doSomeAfterAddListener(tag: String, listener: IMoGoPlanningRottingListener) {
listener.onAutopilotRotting(globalPathResp)
}
/**
* 路径规划 回调
* @param globalPathResp 自动驾驶网约车回调数据
*/
@Synchronized
fun invokeAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
this.globalPathResp = globalPathResp
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value