From 70f2cdc19bf804dd60cebace2892545c64624f72 Mon Sep 17 00:00:00 2001 From: EmArrow Date: Wed, 10 Jul 2024 19:25:41 +0800 Subject: [PATCH] =?UTF-8?q?[6.5.0]=20=E4=BF=AE=E5=A4=8D=E9=81=AE=E7=9B=96?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE=E5=A4=8D=E8=B7=AF=E5=8F=A3?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E6=8F=90=E5=89=8D=E5=88=A0=E9=99=A4marker?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/taxi_base_fragment.xml | 1 + .../main/res/layout/taxi_p_base_fragment.xml | 12 +++++++----- .../function/hmi/ui/camera/RoadCrossLiveView.kt | 1 + .../identify/TrackerSourceFilterHelper.kt | 9 +++++---- .../roadcross/RoadCrossCameraManager.kt | 17 ++++++++++++----- .../eagle/core/function/view/MapRoamView.kt | 17 ++++++++++++++--- .../core/function/view/RoadCrossRoamView.kt | 1 + 7 files changed, 41 insertions(+), 17 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 8e24c97dbc..44e48b71d2 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 @@ -148,6 +148,7 @@ app:layout_constraintTop_toBottomOf="@+id/viewLimitingVelocity" app:layout_goneMarginEnd="40dp" app:layout_goneMarginTop="@dimen/dp_236" /> + @@ -227,9 +228,10 @@ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/camera/RoadCrossLiveView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/camera/RoadCrossLiveView.kt index 2f243c9c7e..731f2ff03d 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/camera/RoadCrossLiveView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/camera/RoadCrossLiveView.kt @@ -134,6 +134,7 @@ class RoadCrossLiveView @JvmOverloads constructor( CallerLogger.w("$M_HMI$TAG", "播放视频异常,当前播放设备与上次相同,ip:${info.ip}") return } + bringToFront() curLiveDevice = info.ip ThreadUtils.runOnUiThread { HmiActionLog.hmiAction("触发marker点击,播放路侧视频流", info.toString()) 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 7ba546d385..1e13483d46 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 @@ -17,6 +17,7 @@ import mogo.telematics.pad.MessagePad.TrackedSource object TrackerSourceFilterHelper { private const val TAG = "TrackerSourceColor" + private const val ZOMBIE_TAG = "zombie" private val cacheZombieMap = mutableMapOf() @SuppressLint("NewApi") @@ -139,13 +140,13 @@ object TrackerSourceFilterHelper { TrafficTypeEnum.TYPE_TRAFFIC_ID_TRUCK.type -> 0.19f else -> 0.2f } - val opt = Point.Options.Builder(TAG, Level.DEFAULT) - .setId("9999" + data.uuid.toString()) + val opt = Point.Options.Builder(TAG, Level.MAP_MARKER) + .setId("$ZOMBIE_TAG${data.uuid}") .latitude(data.latitude) .longitude(data.longitude) .isUseGps(true) .rotate(data.heading.toFloat()) - .icon3DRes(R.raw.yujingguangquan) + .icon3DRes(R.raw.testguangquan) .scale(scale) .set3DMode(true) .build() @@ -154,7 +155,7 @@ object TrackerSourceFilterHelper { } fun removeBottomMarker(id: String){ - CallerMapUIServiceManager.getOverlayManager()?.removePoint("9999$id") + CallerMapUIServiceManager.getOverlayManager()?.removePoint("$ZOMBIE_TAG$id") cacheZombieMap.remove(id) } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/roadcross/RoadCrossCameraManager.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/roadcross/RoadCrossCameraManager.kt index de6594c0b7..066ab1357c 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/roadcross/RoadCrossCameraManager.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/roadcross/RoadCrossCameraManager.kt @@ -70,6 +70,12 @@ class RoadCrossCameraManager : IMoGoMapRoadListener { "$M_MAP$TAG", "触发接口调用 dis: $distance , roadCrossEnd: ${roadCrossEnd ?: "null"} " ) + if(roadCrossEnd == null){ + roadCrossTrace( + TAG, mapOf("errorMsg" to "触发接口调用,roadCrossEnd获取为null",) + ) + } + if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){ AIAssist.getInstance(mContext).speakTTSVoice("蘑菇检测到前方${distance.toInt()}米您将通过路口,已为您切换展示路口全息影像") } @@ -155,15 +161,16 @@ class RoadCrossCameraManager : IMoGoMapRoadListener { override fun onRoadChange(cross: Boolean, roadCross: RoadCross?) { super.onRoadChange(cross, roadCross) // 出路口 + if(!isCameraRequest){ + CallerLogger.d("$M_MAP$TAG", "未触发路口获取marker") + return + } if (!cross) { // 停止请求摄像头数据 ndeRoadCameraNetWorkModel.cancelRequest("roadCross") // 清除marker CallerLogger.d("$M_MAP$TAG", "remove marker") - if(handler.hasMessages(REQUEST_CAMERA_MSG)){ - handler.removeMessages(REQUEST_CAMERA_MSG) - handler.sendEmptyMessageDelayed(REQUEST_CAMERA_MSG, REMOVE_MARKER_DELAY_TIME) - } + handler.sendEmptyMessageDelayed(REQUEST_CAMERA_MSG, REMOVE_MARKER_DELAY_TIME) // 释放控制 isCameraRequest = false CallerLogger.d("$M_MAP$TAG", "经过路口,释放控制") @@ -191,6 +198,6 @@ class RoadCrossCameraManager : IMoGoMapRoadListener { paramIndexes = [0] ) private fun roadCrossTrace(tag: String, paramMap: Any) { - + CallerLogger.d("$M_MAP$tag", "$paramMap") } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapRoamView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapRoamView.kt index 99aa69f1fa..3245e3375e 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapRoamView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapRoamView.kt @@ -4,6 +4,7 @@ import android.annotation.SuppressLint import android.content.Context import android.util.AttributeSet import androidx.lifecycle.LifecycleObserver +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener import com.mogo.eagle.core.function.api.map.roma.IMoGoAiCloudIdentifyDataListener @@ -12,6 +13,7 @@ import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.map.CallerMapAiCloudDataManager import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP import com.mogo.eagle.core.utilcode.util.CoordinateUtils @@ -62,7 +64,13 @@ class MapRoamView(context: Context?, attrs: AttributeSet?) : MogoMapView(context @SuppressLint("ObsoleteSdkInt") override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { super.onSizeChanged(w, h, oldw, oldh) - this.outlineProvider = TextureVideoViewOutlineProvider(12f) + var size = 12f + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + size = 16f + } else if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { + size = 12f + } + this.outlineProvider = TextureVideoViewOutlineProvider(size) this.clipToOutline = true } @@ -84,13 +92,16 @@ class MapRoamView(context: Context?, attrs: AttributeSet?) : MogoMapView(context val dis = CoordinateUtils.calculateLineDistance(curLat, curLng, latLng.first, latLng.second) // 开始漫游 - trace(TAG, mapOf("startRoadRoam" to Pair("latLng" to latLng, "dis" to dis), "dis" to dis)) + trace( + TAG, + mapOf("startRoadRoam" to Pair("latLng" to latLng, "dis" to dis), "dis" to dis) + ) aiCloudIdentifyDataManager.trigger(true, 1, 300, latLng.first, latLng.second) } } override fun response(requestStatus: Boolean, errorMsg: String?) { - trace(TAG, mapOf("response" to requestStatus, "errorMsg" to (errorMsg?:""))) + trace(TAG, mapOf("response" to requestStatus, "errorMsg" to (errorMsg ?: ""))) } override fun onAiIdentifyData(obj: SocketDownData.SocketDownDataProto?) { diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt index 5d35ff9191..20dd985f2d 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt @@ -134,6 +134,7 @@ class RoadCrossRoamView @JvmOverloads constructor( } return } + bringToFront() CallerMapIdentifyManager.roam = Pair(TAG, true) this.visibility = View.VISIBLE ivZhiRoadRoamView.visibility = View.VISIBLE