[6.2.4] fix bug of request in main thread
This commit is contained in:
@@ -26,6 +26,9 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
if (newValue == null) {
|
||||
return@observable
|
||||
}
|
||||
if(newValue == 0L){
|
||||
mAutopilotStatusInfo.isArriveAtStation = false
|
||||
}
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotRouteLineId(newValue)
|
||||
@@ -34,7 +37,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
|
||||
private var autopilotState: Int by Delegates.observable(0) { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
fixAtStationState(newValue)
|
||||
//todo emArrow chainLog
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotStatusResponse(newValue)
|
||||
@@ -42,19 +45,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
}
|
||||
}
|
||||
|
||||
private fun fixAtStationState(autoPilotMode: Int) {
|
||||
if (autoPilotMode == 2) {
|
||||
//自驾状态下,将到站状态置为false
|
||||
mAutopilotStatusInfo.isArriveAtStation = false
|
||||
} else {
|
||||
//其它状态下, 将到站状态置为false
|
||||
val arriveAtStation = mAutopilotStatusInfo.isArriveAtStation
|
||||
if (arriveAtStation) {
|
||||
mAutopilotStatusInfo.isArriveAtStation = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var dockerV: String by Delegates.observable("") { _, oldValue, newValue ->
|
||||
if (!oldValue.contentEquals(newValue)) {
|
||||
M_LISTENERS.forEach {
|
||||
|
||||
Reference in New Issue
Block a user