[2.13.0-arch-opt] fix bug of merge problem
This commit is contained in:
@@ -7,6 +7,7 @@ import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
@@ -17,7 +18,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import kotlinx.android.synthetic.main.view_steering_brake.view.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
/**
|
||||
* 现阶段模型支持刹车与转向同时触发,现有逻辑中还存在两者优先级状态。后续通过各自实现,将去除优先级
|
||||
@@ -47,7 +47,8 @@ class SteeringBrakeView(context: Context, attrs: AttributeSet?) : ConstraintLayo
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo?) {
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
if (gnssInfo != null) {
|
||||
//设置刹车信息,小于默认认为是刹车
|
||||
brakeLight =
|
||||
|
||||
@@ -2,26 +2,24 @@ package com.mogo.eagle.core.function.map
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.map.MogoMapView
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
class MapBizView(context: Context?) : MogoMapView(context), IMoGoSkinModeChangeListener,
|
||||
IMoGoPlanningRottingListener, IMoGoChassisLocationWGS84Listener, IMoGoChassisLamplightListener {
|
||||
IMoGoChassisLocationWGS84Listener, IMoGoChassisLamplightListener {
|
||||
|
||||
override fun onCreate(bundle: Bundle?) {
|
||||
super.onCreate(bundle)
|
||||
map.uiController.showMyLocation(true)
|
||||
|
||||
CallerSkinModeListenerManager.addListener(MapFragment.functionName, this)
|
||||
CallerPlanningRottingListenerManager.addListener(MapFragment.functionName, this)
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(MapFragment.functionName, this)
|
||||
CallerChassisLamplightListenerManager.addListener(MapFragment.functionName, this)
|
||||
|
||||
@@ -31,18 +29,17 @@ class MapBizView(context: Context?) : MogoMapView(context), IMoGoSkinModeChangeL
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
TODO("Not yet implemented")
|
||||
override fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?) {
|
||||
super.onAutopilotLightSwitchData(lightSwitch)
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo?) {
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
// 先取消注册数据,再onDestroy
|
||||
CallerSkinModeListenerManager.removeListener(MapFragment.functionName)
|
||||
CallerPlanningRottingListenerManager.removeListener(MapFragment.functionName)
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(MapFragment.functionName)
|
||||
CallerChassisLamplightListenerManager.removeListener(MapFragment.functionName)
|
||||
super.onDestroy()
|
||||
|
||||
@@ -20,8 +20,6 @@ import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.enums.EventTypeHelper
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity
|
||||
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
@@ -41,12 +39,10 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooC
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.v2x.events.alarm.V2XAlarmServer
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_EXTRA_KEY
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_HANDLER_ACTION
|
||||
import com.mogo.eagle.core.function.v2x.events.receiver.SceneBroadcastReceiver
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.V2XScenarioManager
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.TrackUtils
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.toRoadMarker
|
||||
import com.mogo.eagle.core.function.v2x.internal.V2XManager
|
||||
import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback
|
||||
@@ -63,16 +59,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.map.marker.IMogoMarker
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener
|
||||
import com.mogo.map.marker.MogoMarkersHandler.Companion.mogoMarkersHandler
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.cache.CacheFactory
|
||||
import com.shuyu.gsyvideoplayer.cache.ProxyCacheManager
|
||||
import com.shuyu.gsyvideoplayer.model.VideoOptionModel
|
||||
import com.shuyu.gsyvideoplayer.player.IjkPlayerManager
|
||||
import com.shuyu.gsyvideoplayer.player.PlayerFactory
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
@@ -83,7 +70,6 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.android.asCoroutineDispatcher
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.launch
|
||||
import tv.danmaku.ijk.media.player.IjkMediaPlayer
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
@@ -138,7 +124,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
|
||||
mogoMarkersHandler.unregisterMarkerClickListener(CARD_TYPE_ROAD_CONDITION)
|
||||
}
|
||||
|
||||
override fun onChassisLocationGCJ02(gnssInfo: GnssInfo?) {
|
||||
override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
|
||||
val location = CallerMapLocationListenerManager.getCurrentLocation() ?: return
|
||||
BridgeApi.location.set(location)
|
||||
if (V2XManager.hasInit()) {
|
||||
@@ -149,10 +135,12 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
|
||||
}
|
||||
refreshCarState(location)
|
||||
}
|
||||
|
||||
private fun refreshCarState(location: MogoLocation) {
|
||||
// 巡航处理
|
||||
val v2XRoadEventEntity = V2XAlarmServer.getDriveFrontAlarmEvent(
|
||||
BridgeApi.v2xMarker()?.v2XRoadEventEntityList, location)
|
||||
BridgeApi.v2xMarker()?.v2XRoadEventEntityList, location
|
||||
)
|
||||
if (v2XRoadEventEntity != null) {
|
||||
val distance = v2XRoadEventEntity.distance
|
||||
val min = if (EventTypeEnumNew.isCloudSocketEvent(v2XRoadEventEntity.poiType)) 0 else 5
|
||||
@@ -225,6 +213,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleWarningTargetEvent(data: V2XWarningTarget) {
|
||||
val v2xMessageEntity = V2XMessageEntity<V2XWarningTarget>()
|
||||
v2xMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS
|
||||
@@ -422,7 +411,8 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
|
||||
.subscribe {
|
||||
val size = it?.size ?: 0
|
||||
if (size > 0) {
|
||||
val msgBoxBean = MsgBoxBean(MsgBoxType.V2X, V2XMsg("", "查询到当前全程共${size}个事件", ""))
|
||||
val msgBoxBean =
|
||||
MsgBoxBean(MsgBoxType.V2X, V2XMsg("", "查询到当前全程共${size}个事件", ""))
|
||||
msgBoxBean.sourceType = DataSourceType.SUMMARY
|
||||
CallerMsgBoxManager.saveMsgBox(msgBoxBean)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxBean;
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType;
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg;
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
|
||||
@@ -121,7 +121,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
long oldTime = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getLong("roadwork", 0);
|
||||
if (currentTime - oldTime > 60) { //超过一分钟,才会继续播报重复提醒
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).putLong("roadwork", System.currentTimeMillis() / 1000);
|
||||
CallerAutoPilotManager.sendTripInfo(5, "", "", "", false);
|
||||
CallerAutoPilotControlManager.sendTripInfo(5, "", "", "", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user