[Taxi无人化] fix: V620 选择的演练任务拉取时间间隔 没保存状态问题 ;refactor: 增加演练任务拉取时间间隔 增加变化后日志打印;
This commit is contained in:
@@ -7,22 +7,22 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
/**
|
||||
* 无人化功能状态监听、回调管理者
|
||||
*/
|
||||
object CallerUnmannedListenerManager:CallerBase<IUnmannedListener>() {
|
||||
object CallerUnmannedListenerManager : CallerBase<IUnmannedListener>() {
|
||||
private const val TAG = "CallerUnmannedListenerManager"
|
||||
|
||||
private var time: Int = 45
|
||||
private var virtualTaskPullTaskInterval: Int = 45 //单位:秒
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IUnmannedListener) {
|
||||
super.doSomeAfterAddListener(tag, listener)
|
||||
listener.onPullTimeUpdate(time)
|
||||
listener.onVirtualTaskPullTaskIntervalUpdate(virtualTaskPullTaskInterval)
|
||||
}
|
||||
|
||||
fun dispatchPullTime(time: Int) {
|
||||
this.time = time
|
||||
fun dispatchVirtualTaskPullTaskInterval(interval: Int) {
|
||||
this.virtualTaskPullTaskInterval = interval
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
try {
|
||||
listener.onPullTimeUpdate(time)
|
||||
listener.onVirtualTaskPullTaskIntervalUpdate(interval)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "转发消息出现异常:${e.message}")
|
||||
}
|
||||
@@ -30,9 +30,9 @@ object CallerUnmannedListenerManager:CallerBase<IUnmannedListener>() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取无人化演练拉取的时间间隔(单位ms)
|
||||
* 获取无人化演练拉取的时间间隔(单位: 秒)
|
||||
*/
|
||||
fun getPullTime(): Int {
|
||||
return time * 1000
|
||||
fun getVirtualTaskPullTaskInterval(): Int {
|
||||
return virtualTaskPullTaskInterval
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user