[6.2.0][Feat]调试面板新增无人化演练任务拉取时间

This commit is contained in:
chenfufeng
2023-11-09 18:24:55 +08:00
parent e0018e2452
commit dbaca9cafb
5 changed files with 114 additions and 5 deletions

View File

@@ -0,0 +1,31 @@
package com.mogo.eagle.core.function.call.unmanned
import android.util.Log
import com.mogo.eagle.core.function.api.unmanned.IUnmannedListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 无人化功能状态监听、回调管理者
*/
object CallerUnmannedListenerManager:CallerBase<IUnmannedListener>() {
private const val TAG = "CallerUnmannedListenerManager"
private var time: Int = 45
override fun doSomeAfterAddListener(tag: String, listener: IUnmannedListener) {
super.doSomeAfterAddListener(tag, listener)
listener.onPullTimeUpdate(time)
}
fun dispatchPullTime(time: Int) {
this.time = time
M_LISTENERS.forEach {
val listener = it.value
try {
listener.onPullTimeUpdate(time)
} catch (e: Exception) {
Log.e(TAG, "转发消息出现异常:${e.message}")
}
}
}
}