[2.13.0-arch-opt] merge 2.14.0 line id func
This commit is contained in:
@@ -7,6 +7,9 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import system_master.*
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import kotlin.properties.Delegates
|
||||
import system_master.SystemStatusInfo
|
||||
|
||||
/**
|
||||
@@ -20,6 +23,20 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
@Volatile
|
||||
private var mAutopilotStatusInfo: AutopilotStatusInfo = AutopilotStatusInfo()
|
||||
|
||||
private var lineId: Long? by Delegates.observable(0) { _, _, newValue ->
|
||||
if(newValue == null){
|
||||
return@observable
|
||||
}
|
||||
M_AUTOPILOT_STATUS_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotRouteLineId(newValue)
|
||||
}
|
||||
}
|
||||
|
||||
// 存储所有注册了监听的对象,invokeXXXX进行遍历回调,将信息同步
|
||||
private val M_AUTOPILOT_STATUS_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotStatusListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
@Volatile
|
||||
private var autoPilotMessageCode: String = ""
|
||||
|
||||
@@ -167,6 +184,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
*/
|
||||
fun updateAutopilotControlParameters(autopilotControlParameters: AutopilotControlParameters? = null) {
|
||||
mAutopilotStatusInfo.autopilotControlParameters = autopilotControlParameters
|
||||
lineId = autopilotControlParameters?.autoPilotLine?.lineId
|
||||
invokeAutoPilotStatus(mAutopilotStatusInfo)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user