From 4a43fb693615b56914a36d986854109206de3a89 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Fri, 5 Jul 2024 18:25:19 +0800 Subject: [PATCH 1/9] =?UTF-8?q?[6.5.0]=E8=87=AA=E5=8A=A8=E6=8E=A2=E6=9F=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/res/layout/taxi_base_fragment.xml | 23 +++++ .../main/res/layout/taxi_p_base_fragment.xml | 23 +++++ .../layout/unmanned_taxi_base_fragment.xml | 24 ++++++ .../res/layout/taxt_u_p_base_fragment.xml | 23 +++++ .../AutomaticExplorationAdapter.kt | 16 +++- .../exploration/AutomaticExplorationView.kt | 83 ++++++++++++------- .../core/data/notice/AutoExplorationEntity.kt | 2 +- 7 files changed, 162 insertions(+), 32 deletions(-) diff --git a/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml b/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml index 5b87407bc6..f41ff6699a 100644 --- a/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml +++ b/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml @@ -149,6 +149,18 @@ app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> + + + + + + + + + + + + + + + + + + + + + + + () { private var data: List ?= null + private var completeListener: CompleteListener ?= null fun setData(data: List){ this.data = data + notifyDataSetChanged() + } + + fun setListener(listener: CompleteListener){ + completeListener = listener } override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ExplorationHolder { @@ -44,15 +50,17 @@ class AutomaticExplorationAdapter(val context: Context,val user: Int): RecyclerV override fun onBindViewHolder(holder: ExplorationHolder, position: Int) { data?.let { - holder.tvExplorationContent.text = it[position].explorationContent + val entity = it[position] + holder.tvExplorationContent.text = entity.explorationContent val rotationAnim = ObjectAnimator.ofFloat(holder.ivExplorationLoading, "rotation", 0f, 360f) - rotationAnim.repeatCount = it[position].explorationDuration.toInt()/1000 + rotationAnim.repeatCount = entity.explorationDuration.toInt()/1000 rotationAnim.repeatMode = ValueAnimator.RESTART rotationAnim.duration = 1000 rotationAnim.interpolator = LinearInterpolator() rotationAnim.addListener(object: AnimatorListenerAdapter(){ override fun onAnimationEnd(animation: Animator) { super.onAnimationEnd(animation) + completeListener?.onComplete(entity) if(user == 0){ holder.ivExplorationLoading.setImageDrawable( ContextCompat.getDrawable( @@ -77,4 +85,8 @@ class AutomaticExplorationAdapter(val context: Context,val user: Int): RecyclerV var tvExplorationContent: TextView = itemView.findViewById(R.id.tvExplorationContent) } + interface CompleteListener{ + fun onComplete(entity: AutoExplorationEntity) + } + } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt index 5bfebc913f..6ef0dce532 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt @@ -15,6 +15,7 @@ import com.mogo.commons.voice.AIAssist import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo import com.mogo.eagle.core.data.notice.AutoExplorationEntity import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.utilcode.util.CountDownTimer import com.mogo.eagle.core.utilcode.util.ThreadUtils @@ -37,7 +38,7 @@ class AutomaticExplorationView @JvmOverloads constructor( companion object { private const val TAG = "AutomaticExplorationView" - private const val EXPLORATION_SHOW_TIME = 10000L //自动探查弹窗展示时间 + private const val EXPLORATION_SHOW_TIME = 5000L //探查完毕后,5秒关闭弹窗 } init { @@ -54,20 +55,13 @@ class AutomaticExplorationView @JvmOverloads constructor( LayoutInflater.from(context).inflate(R.layout.view_automatic_exploration_p, this, true) } initEvent() - initData() } - fun showAutoExploration(){ - //倒计时 - - //语音播放 - AIAssist.getInstance(context).speakTTSVoice("道路畅通一切正常蘑菇行车助手将持续守候您的出行") - - //隐藏自动探查视图 + private fun showAutoExploration(){ ThreadUtils.runOnUiThread { - this@AutomaticExplorationView.visibility = View.GONE + this@AutomaticExplorationView.visibility = View.VISIBLE + initData() } - } private fun initEvent(){ @@ -78,15 +72,6 @@ class AutomaticExplorationView @JvmOverloads constructor( rotationAnim?.cancel() this.visibility = View.GONE } - //启动扫描 - ivScan?.let { - rotationAnim = ObjectAnimator.ofFloat(it, "rotation", 0f, 360f) - rotationAnim?.repeatCount = ValueAnimator.INFINITE - rotationAnim?.repeatMode = ValueAnimator.RESTART - rotationAnim?.duration = 2000 - rotationAnim?.interpolator = LinearInterpolator() - rotationAnim?.start() - } rvExplorationList = findViewById(R.id.rvExplorationList) val linearLayoutManager = LinearLayoutManager(context) linearLayoutManager.orientation = LinearLayoutManager.VERTICAL @@ -96,16 +81,47 @@ class AutomaticExplorationView @JvmOverloads constructor( } private fun initData() { - val dataList = ArrayList() - dataList.add(AutoExplorationEntity("当前道路事件分析",2000L)) - dataList.add(AutoExplorationEntity("前方车辆",2000L)) - dataList.add(AutoExplorationEntity("两侧车辆",3000L)) - dataList.add(AutoExplorationEntity("后方车辆",3000L)) - dataList.add(AutoExplorationEntity("前方路口车辆流速分析",4000L)) - dataList.add(AutoExplorationEntity("前方路口行人/非机动车分析",4000L)) - dataList.add(AutoExplorationEntity("路侧视频分析",5000L)) - automaticExplorationAdapter?.setData(dataList) + val dataList = ArrayList(7) + dataList.add(AutoExplorationEntity("当前道路事件分析",2000L,false)) + dataList.add(AutoExplorationEntity("前方车辆",2000L,false)) + dataList.add(AutoExplorationEntity("两侧车辆",2600L,false)) + dataList.add(AutoExplorationEntity("后方车辆",3000L,false)) + dataList.add(AutoExplorationEntity("前方路口车辆流速分析",4000L,false)) + dataList.add(AutoExplorationEntity("前方路口行人/非机动车分析",4300L,false)) + dataList.add(AutoExplorationEntity("路侧视频分析",5000L,false)) + automaticExplorationAdapter?.setListener(object: AutomaticExplorationAdapter.CompleteListener{ + override fun onComplete(entity: AutoExplorationEntity) { + var allComplete = true //所有探查项目都探查完毕 + dataList.forEach { + if(it.explorationContent == entity.explorationContent){ + it.explorationComplete = true + } + if(!it.explorationComplete){ + allComplete = false + } + } + if(allComplete){ + //语音播放 + AIAssist.getInstance(context).speakTTSVoice("道路畅通一切正常蘑菇行车助手将持续守候您的出行") + //5秒后关闭弹窗 + val hideViewTimer =object: CountDownTimer(EXPLORATION_SHOW_TIME,EXPLORATION_SHOW_TIME){ + override fun onTick(millisUntilFinished: Long) { + } + + override fun onFinish() { + //隐藏自动探查视图 + ThreadUtils.runOnUiThread { + this@AutomaticExplorationView.visibility = View.GONE + } + } + } + hideViewTimer.start() + } + } + + }) + automaticExplorationAdapter?.setData(dataList) //每出现一次自动探查,增加相应的服务次数 //车辆服务次数 AutopilotSummaryInfo.vehicleServiceNum += 31 @@ -117,6 +133,15 @@ class AutomaticExplorationView @JvmOverloads constructor( AutopilotSummaryInfo.vulnerableTipNum += 4 //消除安全风险隐患次数 AutopilotSummaryInfo.dangerNum += 24 + //启动扫描 + ivScan?.let { + rotationAnim = ObjectAnimator.ofFloat(it, "rotation", 0f, 360f) + rotationAnim?.repeatCount = ValueAnimator.INFINITE + rotationAnim?.repeatMode = ValueAnimator.RESTART + rotationAnim?.duration = 2000 + rotationAnim?.interpolator = LinearInterpolator() + rotationAnim?.start() + } } override fun onDetachedFromWindow() { diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/notice/AutoExplorationEntity.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/notice/AutoExplorationEntity.kt index 7b20cd6db7..a4efc60c1b 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/notice/AutoExplorationEntity.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/notice/AutoExplorationEntity.kt @@ -3,4 +3,4 @@ package com.mogo.eagle.core.data.notice /** * 自动探查 */ -data class AutoExplorationEntity(var explorationContent: String,var explorationDuration: Long) \ No newline at end of file +data class AutoExplorationEntity(var explorationContent: String,var explorationDuration: Long,var explorationComplete: Boolean) \ No newline at end of file From a22b74e6eec08361950ed21bdddbe4630c0869ac Mon Sep 17 00:00:00 2001 From: renwj Date: Fri, 5 Jul 2024 19:23:28 +0800 Subject: [PATCH 2/9] =?UTF-8?q?[6.5.0][=E9=81=93=E8=B7=AF=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6]=20=E8=A1=8C=E4=BA=BA/=E9=9D=9E=E6=9C=BA=E5=8A=A8?= =?UTF-8?q?=E8=BD=A6=E6=A8=AA=E7=A9=BF=E9=A2=84=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt | 53 +++++- .../biz/v2x/v2n/remove/MarkerRemoveManager.kt | 6 +- .../v2n/scenario/scene/airoad/AiRoadMarker.kt | 159 +++++++++++------- .../scene/road/V2XRoadEventMarker.java | 2 +- .../core/function/hmi/ui/MoGoHmiProvider.kt | 10 ++ .../eagle/core/data/enums/EventTypeEnumNew.kt | 10 ++ .../core/utilcode/floating/MoGoPopWindow.kt | 21 ++- 7 files changed, 196 insertions(+), 65 deletions(-) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index 1dde27aca1..aa247339e8 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -11,6 +11,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.enums.CommunicationType import com.mogo.eagle.core.data.enums.DataSourceType import com.mogo.eagle.core.data.enums.EventTypeEnumNew +import com.mogo.eagle.core.data.enums.TrafficTypeEnum import com.mogo.eagle.core.data.enums.WarningDirectionEnum.ALERT_WARNING_TOP import com.mogo.eagle.core.data.map.entity.MarkerExploreWay import com.mogo.eagle.core.data.map.entity.MarkerLocation @@ -31,6 +32,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerV2XListenerManager.V2NC import com.mogo.eagle.core.function.call.autopilot.CallerV2nNioEventListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.hmi.CallerRoadV2NEventWindowListenerManager +import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils @@ -42,6 +44,8 @@ import com.mogo.eagle.core.utilcode.util.CoordinateUtils import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils import com.mogo.eagle.core.utilcode.util.GsonUtils import com.mogo.eagle.function.biz.v2x.V2XBizTrace +import com.mogo.eagle.function.biz.v2x.v2n.consts.V2XConst +import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerWrapper import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.AiRoadMarker import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.AiRoadMarker.Marker import com.mogo.eagle.function.biz.v2x.v2n.utils.EventDismissBean @@ -51,6 +55,8 @@ import com.mogo.eagle.function.biz.v2x.v2n.utils.V2NUtils import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager import com.mogo.map.MapDataWrapper import com.mogo.map.entities.Lane +import com.mogo.map.overlay.core.Level.MAP_MARKER +import com.mogo.map.overlay.point.Point import mogo.telematics.pad.MessagePad import mogo.telematics.pad.MessagePad.Header import mogo.telematics.pad.MessagePad.TrackedObject @@ -58,6 +64,7 @@ import mogo.telematics.pad.MessagePad.V2nCrossSpeed import mogo.v2x.MogoV2X import mogo.v2x.MogoV2X.RSI_PB import mogo.v2x.MogoV2X.RTEData_PB +import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.TimeUnit.SECONDS import kotlin.math.abs @@ -73,6 +80,13 @@ internal object V2NIdentifyDrawer: IEventDismissListener { private const val MSG_WHAT_DRAW_YONGDU = 0x1012 // 交通拥堵 private const val MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE = 0x1013 // 他车倒车/逆行 private const val MSG_WHAT_DRAW_GREEN_WAVE = 0x1014 // 绿波通行 + private const val MSG_WHAT_DRAW_PEOPLE_CROSS = 0x1015 // 行人横穿 + + private val builder_people_cross by lazy { + Point.Options.Builder(V2XConst.V2X_MARKER_OWNER, MAP_MARKER).isUseGps(true).anchorColor("#D65D5AFF").set3DMode(true).icon3DRes(TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DIconId) + } + + private val markers by lazy { ConcurrentHashMap() } private val callback = Handler.Callback { msg -> if (msg.what == MSG_WHAT_DRAW_SHIGONE || msg.what == MSG_WHAT_DRAW_SHIGU) { @@ -385,6 +399,35 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } } } + } else if (msg.what == MSG_WHAT_DRAW_PEOPLE_CROSS) { + val data = msg.obj as? MessagePad.Event ?: return@Callback true + AiRoadMarker.aiMakers.getOrPut(data.eventId) { + AiRoadMarker() + }.apply { + val isDriver = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) + val carLocation = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() + val distance = CoordinateUtils.calculateLineDistance(carLocation.longitude, carLocation.latitude, data.longitude, data.latitude) + if (distance > 150) { + Logger.i(TAG, "people cross --> distance > 150") + V2XBizTrace.onAck(TAG, mapOf("people cross" to "distance > 150"), true) + return@Callback true + } + val cameraIp = if(TextUtils.isEmpty(data.exts)) "" + else (GsonUtils.fromJson(data.exts, Map::class.java)["cameraIp"])?:"" + // 弹事件框 + CallerRoadV2NEventWindowListenerManager.showLiveVideo( + data.eventId, + data.timestamp, + EventTypeEnumNew.getUpdateIconRes(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), + String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt()), + isDriver, + cameraIp.toString(), + data.longitude, + data.latitude) + + }.also { + it.marker(Marker(data.eventId, EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType, data.longitude, data.latitude, 0.0), drawMarker = true, false, isHighFrequency = true) + }.receive() } true } @@ -573,6 +616,14 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } } + private fun drawPeopleCross(event: MessagePad.Event) { + Log.d("V2NIdentifyDrawer", "---drawPeopleCross---: $event, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]") + if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { + handler.removeMessages(MSG_WHAT_DRAW_PEOPLE_CROSS) + handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_PEOPLE_CROSS, event)) + } + } + private val nioEventListener = object : IMoGoV2nNioEventListener { override fun onV2nNioCongestionEvent(congestion: MessagePad.V2nCongestion) { super.onV2nNioCongestionEvent(congestion) @@ -582,7 +633,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener { override fun onV2nNioCrossoverEvent(event: MessagePad.Event) { super.onV2nNioCrossoverEvent(event) V2XBizTrace.onAck(event,"onV2nNioCrossoverEvent", true) - //TODO renwj + drawPeopleCross(event) } override fun onV2nNioGreenWavePassageEvent(crossSpeed: V2nCrossSpeed) { diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/remove/MarkerRemoveManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/remove/MarkerRemoveManager.kt index 2727b00f5f..14311ff67a 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/remove/MarkerRemoveManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/remove/MarkerRemoveManager.kt @@ -19,7 +19,7 @@ import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicReference -data class MarkerWrapper(val id: String, val lon: Double, val lat: Double, val coordinateType: Int, var markers: ArrayList? = null, var lines: ArrayList? = null, var elapsedDistance: Int = 500, var elapsedDuration: Long = -1, var onRemoved:((id: String) -> Unit)? = null) { +data class MarkerWrapper(val id: String, var lon: Double, var lat: Double, val coordinateType: Int, var markers: ArrayList? = null, var lines: ArrayList? = null, var elapsedDistance: Int = 500, var elapsedDuration: Long = -1, var onRemoved:((id: String) -> Unit)? = null) { fun addLine(line: Polyline) { var ll = this.lines @@ -215,4 +215,8 @@ object MarkerRemoveManager { handler.postDelayed(checkTask, 1000) } } + + fun peekMarker(id: String): MarkerWrapper? { + return showedMarkers.find { it.id == id } + } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt index 46eca765cc..fc6e5b4e8b 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt @@ -21,11 +21,15 @@ import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerRemoveManager import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerWrapper import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road.V2XAiRoadEventMarker import com.mogo.map.MogoData.Companion.mogoMapData +import com.mogo.map.overlay.core.Level +import com.mogo.map.overlay.core.Level.MAP_MARKER import com.mogo.map.overlay.core.Level.ROAD_CENTER_LINE import com.mogo.map.overlay.line.Polyline +import com.mogo.map.overlay.point.Point import com.zhidaoauto.map.data.road.CenterLine import java.util.* import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.CopyOnWriteArraySet import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicReference @@ -42,10 +46,19 @@ class AiRoadMarker { private const val TAG = "AiRoadMarker" private val COLOR_START = Color.parseColor("#002ABAD9") private val COLOR_END = Color.parseColor("#66FF7A30") + private val builders by lazy { ConcurrentHashMap() } + + private val markerIds by lazy { CopyOnWriteArraySet() } + + internal fun getOrPutPointOptionBuilder(id: String, owner: String, level: Level): Point.Options.Builder { + return builders.getOrPut(id) { Point.Options.Builder(owner, level) } + } } private val marker by lazy { AtomicReference() } + + private val overlayManager by lazy { CallerMapUIServiceManager.getOverlayManager() } @@ -84,68 +97,98 @@ class AiRoadMarker { .setWidth(50f).setUseGps(true) } - fun marker(marker: Marker, drawMarker: Boolean, drawRoadLine: Boolean = false) { - v2nDrawHandler.post { - val location = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() - this.marker.set(marker) - var elapsedDistance = 500 - if (marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType) { - elapsedDistance = 10 - } - var elapsedDuration = -1L - if (marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType) { - elapsedDuration = TimeUnit.SECONDS.toMillis(3) - } - val wrapper = MarkerWrapper(marker.id, marker.poi_lon, marker.poi_lat, 1, elapsedDistance = elapsedDistance, elapsedDuration = elapsedDuration) - if (drawMarker) { - marker.entity?.apply { roadMarker.drawMarkers(this, wrapper) } - } - if (drawRoadLine) { - //施工中心点前方的自车行驶方向上300米距离 - var l1: CenterLine? = null - var l2: CenterLine? = null - mogoMapData.get()?.getCenterLineRangeInfo( - marker.poi_lon, - marker.poi_lat, - location.heading.toFloat(), - 300f, call = { result -> - //施工中心点后方的自车行驶方向上300米距离 - result?.let { - V2XBizTrace.onAck("$TAG -marker-3-l1:", it) - l1 = result - } - countDown.incrementAndGet() - realMark(marker, wrapper, l1, l2, location.heading) - }) - mogoMapData.get()?.getCenterLineRangeInfo( - marker.poi_lon, - marker.poi_lat, - location.heading.toFloat(), - -200f, call = { result -> - result?.let { - V2XBizTrace.onAck("$TAG -marker-3-l2:", it) - l2 = result - } - countDown.incrementAndGet() - realMark(marker, wrapper, l1, l2, location.heading) - }) + fun marker(marker: Marker, drawMarker: Boolean, drawRoadLine: Boolean = false, isHighFrequency:Boolean = false) { + val markerId = marker.id + if (isHighFrequency && drawMarker) { + val builder = getOrPutPointOptionBuilder(markerId, V2XConst.V2X_MARKER_OWNER, MAP_MARKER) + builder + .set3DMode(true) + .isUseGps(true) + .icon3DRes(EventTypeEnumNew.getMarker3DRes(marker.poiType)) + .anchorColor("#D65D5AFF") + .longitude(marker.poi_lon) + .latitude(marker.poi_lat) + CallerMapUIServiceManager.getOverlayManager()?.showOrUpdatePoint(builder.build())?.let { p -> + if (!markerIds.contains(markerId)) { + markerIds.add(markerId) + val wrapper = MarkerWrapper(markerId, marker.poi_lon, marker.poi_lat, 1, elapsedDistance = 10) + wrapper.onRemoved = { + builders.remove(markerId) + markerIds.remove(p.id) + } + wrapper.addPoint(p) + MarkerRemoveManager.addMarker(wrapper) + } else { + MarkerRemoveManager.peekMarker(markerId)?.also { + it.lon = marker.poi_lon + it.lat = marker.poi_lat + } + } } + } else { + v2nDrawHandler.post { + val location = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() + this.marker.set(marker) + var elapsedDistance = 500 + if (marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType) { + elapsedDistance = 10 + } + var elapsedDuration = -1L + if (marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType) { + elapsedDuration = TimeUnit.SECONDS.toMillis(3) + } + val wrapper = MarkerWrapper(markerId, marker.poi_lon, marker.poi_lat, 1, elapsedDistance = elapsedDistance, elapsedDuration = elapsedDuration) + if (drawMarker) { + marker.entity?.apply { roadMarker.drawMarkers(this, wrapper) } + } + if (drawRoadLine) { + //施工中心点前方的自车行驶方向上300米距离 + var l1: CenterLine? = null + var l2: CenterLine? = null + mogoMapData.get()?.getCenterLineRangeInfo( + marker.poi_lon, + marker.poi_lat, + location.heading.toFloat(), + 300f, call = { result -> + //施工中心点后方的自车行驶方向上300米距离 + result?.let { + V2XBizTrace.onAck("$TAG -marker-3-l1:", it) + l1 = result + } + countDown.incrementAndGet() + realMark(marker, wrapper, l1, l2, location.heading) + }) + mogoMapData.get()?.getCenterLineRangeInfo( + marker.poi_lon, + marker.poi_lat, + location.heading.toFloat(), + -200f, call = { result -> + result?.let { + V2XBizTrace.onAck("$TAG -marker-3-l2:", it) + l2 = result + } + countDown.incrementAndGet() + realMark(marker, wrapper, l1, l2, location.heading) + }) + } - if (marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType) { - val builder = Polyline.Options.Builder(V2XConst.V2X_MARKER_OWNER, ROAD_CENTER_LINE) - builder.colors(listOf(Color.parseColor("#996DFED0"), Color.parseColor("#CC6DFED0"), Color.parseColor("#C76DFED0"), Color.parseColor("#006DFED0"))) - .setWidth(5f) - .setUseGps(true) - .points(listOf(MogoLatLng(location.latitude, location.longitude), MogoLatLng(marker.poi_lat, marker.poi_lon))) - .setIsGradient(true) - .isShowArrow(true) - CallerMapUIServiceManager.getOverlayManager()?.showOrUpdateLine(builder.build())?.also { wrapper.addLine(it) } + if (marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType) { + val builder = Polyline.Options.Builder(V2XConst.V2X_MARKER_OWNER, ROAD_CENTER_LINE) + builder.colors(listOf(Color.parseColor("#996DFED0"), Color.parseColor("#CC6DFED0"), Color.parseColor("#C76DFED0"), Color.parseColor("#006DFED0"))) + .setWidth(50f) + .setUseGps(true) + .points(listOf(MogoLatLng(location.latitude, location.longitude), MogoLatLng(marker.poi_lat, marker.poi_lon))) + .setIsGradient(true) + .isShowArrow(true) + CallerMapUIServiceManager.getOverlayManager()?.showOrUpdateLine(builder.build())?.also { wrapper.addLine(it) } + } + wrapper.onRemoved = { id -> + aiMakers.remove(id) + } + MarkerRemoveManager.addMarker(wrapper) } - wrapper.onRemoved = { id -> - aiMakers.remove(id) - } - MarkerRemoveManager.addMarker(wrapper) } + } @Synchronized diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java index 5f85dad000..2353f53d63 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java @@ -49,7 +49,7 @@ public class V2XRoadEventMarker implements IV2XMarker { MarkerLocation location = noveltyInfo.getLocation(); AiRoadMarker.Marker m = new AiRoadMarker.Marker(noveltyInfo.getInfoId(), noveltyInfo.getPoiType(), gpsLocation.second, gpsLocation.first, location.getAngle(), polygons, null, entity); AiRoadMarker aiMarker = new AiRoadMarker(); - aiMarker.marker(m, true, isDrawRoadLine(m.getPoiType())); + aiMarker.marker(m, true, isDrawRoadLine(m.getPoiType()), false); AiRoadMarker.aiMakers.put(noveltyInfo.getInfoId(), aiMarker); } } else { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt index 523f54857f..e3d7d7fdb9 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt @@ -419,7 +419,17 @@ class MoGoHmiProvider : IMoGoHmiProvider { .width(WindowManager.LayoutParams.WRAP_CONTENT) .height(WindowManager.LayoutParams.WRAP_CONTENT) .attachToActivity(activity) + .draggable(true) .gravityInActivity(Gravity.CENTER) + .also { + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + it.offsetX(960) + it.offsetY(445) + } else { + it.offsetX(980) + it.offsetY(-324) + } + } .onDismissed { greenWave.set(null) } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt index e4536b5430..d4505fc70c 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt @@ -526,6 +526,13 @@ enum class EventTypeEnumNew( content = "保持当前车速即可通过路口,好丝滑!", tts = "保持当前车速即可通过路口,好丝滑!" ), + TYPE_SOCKET_ROAD_PEOPLE_CROSS( + "100064", + "行人横穿", + poiTypeSrcVr = View.NO_ID, + content = "前方%s米有行人/非机动车横穿,蘑菇提醒您提前减速,注意观察,小心通过", + tts = "前方%s米有行人/非机动车横穿,蘑菇提醒您提前减速,注意观察,小心通过" + ), TYPE_ERROR( 0.toString(), "未知/错误/异常", @@ -822,6 +829,7 @@ enum class EventTypeEnumNew( } } TYPE_SOCKET_ROAD_CONGESTION.poiType -> R.raw.v2x_yongdu + TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType -> if (FunctionBuildConfig.skinMode != 0) TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DIconId else TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DNightIconId else -> 0 } } @@ -1194,6 +1202,8 @@ enum class EventTypeEnumNew( TYPE_SOCKET_ROAD_CONGESTION.poiType -> R.drawable.v2x_icon_yongdu_vr // 他车逆行/倒车 TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType -> if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) R.drawable.icon_v2x_other_retrograde_vehicle_passenger else R.drawable.icon_v2x_other_retrograde_vehicle_driver + // 行人/非机动车横穿 + TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType -> if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) R.drawable.icon_xingren_hengchuan_passenger else R.drawable.icon_xingren_hengchuan_driver // 通过公交站 TYPE_USECASE_ROAD_BUS_STATION.poiType -> if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) R.drawable.icon_v2x_bus_station_passenger else R.drawable.icon_v2x_bus_station_driver //拥堵 diff --git a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/floating/MoGoPopWindow.kt b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/floating/MoGoPopWindow.kt index 195909129a..9ae5092dc2 100644 --- a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/floating/MoGoPopWindow.kt +++ b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/floating/MoGoPopWindow.kt @@ -15,11 +15,14 @@ import android.widget.PopupWindow import androidx.annotation.LayoutRes import androidx.core.view.doOnAttach import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope -import com.mogo.eagle.core.utilcode.util.* +import com.mogo.eagle.core.utilcode.mogo.logger.Logger import java.util.concurrent.atomic.AtomicBoolean class MoGoPopWindow private constructor(builder: Builder){ + companion object { + private const val TAG = "MoGoPopWindow" + } private val content: View = builder.content ?: throw AssertionError("要填充的View不能为空") @@ -109,9 +112,19 @@ class MoGoPopWindow private constructor(builder: Builder){ val params = content.rootView.layoutParams as WindowManager.LayoutParams val oldX = params.x val oldY = params.y - val newX = oldX + dx - val newY = oldY + dy + Logger.d(TAG, "oldX: $oldX, oldY: $oldY, dx: $dx, dy:$dy") + var newX = oldX + dx + var newY = oldY + dy if (outer.contains(rawX.toInt(), rawY.toInt())) { + val width = activity.resources.displayMetrics.widthPixels + val height = activity.resources.displayMetrics.heightPixels +// if (newX < 0) { +// newX += newX +// } +// if (newY < 0) { +// newY += height +// } + Logger.d(TAG, "screen_width: $width, screen_height: $height, newX: $newX, newY: $newY, rawX: ${rawX.toInt()}, rawY: ${rawY.toInt()}, width: ${content.width}, height: ${content.height}") pop.update(newX, newY, content.width, content.height) } oldRawX = rawX @@ -252,7 +265,7 @@ class MoGoPopWindow private constructor(builder: Builder){ } fun offsetX(x: Int) = apply { - this.offsetY = x + this.offsetX = x } fun offsetY(y: Int) = apply { From 4f9ecd83739bdb9db96cb130e139398f3466fbb0 Mon Sep 17 00:00:00 2001 From: EmArrow Date: Fri, 5 Jul 2024 19:38:53 +0800 Subject: [PATCH 3/9] [6.5.0] update jiangshiche --- .../identify/TrackerSourceFilterHelper.kt | 4 +++- .../src/main/java/com/mogo/map/IMogoMap.kt | 2 ++ .../com/mogo/map/overlay/IMoGoOverlayManager.kt | 2 ++ .../src/main/java/com/mogo/map/AMapWrapper.kt | 16 ++++++++++++++++ .../mogo/map/overlay/MoGoOverlayManagerImpl.kt | 11 +++++++++-- .../java/com/mogo/map/utils/ObjectUtils.java | 4 ---- 6 files changed, 32 insertions(+), 7 deletions(-) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt index 32708dce2e..f845c24b6c 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt @@ -10,6 +10,8 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isPassenger import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxi import com.mogo.map.overlay.core.Level import com.mogo.map.overlay.point.Point +import com.zhidaoauto.map.sdk.open.renders.marker.Marker +import com.zhidaoauto.map.sdk.open.renders.marker.MarkerOptions import mogo.telematics.pad.MessagePad.* object TrackerSourceFilterHelper { @@ -112,7 +114,7 @@ object TrackerSourceFilterHelper { .setDisplayAnim(true) .setAnimScale(getAnimScale(data.type)) .build() - CallerMapUIServiceManager.getOverlayManager()?.showOrUpdatePoint(opt) + CallerMapUIServiceManager.getOverlayManager()?.updateAnimPoint(opt) //消息埋点 CallerFuncBizListenerManager.invokeAttrZombieAnalyticsEvent() } diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMap.kt b/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMap.kt index 4c0e2e2bcf..e7ed9a56eb 100644 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMap.kt +++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMap.kt @@ -33,6 +33,8 @@ interface IMogoMap { fun addPoint(options: Point.Options): IMapPointOverlay? + fun addAnimPoint(options: Point.Options) + fun addLine(options: Polyline.Options): IMapPolylineOverlay? /** diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/overlay/IMoGoOverlayManager.kt b/libraries/mogo-map-api/src/main/java/com/mogo/map/overlay/IMoGoOverlayManager.kt index eb5b53740c..26a6885662 100644 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/overlay/IMoGoOverlayManager.kt +++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/overlay/IMoGoOverlayManager.kt @@ -75,4 +75,6 @@ interface IMoGoOverlayManager { fun hideAllPointsExceptIds(vararg ids: String) fun hideAllPointsExceptOwners(vararg owners: String) + + fun updateAnimPoint(options: Point.Options, mapTag:String = DEFAULT) } \ No newline at end of file diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/AMapWrapper.kt b/libraries/mogo-map/src/main/java/com/mogo/map/AMapWrapper.kt index 5e676954e6..dc6ec64f11 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/AMapWrapper.kt +++ b/libraries/mogo-map/src/main/java/com/mogo/map/AMapWrapper.kt @@ -11,8 +11,10 @@ import com.mogo.map.overlay.wrapper.line.AMapPolylineWrapper import com.mogo.map.overlay.wrapper.point.AMapPointWrapper import com.mogo.map.uicontroller.IMogoMapUIController import com.mogo.map.utils.ObjectUtils +import com.zhidaoauto.map.data.point.LonLatPoint import com.zhidaoauto.map.sdk.open.renders.marker.BatchMarkerOptions import com.zhidaoauto.map.sdk.open.renders.marker.Marker +import com.zhidaoauto.map.sdk.open.renders.marker.MarkerOptions import com.zhidaoauto.map.sdk.open.renders.marker.MarkerSimpleData import com.zhidaoauto.map.sdk.open.renders.marker.OnMarkClickListener import com.zhidaoauto.map.sdk.open.view.MapAutoView @@ -66,6 +68,20 @@ class AMapWrapper(map: MapAutoViewHelper?, mapView: MapAutoView, controller: IMo return AMapPointWrapper(options.id, delegate, mMapView) } + override fun addAnimPoint(options: Point.Options) { + if (!checkAMap()) { + return + } + val markerOptions = MarkerOptions(options.id, mMapView.getMapController()).setGps(true) + .position(LonLatPoint(options.longitude, options.latitude, options.rotate.toDouble())) + val marker = Marker(markerOptions,mMapView.getMapController(), + mMapView.getMapController()?.getMarkerCall() + ) + marker.setDisplayAnimEnable(true) + marker.setAnimResource(options.animRes) + marker.setAnimScale(options.animScale) + } + override fun addLine(options: Polyline.Options): IMapPolylineOverlay? { if (!checkAMap()) { return null diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/overlay/MoGoOverlayManagerImpl.kt b/libraries/mogo-map/src/main/java/com/mogo/map/overlay/MoGoOverlayManagerImpl.kt index 21fb97b044..9ec324879b 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/overlay/MoGoOverlayManagerImpl.kt +++ b/libraries/mogo-map/src/main/java/com/mogo/map/overlay/MoGoOverlayManagerImpl.kt @@ -5,6 +5,7 @@ import android.view.View import com.mogo.eagle.core.data.map.* import com.mogo.eagle.core.function.call.autopilot.* import com.mogo.eagle.core.utilcode.util.* +import com.mogo.map.MogoMap import com.mogo.map.overlay.point.Point.Options import com.mogo.map.MogoMap.Companion.mapInstance import com.mogo.map.overlay.core.* @@ -49,13 +50,15 @@ internal class MoGoOverlayManagerImpl: IMoGoOverlayManager { key.delegate = point it.setToTop() if (options.moveToCenter) { + val wgs84 = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() + val cj02 = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02() moveToCenter( mapTag, options.id, options.longitude, options.latitude, - if (options.isGps) CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude else CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().longitude, - if (options.isGps) CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude else CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().latitude + if (options.isGps) wgs84.longitude else cj02.longitude, + if (options.isGps) wgs84.latitude else cj02.latitude ) } } @@ -452,4 +455,8 @@ internal class MoGoOverlayManagerImpl: IMoGoOverlayManager { it.value.setVisible(false) } } + + override fun updateAnimPoint(options: Options, mapTag:String) { + mapInstance.getMogoMap(mapTag)?.addAnimPoint(options) + } } \ No newline at end of file diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java b/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java index 3165ab8761..192a598c6d 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java @@ -3,7 +3,6 @@ package com.mogo.map.utils; import android.graphics.Bitmap; import android.graphics.Color; import android.text.TextUtils; -import android.util.Log; import android.view.View; import com.mogo.eagle.core.data.config.FunctionBuildConfig; @@ -65,9 +64,6 @@ public class ObjectUtils { .controlAngle(opt.isControlAngle()) .rotateAngle(opt.getRotate()) .setFlat(opt.isFlat()) -// .setAnimResource() -// .setDisplayAnimEnable() -// .setAnimScale() .visible(opt.isVisible()) .infoWindowEnable(opt.isInfoWindowEnable()) .scale(opt.getScale()) From ddfea7271005d25ce3a4eecee5f91b940b680c16 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Fri, 5 Jul 2024 20:08:49 +0800 Subject: [PATCH 4/9] =?UTF-8?q?[6.5.0]=E4=BF=AE=E6=94=B9=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=8E=A2=E6=9F=A5=E5=B1=95=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hmi/ui/msgbox/DriverMsgBoxBubbleView.kt | 1 + .../exploration/AutomaticExplorationView.kt | 48 +++++++++++++++++-- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt index 959553636e..65f8f87276 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt @@ -91,6 +91,7 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor( MsgCategory.RECORD_BAG -> { MsgBoxConfig.recordBagList.add(msgBoxBean) } + else -> {} } if(isShowData){ if(category == MsgCategory.RECORD_BAG){ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt index 6ef0dce532..fcd97a99d2 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/exploration/AutomaticExplorationView.kt @@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.ui.notice.exploration import android.animation.ObjectAnimator import android.animation.ValueAnimator import android.content.Context +import android.os.CountDownTimer import android.util.AttributeSet import android.view.LayoutInflater import android.view.View @@ -13,9 +14,13 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.mogo.commons.voice.AIAssist import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo +import com.mogo.eagle.core.data.msgbox.MsgBoxBean +import com.mogo.eagle.core.data.msgbox.MsgBoxType +import com.mogo.eagle.core.data.msgbox.MsgCategory import com.mogo.eagle.core.data.notice.AutoExplorationEntity +import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener +import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager import com.mogo.eagle.core.function.hmi.R -import com.mogo.eagle.core.utilcode.util.CountDownTimer import com.mogo.eagle.core.utilcode.util.ThreadUtils @@ -27,7 +32,7 @@ class AutomaticExplorationView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr) { +) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener { private var user = 0 private var ivClose: ImageView ?= null //关闭按钮 @@ -35,10 +40,12 @@ class AutomaticExplorationView @JvmOverloads constructor( private var rvExplorationList: RecyclerView ?= null private var automaticExplorationAdapter: AutomaticExplorationAdapter ?= null private var rotationAnim: ObjectAnimator ?= null + private var showViewTimer: CountDownTimer ?= null //展示自动探查倒计时 companion object { private const val TAG = "AutomaticExplorationView" - private const val EXPLORATION_SHOW_TIME = 5000L //探查完毕后,5秒关闭弹窗 + private const val EXPLORATION_HIDE_TIME = 5000L //探查完毕后,5秒关闭弹窗 + private const val EXPLORATION_SHOW_TIME = 300000L //距离用户在触发上一次事件播报的时间5分钟后,自动触发常规道路情况检测 } init { @@ -55,6 +62,7 @@ class AutomaticExplorationView @JvmOverloads constructor( LayoutInflater.from(context).inflate(R.layout.view_automatic_exploration_p, this, true) } initEvent() + CallerMsgBoxListenerManager.addListener(TAG,this) } private fun showAutoExploration(){ @@ -78,6 +86,22 @@ class AutomaticExplorationView @JvmOverloads constructor( automaticExplorationAdapter = AutomaticExplorationAdapter(context,user) rvExplorationList?.adapter = automaticExplorationAdapter rvExplorationList?.layoutManager = linearLayoutManager + startShowTimer() + } + + private fun startShowTimer(){ + ThreadUtils.runOnUiThread { + showViewTimer = object: CountDownTimer(EXPLORATION_SHOW_TIME,EXPLORATION_SHOW_TIME){ + override fun onTick(millisUntilFinished: Long) { + + } + + override fun onFinish() { + showAutoExploration() + } + } + showViewTimer?.start() + } } private fun initData() { @@ -104,7 +128,7 @@ class AutomaticExplorationView @JvmOverloads constructor( //语音播放 AIAssist.getInstance(context).speakTTSVoice("道路畅通一切正常蘑菇行车助手将持续守候您的出行") //5秒后关闭弹窗 - val hideViewTimer =object: CountDownTimer(EXPLORATION_SHOW_TIME,EXPLORATION_SHOW_TIME){ + val hideViewTimer =object: CountDownTimer(EXPLORATION_HIDE_TIME,EXPLORATION_HIDE_TIME){ override fun onTick(millisUntilFinished: Long) { } @@ -114,6 +138,8 @@ class AutomaticExplorationView @JvmOverloads constructor( ThreadUtils.runOnUiThread { this@AutomaticExplorationView.visibility = View.GONE } + //重新开始下一轮展示倒计时 + startShowTimer() } } hideViewTimer.start() @@ -146,6 +172,20 @@ class AutomaticExplorationView @JvmOverloads constructor( override fun onDetachedFromWindow() { super.onDetachedFromWindow() + CallerMsgBoxListenerManager.removeListener(TAG) + } + + /** + * 距离用户在触发上一次事件播报的时间5分钟后,自动触发常规道路情况检测 + */ + override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) { + if(category == MsgCategory.NOTICE){ + if(msgBoxList.type == MsgBoxType.V2X){ + //重置倒计时时长 + showViewTimer?.cancel() + startShowTimer() + } + } } } \ No newline at end of file From ed00694ffefde24b89d1cab3fc460d11bb891819 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Sun, 7 Jul 2024 13:28:41 +0800 Subject: [PATCH 5/9] =?UTF-8?q?[6.5.0]=E5=A2=9E=E5=8A=A0=E7=BA=A2=E7=BB=BF?= =?UTF-8?q?=E7=81=AF=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/res/layout/taxi_base_fragment.xml | 12 +++++++++++ .../main/res/layout/taxi_p_base_fragment.xml | 20 +++++++++++++++---- .../layout/unmanned_taxi_base_fragment.xml | 12 +++++++++++ .../res/layout/taxt_u_p_base_fragment.xml | 20 ++++++++++++++++--- 4 files changed, 57 insertions(+), 7 deletions(-) diff --git a/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml b/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml index f41ff6699a..37dd353921 100644 --- a/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml +++ b/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml @@ -161,6 +161,18 @@ android:visibility="gone" /> + + + + + + + + + + + + + Date: Sun, 7 Jul 2024 13:41:17 +0800 Subject: [PATCH 6/9] =?UTF-8?q?[6.5.0]Taxi=E5=8F=B8=E4=B9=98=E7=AB=AF?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E7=9B=92=E5=AD=90=E5=8E=BB=E6=8E=89=E6=B0=94?= =?UTF-8?q?=E6=B3=A1=E6=80=81V2X=E6=B6=88=E6=81=AF=E7=9B=92=E5=AD=90?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt | 4 ++++ .../core/function/hmi/ui/msgbox/PassengerMsgBoxBubbleView.kt | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt index 65f8f87276..b601e39bc2 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt @@ -160,6 +160,10 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor( isShowSummary = false } }else{ + if(msgBoxBean.type == MsgBoxType.V2X){ + //鹰眼650需求,不再展示气泡态V2X消息 + return@post + } showData(msgBoxBean) CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true) } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxBubbleView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxBubbleView.kt index 2183bb7ebc..45ecdb4cb4 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxBubbleView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxBubbleView.kt @@ -70,8 +70,7 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor( override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) { UiThreadHandler.post({ if(category == MsgCategory.NOTICE){ - if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X - || msgBoxList.type == MsgBoxType.OBU){ + if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.OBU){ if(isCacheMsg){ //将消息缓存到未播放列表等待小智语音播放完成后取出播放 MsgBoxConfig.unPlayList.add(msgBoxList) From 50e53a4269f0db7e853c9d88054162492dd9832c Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Sun, 7 Jul 2024 14:05:17 +0800 Subject: [PATCH 7/9] =?UTF-8?q?[6.5.0]=E8=B5=B7=E6=AD=A5=E6=8F=90=E9=86=92?= =?UTF-8?q?/=E6=8F=90=E5=89=8D=E5=87=8F=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacenter/v2x/TrafficLightDispatcher.kt | 22 ++++++++++++++++++- .../hmi/ui/widget/FusionTrafficLightView.kt | 3 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt index e33751bd52..f93fdb1125 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt @@ -4,6 +4,7 @@ import android.content.Context import android.os.CountDownTimer import android.os.Handler import android.util.Log +import com.mogo.commons.voice.AIAssist import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightStatus import com.mogo.eagle.core.data.biz.trafficlight.currentRoadTrafficLight @@ -172,6 +173,26 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight onTrafficLightPrompt(convert(light.state),light.duration,convert(light.nextState),light.nextDuration, convert(light.nextTwoState),light.nextTwoDuration) } + /** + * 司机端提示: + * 车辆等红灯,在红/黄灯剩余5s且下一灯态为绿灯时,提示“红灯即将变绿”;并在变为绿灯时有提示起步的动效 + * 车辆行驶中,若判断当前绿灯自车无法通过,在绿灯剩余5s且下一灯态为红/黄灯时,提示“蘑菇提醒您及时减速,避免路口急刹” + * 车辆行驶中,若判断当前绿灯自车基于当前速度需提速10%以上才可通过时,提示“蘑菇提醒您及时减速,避免路口急刹” + * 车辆行驶中,若判断当前红灯自车基于当前速度需降低60%以上才可通过时,提示“蘑菇提醒您及时减速,避免路口急刹” + */ + if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){ + if((light.state == FusionTrafficLightOuterClass.FusionLightState.STATE_YELLOW_FUSION || light.state ==FusionTrafficLightOuterClass.FusionLightState.STATE_RED_FUSION) + && light.duration < 5 && light.nextState == FusionTrafficLightOuterClass.FusionLightState.STATE_GREEN_FUSION){ + //语音播放 + AIAssist.getInstance(mContext).speakTTSVoice("红灯即将变绿") + } + //TODO 需要知道当前车速和当前位置距离路口的距离 +// if(light.state == FusionTrafficLightOuterClass.FusionLightState.STATE_GREEN_FUSION && light.duration < 5){ +// +// } + } + + } } } @@ -280,7 +301,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight if (filterTelematicUnion(sourceType)) { return } - Log.i("xuxinchao","hide msg="+msg+" sourceType="+sourceType) CallerTrafficLightListenerManager.disableTrafficLight() } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/FusionTrafficLightView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/FusionTrafficLightView.kt index 77a32e388a..f907296d4a 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/FusionTrafficLightView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/FusionTrafficLightView.kt @@ -7,6 +7,7 @@ import android.view.View import android.widget.ImageView import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.ContextCompat +import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo import com.mogo.eagle.core.data.enums.DataSourceType import com.mogo.eagle.core.data.enums.TrafficLightEnum import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener @@ -101,6 +102,8 @@ class FusionTrafficLightView @JvmOverloads constructor( //如果当前红绿灯视图为隐藏状态则设置为显示状态 if(this@FusionTrafficLightView.visibility == View.GONE){ this@FusionTrafficLightView.visibility = View.VISIBLE + AutopilotSummaryInfo.intersectionServicesNum++ + AutopilotSummaryInfo.lightServicesNum++ //首次展示,需要将当前、下一、下二灯态的时间占比绘制出来,只绘制一次 val proportionList = ArrayList(3) proportionList.add(0) From 45e41e7c826729aa9d21a5565ffdb43884a5a468 Mon Sep 17 00:00:00 2001 From: aibingbing Date: Sun, 7 Jul 2024 14:07:36 +0800 Subject: [PATCH 8/9] =?UTF-8?q?[6.5.0]=20feat:=20=E5=A2=9E=E5=8A=A0=20?= =?UTF-8?q?=E4=BB=96=E8=BD=A6=E9=80=86=E8=A1=8C=20marker=20=E7=BB=98?= =?UTF-8?q?=E5=88=B6=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt | 105 +++++++++--------- .../eagle/core/data/enums/EventTypeEnumNew.kt | 1 + 2 files changed, 54 insertions(+), 52 deletions(-) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index aa247339e8..6bd576c0ab 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -327,45 +327,49 @@ internal object V2NIdentifyDrawer: IEventDismissListener { V2XBizTrace.onAck(TAG, mapOf("other_retrograde_vehicle" to "event == null"), true) return@Callback true } - val eventLocation = when (event.gnssType) { - 0 -> CoordinateTransform.GCJ02ToWGS84(event.longitude, event.latitude) - else -> arrayOf(event.longitude, event.latitude) - } - val carLocation = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() - val distance = CoordinateUtils.calculateLineDistance(carLocation.longitude, carLocation.latitude, eventLocation[0], eventLocation[1]) - if (distance > 150) { - Logger.i(TAG, "other_retrograde_vehicle --> distance > 150") - V2XBizTrace.onAck(TAG, mapOf("other_retrograde_vehicle" to "distance > 150"), true) - return@Callback true - } - val isDriver = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) - val newEventId = "other_retrograde_vehicle_${event.eventId}_${event.timestamp}_${event.longitude}_${event.latitude}" - val cameraIp = if(TextUtils.isEmpty(event.exts)) "" - else (GsonUtils.fromJson(event.exts, Map::class.java)["cameraIp"])?:"" - // 弹事件框 - CallerRoadV2NEventWindowListenerManager.showLiveVideo( - newEventId, - event.timestamp, - EventTypeEnumNew.getUpdateIconRes(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), - String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt()), - isDriver, - cameraIp.toString(), - event.longitude, - event.latitude) - // 高精地图绘制-添加 - //TODO - EventDismissManager.addEvent( - TAG, - EventDismissBean( + AiRoadMarker.aiMakers.getOrPut(event.eventId) { + AiRoadMarker() + }.apply { + val eventLocation = when (event.gnssType) { + 0 -> CoordinateTransform.GCJ02ToWGS84(event.longitude, event.latitude) + else -> arrayOf(event.longitude, event.latitude) + } + val carLocation = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() + val distance = CoordinateUtils.calculateLineDistance(carLocation.longitude, carLocation.latitude, eventLocation[0], eventLocation[1]) + if (distance > 150) { + Logger.i(TAG, "other_retrograde_vehicle --> distance > 150") + V2XBizTrace.onAck(TAG, mapOf("other_retrograde_vehicle" to "distance > 150"), true) + return@Callback true + } + val isDriver = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) + val newEventId = "other_retrograde_vehicle_${event.eventId}_${event.timestamp}_${event.longitude}_${event.latitude}" + val cameraIp = if(TextUtils.isEmpty(event.exts)) "" + else (GsonUtils.fromJson(event.exts, Map::class.java)["cameraIp"])?:"" + // 弹事件框 + CallerRoadV2NEventWindowListenerManager.showLiveVideo( newEventId, + event.timestamp, + EventTypeEnumNew.getUpdateIconRes(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), + String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt()), + isDriver, + cameraIp.toString(), event.longitude, - event.latitude, - 150, - 20, - -1, - event.targetIdsList.joinToString(separator = ",") - ) - ) + event.latitude) + }.also { + it.marker(Marker(event.eventId, EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType, event.longitude, event.latitude, 0.0), drawMarker = true, false, isHighFrequency = true) + } +// EventDismissManager.addEvent( +// TAG, +// EventDismissBean( +// newEventId, +// event.longitude, +// event.latitude, +// 150, +// 20, +// -1, +// event.targetIdsList.joinToString(separator = ",") +// ) +// ) } else if (msg.what == MSG_WHAT_DRAW_GREEN_WAVE) { val data = msg.obj as? V2nCrossSpeed ?: return@Callback true val destX = data.lng @@ -601,11 +605,10 @@ internal object V2NIdentifyDrawer: IEventDismissListener { private fun drawOtherRetrogradeVehicle(event: MessagePad.Event) { Logger.i("V2NIdentifyDrawer", "---drawOtherRetrogradeVehicle --- :${event.toString()}, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]") -// if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { -// -// } - handler.removeMessages(MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE) - handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE, event)) + if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { + handler.removeMessages(MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE) + handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE, event)) + } } private fun drawGreenWave(crossSpeed: V2nCrossSpeed) { @@ -664,19 +667,17 @@ internal object V2NIdentifyDrawer: IEventDismissListener { override fun onEventDismissByDistance(event: EventDismissBean) { Logger.i(TAG, "onEventDismissByDistance --> ${event.toString()}") - if (event.eventId.startsWith("other_retrograde_vehicle")) { - V2XBizTrace.onAck(TAG, mapOf("other_retrograde_vehicle" to "onEventDismissByDistance"), true) - val targetIds = event.exts.split(",") - //TODO 高精地图绘制 移除 - } +// if (event.eventId.startsWith("other_retrograde_vehicle")) { +// V2XBizTrace.onAck(TAG, mapOf("other_retrograde_vehicle" to "onEventDismissByDistance"), true) +// val targetIds = event.exts.split(",") +// } } override fun onEventDismissByExpired(event: EventDismissBean) { Logger.i(TAG, "onEventDismissByExpired --> ${event.toString()}") - if (event.eventId.startsWith("other_retrograde_vehicle")) { - V2XBizTrace.onAck(TAG, mapOf("other_retrograde_vehicle" to "onEventDismissByExpired"), true) - val targetIds = event.exts.split(",") - //TODO 高精地图绘制 移除 - } +// if (event.eventId.startsWith("other_retrograde_vehicle")) { +// V2XBizTrace.onAck(TAG, mapOf("other_retrograde_vehicle" to "onEventDismissByExpired"), true) +// val targetIds = event.exts.split(",") +// } } } \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt index d4505fc70c..89366b3d52 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt @@ -830,6 +830,7 @@ enum class EventTypeEnumNew( } TYPE_SOCKET_ROAD_CONGESTION.poiType -> R.raw.v2x_yongdu TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType -> if (FunctionBuildConfig.skinMode != 0) TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DIconId else TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DNightIconId + TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType -> if (FunctionBuildConfig.skinMode != 0) TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE.traffic3DIconId else TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE.traffic3DNightIconId else -> 0 } } From 6baa15dbf9d189a42a5ed149720bd07831f31465 Mon Sep 17 00:00:00 2001 From: aibingbing Date: Sun, 7 Jul 2024 14:12:24 +0800 Subject: [PATCH 9/9] =?UTF-8?q?[6.5.0]=20feat:=20mogo=20taxi=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=8B=E4=BB=B6=E5=BC=B9=E6=A1=86layout;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../driver/src/main/res/layout/taxi_base_fragment.xml | 10 ++++++++++ .../src/main/res/layout/taxi_p_base_fragment.xml | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml b/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml index 37dd353921..2f12e04013 100644 --- a/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml +++ b/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml @@ -408,6 +408,16 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> + + diff --git a/OCH/taxi/passenger/src/main/res/layout/taxi_p_base_fragment.xml b/OCH/taxi/passenger/src/main/res/layout/taxi_p_base_fragment.xml index 801eecb16e..1d50f5d29b 100644 --- a/OCH/taxi/passenger/src/main/res/layout/taxi_p_base_fragment.xml +++ b/OCH/taxi/passenger/src/main/res/layout/taxi_p_base_fragment.xml @@ -246,6 +246,15 @@ app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> + +