From f822e76e70b0bf8351df5016885f79a5dcdab393 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Mon, 25 Sep 2023 18:30:41 +0800 Subject: [PATCH 1/7] =?UTF-8?q?[6.1.0]=E4=BF=AE=E5=A4=8D=E7=82=B9=E4=BA=91?= =?UTF-8?q?=E3=80=81=E8=87=AA=E8=BD=A6=E5=85=89=E5=9C=88=E8=81=94=E5=8A=A8?= =?UTF-8?q?Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt index 2a0c4259bc..e08857ad0c 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt @@ -384,7 +384,11 @@ internal class SOPSettingView @JvmOverloads constructor( //自车光圈 if(FunctionBuildConfig.isDrawPointCloudData){ //如果点云效果是打开的,则自车光圈也跟随打开 + FunctionBuildConfig.isDisplayAnimEnable = true scCarAperture.isChecked = true + CallerMapUIServiceManager.getMapUIController()?.setDisplayAnimEnable(true) + hmiAction("SOP 是否展示自车光圈,",FunctionBuildConfig.isDisplayAnimEnable) + Log.i(TAG,"SOP 是否展示自车光圈,${FunctionBuildConfig.isDisplayAnimEnable}") }else{ scCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable } From 069231f5cd89e62c393c3a1fcad02534675ea8ea Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Mon, 25 Sep 2023 19:48:21 +0800 Subject: [PATCH 2/7] =?UTF-8?q?[6.1.0]=20=E8=AE=BE=E7=BD=AE=E8=BD=A8?= =?UTF-8?q?=E8=BF=B9=E8=AE=A1=E7=AE=97=E7=AB=99=E7=82=B9=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt index 1f1ad22ba6..801aa96ed5 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt @@ -580,7 +580,6 @@ object TaxiTaskModel { } if (isArriveAtEndSite) { - updateLocalCalculateStation() //取消自驾,D档位会溜车 map3.6.0 修改 cancelAutopilot() } @@ -797,9 +796,9 @@ object TaxiTaskModel { } fun updateLocalCalculateStation() { - if (mCurrentTaskWithOrder == null) return - if (mCurrentTaskWithOrder!!.startSite != null && mCurrentTaskWithOrder!!.endSite != null - && mCurrentTaskWithOrder!!.currentStatus == TaskStatusEnum.StartTask.code + if (mCurrentTaskWithOrder != null && + mCurrentTaskWithOrder?.startSite != null && mCurrentTaskWithOrder?.endSite != null + && mCurrentTaskWithOrder?.currentStatus == TaskStatusEnum.StartTask.code ) { d(TAG, "updateLocalCalculateStation start") val curTaskAndOrder = getCurrentTaskWithOrder() ?: return From 473adbaa278cc441bf777f0f9763de2a64ad3725 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Mon, 25 Sep 2023 19:52:29 +0800 Subject: [PATCH 3/7] =?UTF-8?q?[6.1.0]=20=E8=AE=BE=E7=BD=AE=E8=BD=A8?= =?UTF-8?q?=E8=BF=B9=E8=AE=A1=E7=AE=97=E7=AB=99=E7=82=B9=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt index 801aa96ed5..753b29ef78 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt @@ -697,6 +697,8 @@ object TaxiTaskModel { mCurrentTaskWithOrder = result + updateLocalCalculateStation() + // 任务为空 if (result?.endSite == null && result?.order == null) { d(TAG, "queryCurrentTaskOnce: 任务为空") @@ -723,8 +725,6 @@ object TaxiTaskModel { } } - updateLocalCalculateStation() - //达到终点后查询全程里程和用时 if (QueryCurrentTaskRespBean.isOrderArriveAtEnd(result)) { d(TAG, "queryCurrentTaskOnce ArriveAtEnd") From b8be78442018d96fc95504c26a0aaced47438cd8 Mon Sep 17 00:00:00 2001 From: jiaguofeng Date: Tue, 26 Sep 2023 10:25:42 +0800 Subject: [PATCH 4/7] =?UTF-8?q?[map-sdk]=E4=BF=AE=E6=94=B9=E9=94=9A?= =?UTF-8?q?=E7=82=B9=E5=88=87=E6=8D=A2=E8=B5=84=E6=BA=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/sdk/open/location/MyLocationStyle.kt | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/location/MyLocationStyle.kt b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/location/MyLocationStyle.kt index c7bf674f14..c0acb1a24b 100644 --- a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/location/MyLocationStyle.kt +++ b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/location/MyLocationStyle.kt @@ -125,20 +125,20 @@ class MyLocationStyle( } @Synchronized - private fun drawCar(bitmap: Bitmap) { + private fun drawCar(bitmap: Bitmap): Boolean { if (CompileConfig.DEBUG) { Log.i(TAG, "markerop---selfop--drawCar:start") } if (mMarker != null) { mMarker?.setIcon(bitmap) - return + return true } if ((mMapController?.isSurfaceCreated()) == true) { if (executeFlag.get()) { - return + return false } if (mMarker != null) { - return + return false } executeFlag.set(true) val lon = mLonLat.lon @@ -154,16 +154,19 @@ class MyLocationStyle( if (CompileConfig.DEBUG) { Log.i(TAG, "autoop--selfop--markerop--drawCar:${mMarker?.getId()}") } + return true } catch (e: Exception) { mMarker = null + return false } finally { executeFlag.set(false) } } + return false } - private fun draw3DCar(resId: Int) { + private fun draw3DCar(resId: Int): Boolean{ if (CompileConfig.DEBUG) { Log.i( TAG, @@ -196,17 +199,17 @@ class MyLocationStyle( } carId = resId - return + return true } if ((mMapController?.isSurfaceCreated()) ?: false) { if (CompileConfig.DEBUG) { Log.i(TAG, "markerop---selfop--draw3DCar:start:mapView SurfaceCreated") } if (executeFlag.get()) { - return + return false } if (mMarker != null) { - return + return false } executeFlag.set(true) val lon = mLonLat.lon @@ -238,15 +241,18 @@ class MyLocationStyle( "autoop--selfop--markerop--draw3DCar:${mMarker?.getId()},${resId},${options.getMarkerIconName()}" ) } + return true } catch (e: Exception) { if (CompileConfig.DEBUG) { Log.e(TAG, "autoop--selfop--markerop--draw3DCar:${mMarker?.getId()}", e) } mMarker = null + return false } finally { executeFlag.set(false) } } + return false } fun setLonLat(lonLat: LonLat, angle: Double) { @@ -339,7 +345,7 @@ class MyLocationStyle( mMarker?.setScale(scale) } - fun myLocationIcon(carResId: Int, is3D: Boolean): MyLocationStyle { + fun myLocationIcon(carResId: Int, is3D: Boolean): Boolean { mMapController?.getClerk()?.add("$is3D,$carResId") if (CompileConfig.DEBUG) { Log.i( @@ -352,22 +358,23 @@ class MyLocationStyle( this.is3D = is3D if (is3D) { this.car3DResId = carResId - draw3DCar(carResId) + return draw3DCar(carResId) } else { this.carResId = carResId val bitmap = BitmapFactory.decodeResource(mContext?.resources, carResId) + carId = carResId bitmap?.let { if (this.myLocationIcon != null) { this.myLocationIcon?.recycle() this.myLocationIcon = null } - drawCar(it) + return drawCar(it) } - carId = carResId + } } - return this + return false } fun myLocationIcon(carResId: Int): MyLocationStyle { From 79e155f9f033e464eb0ef72865909894fc49c143 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Tue, 26 Sep 2023 11:11:14 +0800 Subject: [PATCH 5/7] [6.1.0] fix bug of cross road --- .../biz/v2x/trafficlight/core/MogoTrafficLightManager.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt index 0132da1f0b..9162f89d09 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt @@ -150,9 +150,6 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener, private fun outOfCrossRange(){ CallerLogger.d(M_V2X + TAG, "离开路口 , inRange:$inRange") - if(!inRange){ - return - } CallerTrafficLightListenerManager.invokeEnterCrossRoad(false) inRange = false trafficLightResult = null From 27513d9856e8aeb96c638effc0a0087556a8d7e3 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Tue, 26 Sep 2023 11:32:04 +0800 Subject: [PATCH 6/7] [6.1.0] [rename] --- .../main/java/com/mogo/och/charter/passenger/ui/MainFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OCH/charter/passenger/src/main/java/com/mogo/och/charter/passenger/ui/MainFragment.kt b/OCH/charter/passenger/src/main/java/com/mogo/och/charter/passenger/ui/MainFragment.kt index 4fd5699571..ba381c4007 100644 --- a/OCH/charter/passenger/src/main/java/com/mogo/och/charter/passenger/ui/MainFragment.kt +++ b/OCH/charter/passenger/src/main/java/com/mogo/och/charter/passenger/ui/MainFragment.kt @@ -198,7 +198,7 @@ class MainFragment : MvpFragment(), IMogo } } - fun setCarModle(rawInfo: Int) { + fun setCarModel(rawInfo: Int) { getMapUIController()?.changeCurrentIcon(rawInfo) HdMapBuildConfig.currentCarVrIconRes = rawInfo } From 5f20ed3c6249cc1a17078aa7871a699f4689316c Mon Sep 17 00:00:00 2001 From: zhongchao Date: Tue, 26 Sep 2023 11:56:33 +0800 Subject: [PATCH 7/7] [6.1.0] map add trace --- .../business/ai/AiCloudIdentifyDataManager.kt | 32 +++++------ .../utils/{MapBizTrace.kt => MapRomaTrace.kt} | 2 +- .../core/data/deva/chain/ChainConstant.kt | 1 + .../main/java/com/mogo/map/AMapViewWrapper.kt | 22 +++++++- .../java/com/mogo/map/utils/MapTraceUtil.kt | 56 +++++++++++++++++++ 5 files changed, 94 insertions(+), 19 deletions(-) rename core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/utils/{MapBizTrace.kt => MapRomaTrace.kt} (98%) create mode 100644 libraries/mogo-map/src/main/java/com/mogo/map/utils/MapTraceUtil.kt diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt index 3c6aecd196..8be8ce69b7 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt @@ -35,8 +35,8 @@ import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListener import com.mogo.eagle.core.function.call.map.CallerMapRomaListener import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.updateLongSightLevel -import com.mogo.eagle.core.function.utils.MapBizTrace -import com.mogo.eagle.core.function.utils.MapBizTrace.Companion.getCurrentCNode +import com.mogo.eagle.core.function.utils.MapRomaTrace +import com.mogo.eagle.core.function.utils.MapRomaTrace.Companion.getCurrentCNode import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.map.uicontroller.VisualAngleMode import com.zhidaoauto.map.data.point.LonLatPoint @@ -74,7 +74,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, private val handler = Handler(Looper.getMainLooper()) { if (it.what == H_ERROR_CLOUD) { if (!aiCloudDataChange.get()) { - MapBizTrace.log( + MapRomaTrace.log( CHAIN_CODE_ROMA_MAP_START, CHAIN_CODE_ROMA_CLOUD_ERROR, TAG, mutableMapOf( "msg" to "云端 $H_DELAY_TIME 秒内无感知数据下发", @@ -83,7 +83,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, ) ) } else { - MapBizTrace.log( + MapRomaTrace.log( CHAIN_CODE_ROMA_MAP_START, CHAIN_CODE_ROMA_CLOUD_PUSH, TAG, mutableMapOf( "msg" to "延迟 $H_DELAY_TIME 秒内获取云端下发感知数据大小", @@ -93,7 +93,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, } } if (it.what == H_ERROR_MAP) { - MapBizTrace.log( + MapRomaTrace.log( CHAIN_CODE_ROMA_MAP_START, CHAIN_CODE_ROMA_MAP_ERROR, TAG, mutableMapOf("msg" to "地图漫游模式启动失败,原因:${it.obj}") ) @@ -148,7 +148,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, // 乘客司机屏屏各自单独控制漫游 if (romaStatus) { // 开启roma,当前非漫游,开启 - MapBizTrace.log( + MapRomaTrace.log( "", CHAIN_CODE_ROMA_CLICK, TAG, @@ -157,7 +157,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, openRoma() } else { // 跟上次关联,需要确认parent进度 - MapBizTrace.log(getCurrentCNode(), CHAIN_CODE_ROMA_CLOSE_CLICK, TAG, "") + MapRomaTrace.log(getCurrentCNode(), CHAIN_CODE_ROMA_CLOSE_CLICK, TAG, "") handler.removeMessages(H_ERROR_CLOUD) closeRoma() } @@ -186,7 +186,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, fun requestRangeOfIdentify(dataReceive: Boolean) { val gnss = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().gnssInfo // false,改变父节点信息 - MapBizTrace.log( + MapRomaTrace.log( if (dataReceive) CHAIN_CODE_ROMA_CLICK else "", CHAIN_CODE_ROMA_REQUEST, TAG, mutableMapOf( "dataReceive" to dataReceive, @@ -203,7 +203,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, gnss.latitude, { // false,改变父节点信息 - MapBizTrace.log( + MapRomaTrace.log( if (dataReceive) CHAIN_CODE_ROMA_REQUEST else "", CHAIN_CODE_ROMA_REQUEST_OK, TAG, @@ -218,13 +218,13 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, CallerMapUIServiceManager.getMapUIController()?.setRomaMode(FunctionBuildConfig.romaModeStyle) }else{ // 保底清除策略 - MapBizTrace.log("",CHAIN_CODE_ROMA_REQUEST_DELAY,TAG,mutableMapOf("delay" to true),true) + MapRomaTrace.log("",CHAIN_CODE_ROMA_REQUEST_DELAY,TAG,mutableMapOf("delay" to true),true) MapIdentifySubscriber.instance.clearAiCloudRoma() } }, { errorMsg -> // false,改变父节点信息 - MapBizTrace.log( + MapRomaTrace.log( if (dataReceive) CHAIN_CODE_ROMA_REQUEST else "", CHAIN_CODE_ROMA_REQUEST_ERROR, TAG, @@ -248,7 +248,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, super.mapRomaStatus(status, msg) when (status) { 0 -> { - MapBizTrace.log( + MapRomaTrace.log( CHAIN_CODE_ROMA_REQUEST_OK, CHAIN_CODE_ROMA_MAP_READY_START, TAG, @@ -256,7 +256,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, ) } 4 -> { - MapBizTrace.log( + MapRomaTrace.log( CHAIN_CODE_ROMA_MAP_READY_START, CHAIN_CODE_ROMA_MAP_START, TAG, @@ -280,14 +280,14 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, closeRoma(false) } 2 -> { // 地图自动漫游结束,重置状态,调用close通知服务端 - MapBizTrace.log( + MapRomaTrace.log( CHAIN_CODE_ROMA_MAP_START, CHAIN_CODE_ROMA_MAP_END, TAG, mutableMapOf("romaEnd" to "地图结束回调,状态:$status"), true ) reset() } 3 -> { // 业务释放地图视角锁定,回调切换视角结束漫游 - MapBizTrace.log( + MapRomaTrace.log( CHAIN_CODE_ROMA_CLOSE_CLICK, CHAIN_CODE_ROMA_MAP_CHANGE_END, TAG, mutableMapOf("romaEnd" to "地图结束回调,状态:$status"), true @@ -330,7 +330,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, } private fun updateRomaStyle(auto: Boolean, routeList: ArrayList? = null) { - MapBizTrace.log( + MapRomaTrace.log( "", CHAIN_CODE_ROMA_ROUTE_MODE, TAG, diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/utils/MapBizTrace.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/utils/MapRomaTrace.kt similarity index 98% rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/utils/MapBizTrace.kt rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/utils/MapRomaTrace.kt index 060c44b0e8..d1530b14f6 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/utils/MapBizTrace.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/utils/MapRomaTrace.kt @@ -8,7 +8,7 @@ import com.zhjt.service.chain.ChainLog import com.zhjt.service.chain.ChildNodeAlias import com.zhjt.service.chain.ParentNodeAlias -class MapBizTrace { +class MapRomaTrace { companion object { diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt index afa697169d..e393ead0aa 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt @@ -103,6 +103,7 @@ class ChainConstant { const val CHAIN_CODE_MSG_BOX = "CHAIN_CODE_MSG_BOX" const val CHAIN_CODE_HD_MAP_CALL = "CHAIN_CODE_HD_MAP_CALL" const val CHAIN_CODE_HD_MAP_ROAD_CROSS = "CHAIN_CODE_HD_MAP_ROAD_CROSS" + const val CHAIN_CODE_HD_MAP_ICON_SET = "CHAIN_CODE_HD_MAP_ICON_SET" const val CHAIN_CODE_HMI_ACTIONS = "CHAIN_CODE_HMI_ACTIONS" //operation by user diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt index f064eea7ed..8fc2207970 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt +++ b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt @@ -25,6 +25,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.map.listener.MogoMapListenerHandler.Companion.mogoMapListenerHandler import com.mogo.map.uicontroller.* +import com.mogo.map.utils.MapTraceUtil import com.mogo.map.utils.MogoMapUtils import com.mogo.map.utils.ObjectUtils import com.zhidaoauto.map.data.point.LonLatPoint @@ -50,6 +51,7 @@ import com.zhidaoauto.map.sdk.open.tools.MapTools.getVisibleRegion import com.zhidaoauto.map.sdk.open.tools.MapTools.toScreenLocation import com.zhidaoauto.map.sdk.open.view.MapAutoView import com.zhjt.service.chain.ChainLog +import java.util.concurrent.atomic.AtomicInteger import kotlin.properties.Delegates class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIController, @@ -221,7 +223,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle invokeRoadChange(1, newValue) return@let } - if((newValue!!.cross_id_end.isNotEmpty() && oldValue.cross_id_end != newValue.cross_id_end)){ + if ((newValue!!.cross_id_end.isNotEmpty() && oldValue.cross_id_end != newValue.cross_id_end)) { //路口发生变化 i("$M_MAP$TAG", "路段发生变化 上个:${oldValue.cross_id_end} , 下个:${newValue.cross_id_end}") invokeRoadChange(2, newValue) @@ -554,9 +556,25 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle } } + private var reChangeIconCount = AtomicInteger(0) + override fun changeCurrentIcon(iconId: Int) { if (checkAMapView()) { - mMapView.getMapAutoViewHelper()!!.getMyLocationStyle()!!.myLocationIcon(iconId, true) + val changeResult = mMapView.getMapAutoViewHelper()!!.getMyLocationStyle()!! + .myLocationIcon(iconId, true) + if (!changeResult) { + val count = reChangeIconCount.incrementAndGet() + MapTraceUtil.log( + "", ChainConstant.CHAIN_CODE_HD_MAP_ICON_SET, TAG, + mapOf("changeCurrentIcon-count" to "$count") + ) + if (count >= 3) { + return + } + UiThreadHandler.postDelayed({ changeCurrentIcon(iconId) }, 3000L, + UiThreadHandler.MODE.QUEUE) + reChangeIconCount.set(0) + } } } diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/utils/MapTraceUtil.kt b/libraries/mogo-map/src/main/java/com/mogo/map/utils/MapTraceUtil.kt new file mode 100644 index 0000000000..3ccb1769cc --- /dev/null +++ b/libraries/mogo-map/src/main/java/com/mogo/map/utils/MapTraceUtil.kt @@ -0,0 +1,56 @@ +package com.mogo.map.utils + +import com.mogo.commons.debug.DebugConfig +import com.mogo.eagle.core.data.deva.chain.ChainConstant +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant +import com.zhjt.service.chain.ChainLog +import com.zhjt.service.chain.ChildNodeAlias +import com.zhjt.service.chain.ParentNodeAlias + +class MapTraceUtil { + + companion object { + + fun log(pN: String, cN: String, data: Any, data1: Any, end: Boolean = true) { + if (end) { + logEnd(pN, cN, data, data1) + } else { + realLog(pN, cN, data, data1) + } + } + + @ChainLog( + linkChainLog = ChainConstant.CHAIN_TYPE_HD_MAP, + linkCode = ChainConstant.CHAIN_SOURCE_MAP, + paramIndexes = [2, 3], + endPoint = false + ) + private fun realLog( + @ParentNodeAlias pN: String, + @ChildNodeAlias cN: String, + data: Any, + data1: Any + ) { + if (DebugConfig.isDebug()) { + CallerLogger.d("${SceneConstant.M_MAP}$data", data1) + } + } + + @ChainLog( + linkChainLog = ChainConstant.CHAIN_TYPE_HD_MAP, + linkCode = ChainConstant.CHAIN_SOURCE_MAP, + paramIndexes = [2, 3] + ) + private fun logEnd( + @ParentNodeAlias pN: String, + @ChildNodeAlias cN: String, + data: Any, + data1: Any + ) { + if (DebugConfig.isDebug()) { + CallerLogger.d("${SceneConstant.M_MAP}$data", data1) + } + } + } +} \ No newline at end of file