[3.4.0-map-sdk] merge
This commit is contained in:
@@ -34,6 +34,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
|
||||
private var autopilotState: Int by Delegates.observable(0) { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
fixAtStationState(newValue)
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotStatusResponse(newValue)
|
||||
@@ -41,6 +42,19 @@ 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 {
|
||||
@@ -105,6 +119,8 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
|
||||
fun getAutoPilotReportMessageContent(): String = autoPilotMessageContent
|
||||
|
||||
fun isArriveAtStation(): Boolean = mAutopilotStatusInfo.isArriveAtStation
|
||||
|
||||
/**
|
||||
* 通过Gnss定位更新来同步更新自动驾驶状态
|
||||
*/
|
||||
@@ -156,6 +172,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {
|
||||
mAutopilotStatusInfo.isArriveAtStation = true
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotArriveAtStation(arrivalNotification)
|
||||
|
||||
Reference in New Issue
Block a user