Merge branch 'dev_robotaxi-d_230912_6.1.0' into base_3.4.0-map-sdk
This commit is contained in:
@@ -198,7 +198,7 @@ class MainFragment : MvpFragment<MainFragment?, BusPassengerPresenter?>(), IMogo
|
||||
}
|
||||
}
|
||||
|
||||
fun setCarModle(rawInfo: Int) {
|
||||
fun setCarModel(rawInfo: Int) {
|
||||
getMapUIController()?.changeCurrentIcon(rawInfo)
|
||||
HdMapBuildConfig.currentCarVrIconRes = rawInfo
|
||||
}
|
||||
|
||||
@@ -580,7 +580,6 @@ object TaxiTaskModel {
|
||||
}
|
||||
|
||||
if (isArriveAtEndSite) {
|
||||
updateLocalCalculateStation()
|
||||
//取消自驾,D档位会溜车 map3.6.0 修改
|
||||
cancelAutopilot()
|
||||
}
|
||||
@@ -698,6 +697,8 @@ object TaxiTaskModel {
|
||||
|
||||
mCurrentTaskWithOrder = result
|
||||
|
||||
updateLocalCalculateStation()
|
||||
|
||||
// 任务为空
|
||||
if (result?.endSite == null && result?.order == null) {
|
||||
d(TAG, "queryCurrentTaskOnce: 任务为空")
|
||||
@@ -724,8 +725,6 @@ object TaxiTaskModel {
|
||||
}
|
||||
}
|
||||
|
||||
updateLocalCalculateStation()
|
||||
|
||||
//达到终点后查询全程里程和用时
|
||||
if (QueryCurrentTaskRespBean.isOrderArriveAtEnd(result)) {
|
||||
d(TAG, "queryCurrentTaskOnce ArriveAtEnd")
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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<LonLatPoint>? = null) {
|
||||
MapBizTrace.log(
|
||||
MapRomaTrace.log(
|
||||
"",
|
||||
CHAIN_CODE_ROMA_ROUTE_MODE,
|
||||
TAG,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user