Merge branch 'dev_robotaxi-d_240227_6.3.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_240227_6.3.0
This commit is contained in:
@@ -135,13 +135,13 @@ object DataManager {
|
||||
MsgBoxType.VOICE -> {
|
||||
CallerMsgBoxListenerManager.invokeListener(MsgCategory.VOICE_INFO, msg)
|
||||
}
|
||||
MsgBoxType.OBU, MsgBoxType.NOTICE, MsgBoxType.OPERATION -> {
|
||||
MsgBoxType.OBU, MsgBoxType.NOTICE, MsgBoxType.OPERATION, MsgBoxType.AUTOPILOT -> {
|
||||
synchronized(this) {
|
||||
notifyList.add(msg)
|
||||
}
|
||||
CallerMsgBoxListenerManager.invokeListener(MsgCategory.NOTICE, msg)
|
||||
}
|
||||
MsgBoxType.REPORT -> {
|
||||
MsgBoxType.REPORT, MsgBoxType.SSMINFO -> {
|
||||
synchronized(this) {
|
||||
sysInfoList.add(msg)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.mogo.eagle.core.data.msgbox
|
||||
|
||||
/**
|
||||
* 工控机相关的消息
|
||||
*/
|
||||
data class AutopilotMsg(
|
||||
val type: Int,
|
||||
val title: String?,
|
||||
val content: String?,
|
||||
val timestamp : Long
|
||||
)
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.eagle.core.data.msgbox
|
||||
|
||||
enum class MsgBoxType {
|
||||
// 按功能划分为几大类:运营、通知、V2X模块、OBU模块、工控机Report、录制、交通、FM、语音等
|
||||
OPERATION, NOTICE, V2X, OBU, REPORT, RECORD, TRAFFIC, FMINFO, VOICE
|
||||
// 按功能划分为几大类:运营、通知、V2X模块、OBU模块、工控机Report、录制、交通、FM、语音、SSM、工控机相关等
|
||||
OPERATION, NOTICE, V2X, OBU, REPORT, RECORD, TRAFFIC, FMINFO, VOICE, SSMINFO, AUTOPILOT
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.mogo.eagle.core.data.msgbox
|
||||
|
||||
/**
|
||||
* SSM消息
|
||||
*/
|
||||
data class SSMMsg(
|
||||
val type: Int,
|
||||
val title: String?,
|
||||
val content: String?,
|
||||
val timestamp : Long
|
||||
)
|
||||
@@ -138,6 +138,7 @@ object ConstantExt {
|
||||
const val MAP_STYLE_VR_OVER_LOOK_ANGLE_SKYBOX = 13f//视角
|
||||
const val MAP_STYLE_VR_ZOOM_VAL_SKYBOX = 0.8f//缩放
|
||||
const val MAP_STYLE_VR_EYE_HEIGHT_SKYBOX = 12f//高度
|
||||
const val MAP_STYLE_VR_ANIMATE_TIME_SKYBOX = 1500
|
||||
|
||||
//默认尾灯不亮
|
||||
const val SELF_CAR_DEFAULT = 0
|
||||
|
||||
@@ -1297,6 +1297,45 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
var remainList = CopyOnWriteArrayList<LonLatPoint>()
|
||||
var mLastPosition = LonLatPoint()
|
||||
var mRoamPostion = 0
|
||||
var lastViewType = ConstantExt.MAP_STYLE_VR_ANGLE_MIDDLE
|
||||
|
||||
fun enableSkybox(){
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.SKYBOX, "enable;" +
|
||||
"${ConstantExt.MAP_STYLE_VR_ANIMATE_TIME_SKYBOX}")
|
||||
interpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_SKYBOX,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_SKYBOX,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_SKYBOX,
|
||||
ConstantExt.MAP_STYLE_VR_SKY_BOX,
|
||||
-1
|
||||
)
|
||||
}
|
||||
fun disableSkybox(eyeHeight: Float, angle: Float, zoomVal: Float, mode: Int, duration: Int){
|
||||
if(lastViewType==ConstantExt.MAP_STYLE_VR_SKY_BOX){
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.SKYBOX, "disable;" +
|
||||
"${eyeHeight};" +
|
||||
"${angle};" +
|
||||
"${zoomVal};" +
|
||||
"${ConstantExt.MAP_STYLE_VR_ANIMATE_TIME_SKYBOX}")
|
||||
}
|
||||
}
|
||||
fun disableSkyboxAndInterpolation(eyeHeight: Float, angle: Float, zoomVal: Float, mode: Int, duration: Int){
|
||||
disableSkybox(
|
||||
eyeHeight,
|
||||
angle,
|
||||
zoomVal,
|
||||
mode,
|
||||
duration,
|
||||
)
|
||||
interpolation(
|
||||
eyeHeight,
|
||||
angle,
|
||||
zoomVal,
|
||||
mode,
|
||||
duration,
|
||||
)
|
||||
}
|
||||
|
||||
override fun setMapViewVisualAngle(type: Int) {
|
||||
mHandler.removeMessages(LOCK_CAR)
|
||||
mHandler.removeMessages(CHANGE_VIEW_ANGLE)
|
||||
@@ -1323,17 +1362,13 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
if (!mLockLocation.getLockCar() && type != ConstantExt.MAP_STYLE_VR_ROAM) {
|
||||
mLockLocation.setLockCar(true)
|
||||
}
|
||||
if (type != ConstantExt.MAP_STYLE_VR_SKY_BOX) {
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.FOG, "disable")
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.SKYBOX, "disable")
|
||||
}
|
||||
if(type != ConstantExt.MAP_STYLE_VR_BRIDGE){
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.BRIDGE, "disable")
|
||||
}
|
||||
// mMapView.setIsFarViewAngel(false)
|
||||
when (type) {
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_MIDDLE -> {
|
||||
interpolation(
|
||||
disableSkyboxAndInterpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_MIDDLE,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_MIDDLE,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_MIDDLE,
|
||||
@@ -1343,7 +1378,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_MIDDLE_XIAOBA -> {
|
||||
interpolation(
|
||||
disableSkyboxAndInterpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_MIDDLE_XIAOBA,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_MIDDLE_XIAOBA,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_MIDDLE_XIAOBA,
|
||||
@@ -1353,7 +1388,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ERHAI_B2 -> {
|
||||
interpolation(
|
||||
disableSkyboxAndInterpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_ERHAI,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_ERHAI,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_ERHAI,
|
||||
@@ -1363,26 +1398,13 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_SKY_BOX -> {
|
||||
skyJob = getDemaningScope()?.launch(Dispatchers.IO) {
|
||||
interpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_SKYBOX,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_SKYBOX,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_SKYBOX,
|
||||
ConstantExt.MAP_STYLE_VR_SKY_BOX,
|
||||
-1
|
||||
)
|
||||
delay(1000)
|
||||
//mMapView.getMapEngine().setCfgKeyVal("isSkyBoxFastChange", "disable")
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.FOG, "enable")
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.SKYBOX, "enable")
|
||||
}
|
||||
//
|
||||
enableSkybox()
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_FAR -> {
|
||||
// mMapView.setScreenToOriginDis(ConstantExt.MAP_STYLE_VR_POSITION_FAR)
|
||||
// mMapView.setDAngle(ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_FAR)
|
||||
interpolation(
|
||||
disableSkyboxAndInterpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_FAR,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_FAR,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_FAR,
|
||||
@@ -1428,7 +1450,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_300 -> {
|
||||
interpolation(
|
||||
disableSkyboxAndInterpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_300,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_300,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_300,
|
||||
@@ -1439,7 +1461,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_TOP -> {
|
||||
interpolation(
|
||||
disableSkyboxAndInterpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_TOP,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_TOP,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_TOP,
|
||||
@@ -1450,7 +1472,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_CROSS -> {
|
||||
interpolation(
|
||||
disableSkyboxAndInterpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_CROSS,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_CROSS,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_CROSS,
|
||||
@@ -1500,7 +1522,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_BRIDGE->{
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.BRIDGE, "enable")
|
||||
interpolation(
|
||||
disableSkyboxAndInterpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_BRIDGE,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_BRIDGE,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_BRIDGE,
|
||||
@@ -1513,6 +1535,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
if(type != ConstantExt.MAP_STYLE_VR_ROAM) {
|
||||
mEventController?.dispatchMapViewVisualAngleChangeListener(type)
|
||||
}
|
||||
lastViewType = type
|
||||
}
|
||||
|
||||
fun setRoamStyle() {
|
||||
|
||||
Reference in New Issue
Block a user