[V2X][Road]优化代码逻辑
This commit is contained in:
@@ -36,10 +36,6 @@ object AiRoadMarker {
|
||||
|
||||
private val marker by lazy { AtomicReference<Marker>() }
|
||||
|
||||
private val curStopLine by lazy { AtomicReference<StopLine>() }
|
||||
|
||||
private val lastStopLine by lazy { AtomicReference<StopLine>() }
|
||||
|
||||
private val carLocation by lazy { AtomicReference<Triple<Double, Double, Double>>() }
|
||||
|
||||
private val overlayManager by lazy { MogoOverlayManager.getInstance() }
|
||||
@@ -130,14 +126,12 @@ object AiRoadMarker {
|
||||
if (oldRoadId != roadId) {
|
||||
if (hasCrossRoad) {
|
||||
hasCrossRoad = false
|
||||
lastStopLine.set(curStopLine.get())
|
||||
}
|
||||
}
|
||||
this.roadId = roadId
|
||||
}
|
||||
override fun onStopLineInfo(info: StopLine) {
|
||||
Logger.d(TAG, "--- onStopLineInfo --- info: $info")
|
||||
curStopLine.set(info)
|
||||
if (!hasCrossRoad) {
|
||||
hasCrossRoad = true
|
||||
}
|
||||
@@ -190,6 +184,7 @@ object AiRoadMarker {
|
||||
CallerMapRoadListenerManager.unRegisterRoadListener(TAG)
|
||||
CallerMapLocationListenerManager.removeListener(TAG)
|
||||
pool.shutdownNow()
|
||||
removeRedLine()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user