[6.7.0][工具箱] refactor: 增加 漫游 的日志打印;
This commit is contained in:
@@ -42,6 +42,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.utils.MapRomaTrace
|
||||
import com.mogo.eagle.core.function.utils.MapRomaTrace.Companion.getCurrentCNode
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
@@ -97,6 +98,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
"cityCode" to CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().cityCode
|
||||
)
|
||||
)
|
||||
Logger.d(TAG, "H_ERROR_CLOUD msg=云端 $H_DELAY_TIME 秒内无感知数据下发,socketStatus=${MogoStatusManager.getInstance().isSocketOnLine}, cityCode=${CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().cityCode}")
|
||||
} else {
|
||||
MapRomaTrace.log(
|
||||
CHAIN_CODE_ROMA_MAP_START, CHAIN_CODE_ROMA_CLOUD_PUSH, TAG,
|
||||
@@ -105,6 +107,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
"cloudDataSize" to cloudDataSize
|
||||
)
|
||||
)
|
||||
Logger.d(TAG, "H_ERROR_CLOUD msg=延迟 $H_DELAY_TIME 秒内获取云端下发感知数据大小,cloudDataSize=${cloudDataSize}")
|
||||
}
|
||||
}
|
||||
if (it.what == H_ERROR_MAP) {
|
||||
@@ -112,6 +115,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
CHAIN_CODE_ROMA_MAP_START, CHAIN_CODE_ROMA_MAP_ERROR, TAG,
|
||||
mutableMapOf("msg" to "地图漫游模式启动失败,原因:${it.obj}")
|
||||
)
|
||||
Logger.d(TAG, "H_ERROR_MAP msg=地图漫游模式启动失败,原因:${it.obj}")
|
||||
if (DebugConfig.isDebug()) {
|
||||
ToastUtils.showShort("进入漫游模式失败, code:${it.obj}")
|
||||
}
|
||||
@@ -130,6 +134,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
TAG,
|
||||
mutableMapOf("reject" to "正在展示路口,点触漫游按钮")
|
||||
)
|
||||
Logger.d(TAG, "trigger reject=正在展示路口,点触漫游按钮")
|
||||
CallerMapRomaListener.invokeMapRoma(false)
|
||||
return
|
||||
}
|
||||
@@ -142,16 +147,19 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
TAG,
|
||||
mutableMapOf("trigger" to true)
|
||||
)
|
||||
Logger.d(TAG, "trigger trigger=true, roamStatus=${roamStatus}")
|
||||
openRoma()
|
||||
} else {
|
||||
// 跟上次关联,需要确认parent进度
|
||||
MapRomaTrace.log(getCurrentCNode(), CHAIN_CODE_ROMA_CLOSE_CLICK, TAG, "")
|
||||
Logger.d(TAG, "trigger trigger=false, roamStatus=${roamStatus}")
|
||||
handler.removeMessages(H_ERROR_CLOUD)
|
||||
closeRoma()
|
||||
}
|
||||
}
|
||||
|
||||
private fun openRoma() {
|
||||
Logger.d(TAG, "openRoma")
|
||||
CallerMapIdentifyManager.updateRoam(TAG, true)
|
||||
CallerMapUIServiceManager.getMapUIController()?.visualAngleLock(true)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setScrollGesturesEnable(false)
|
||||
@@ -162,6 +170,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
|
||||
@Synchronized
|
||||
private fun closeRoma(manual: Boolean = true) {
|
||||
Logger.d(TAG, "closeRoma, manual=$manual")
|
||||
CallerMapUIServiceManager.getMapUIController()?.visualAngleLock(false)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setScrollGesturesEnable(true)
|
||||
// updateLongSightLevel(false)
|
||||
@@ -184,6 +193,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
"lat" to gnss.latitude
|
||||
), true
|
||||
)
|
||||
Logger.d(TAG, "mapRomaInRange, range=$range, lon=${gnss.longitude}, lat=${gnss.latitude}, romaModeStyle=${FunctionBuildConfig.romaModeStyle}")
|
||||
inRange = range
|
||||
if (FunctionBuildConfig.romaModeStyle == 1) {
|
||||
return
|
||||
@@ -192,6 +202,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
}
|
||||
|
||||
private fun requestRangeOfIdentify(dataReceive: Boolean) {
|
||||
Logger.d(TAG, "requestRangeOfIdentify")
|
||||
val loc = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().gnssInfo
|
||||
// false,改变父节点信息
|
||||
MapRomaTrace.log(
|
||||
@@ -209,6 +220,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
}
|
||||
|
||||
override fun response(requestStatus: Boolean, errorMsg: String?) {
|
||||
Logger.d(TAG, "response, requestStatus=$requestStatus, errorMsg=${errorMsg}")
|
||||
//错误情况
|
||||
if (errorMsg != null) {
|
||||
// false,改变父节点信息
|
||||
@@ -269,6 +281,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
override fun onAiIdentifyData(obj: SocketDownData.SocketDownDataProto?) {
|
||||
Logger.d(TAG, "onAiIdentifyData")
|
||||
obj?.let {
|
||||
obj.data?.let {
|
||||
if (it.allListList != null && it.allListList.size > 0) {
|
||||
@@ -291,6 +304,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
//status 0:进入漫游模式成功 1;进入漫游模式失败 2:正常结束漫游 3:切换视角结束漫游
|
||||
override fun mapRomaStatus(status: Int, msg: String) {
|
||||
super.mapRomaStatus(status, msg)
|
||||
Logger.d(TAG, "mapRomaStatus, status=$status, msg=$msg")
|
||||
when (status) {
|
||||
0 -> {
|
||||
MapRomaTrace.log(
|
||||
@@ -348,6 +362,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
}
|
||||
|
||||
private fun reset(invokeCloud: Boolean = true) {
|
||||
Logger.d(TAG, "reset, invokeCloud=$invokeCloud")
|
||||
if (showAiCloud.get()) {
|
||||
showAiCloud.set(false)
|
||||
aiCloudDataChange.set(false)
|
||||
@@ -362,12 +377,14 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
|
||||
override fun onAutopilotRouteLineId(lineId: Long) {
|
||||
super.onAutopilotRouteLineId(lineId)
|
||||
Logger.d(TAG, "onAutopilotRouteLineId, lineId=$lineId")
|
||||
if (lineId == 0L) {
|
||||
updateRomaStyle(true)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
Logger.d(TAG, "onAutopilotRotting, globalPathResp=${globalPathResp}")
|
||||
globalPathResp?.let {
|
||||
if (it.wayPointsList != null && it.wayPointsList.size > 0) {
|
||||
val roamList = ArrayList<LonLatPoint>()
|
||||
@@ -386,6 +403,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
TAG,
|
||||
"updateRomaStyle auto status:$auto, route:${routeList?.size ?: "reset null"}"
|
||||
)
|
||||
Logger.d(TAG, "updateRomaStyle auto status:$auto, route:${routeList?.size ?: "reset null"}")
|
||||
routeList?.let {
|
||||
CallerMapUIServiceManager.getMapUIController()?.setRoamTrajectory(it)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user