Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into 'test_robotaxi-d-app-module_2130_221116_2.13.0.1'

Dev robotaxi d app module 2130 221116 2.13.0

See merge request zhjt/AndroidApp/MoGoEagleEye!427
This commit is contained in:
wangmingjun
2022-12-12 11:51:42 +00:00
2 changed files with 18 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.LifecycleOwner
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.OnRoadListener
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.*
@@ -24,6 +25,8 @@ import kotlinx.coroutines.internal.synchronized
import java.util.*
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeUnit.SECONDS
import java.util.concurrent.atomic.*
import kotlin.math.*
/**
* 高精地图视角管理类
@@ -59,6 +62,9 @@ object CallerVisualAngleManager {
val displayThreshold: Long //最大展示时长 > 0; 表示最长展示多长时间, -1 表示,一直展示,直到触发默认视角, 0: 默认视角专用值,
}
private val beginLocation = AtomicReference<MogoLocation>()
private val listener = object : OnRoadListener {
private var roadId = ""
override fun onRoadIdInfo(roadId: String) {
@@ -68,13 +74,24 @@ object CallerVisualAngleManager {
hasCrossRoad = false
changeVisualAngle(CrossRoad(false))
}
} else {
if (hasCrossRoad) {
val beginLoc = beginLocation.get()
val endLoc = CallerMapLocationListenerManager.getCurrentLocation()
if (beginLoc != null && endLoc != null && abs(beginLoc.bearing - endLoc.bearing) >= 170) {
hasCrossRoad = false
changeVisualAngle(CrossRoad(false))
}
}
}
this.roadId = roadId
}
override fun onStopLineInfo(info: StopLine) {
if (!hasCrossRoad && info.distanceOfCarToStopLine <= 30.0) {
hasCrossRoad = true
beginLocation.set(CallerMapLocationListenerManager.getCurrentLocation())
changeVisualAngle(CrossRoad(true))
}
}

View File

@@ -85,7 +85,7 @@ MOGO_LOCATION_VERSION=1.4.3.27
MOGO_TELEMATIC_VERSION=1.4.3.27
######## MogoAiCloudSDK Version ########
# 自研地图
MAP_SDK_VERSION=2.8.0.8
MAP_SDK_VERSION=2.8.0.9
MAP_SDK_OPERATION_VERSION=1.1.4.1
# websocket
WEBSOCKET_VERSION=1.1.7