[Change]
DebugSettingView.kt增加引导线全局路径规划的等数据统计 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -18,14 +18,12 @@ import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
@@ -57,7 +55,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener,
|
||||
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener,
|
||||
IMoGoMapLocationListener, IMoGoAutopilotIdentifyListener {
|
||||
IMoGoMapLocationListener, IMoGoAutopilotIdentifyListener,
|
||||
IMoGoAutopilotPlanningListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -67,6 +66,15 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
|
||||
private var mAutoPilotCarStateInfo: AutopilotCarStateInfo? = null
|
||||
|
||||
// 感知识别数据个数
|
||||
private var mIdentifyDataSize = 0
|
||||
|
||||
// 引导线点个数
|
||||
private var mTrajectoryInfoSize = 0
|
||||
|
||||
// 全局路径规划点个数
|
||||
private var mRouteInfoSize = 0
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_debug_setting, this, true)
|
||||
initView()
|
||||
@@ -96,6 +104,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
CallerMapLocationListenerManager.addListener(TAG, this)
|
||||
// 添加 域控制器感知数据 监听
|
||||
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
|
||||
// 添加 规划路径相关回调 监听
|
||||
CallerAutopilotPlanningListenerManager.addListener(TAG, this)
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterForeground()
|
||||
}
|
||||
@@ -115,6 +125,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
CallerMapLocationListenerManager.removeListener(TAG)
|
||||
// 移除 域控制器感知数据 监听
|
||||
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
|
||||
// 移除 规划路径相关回调 监听
|
||||
CallerAutopilotPlanningListenerManager.removeListener(TAG)
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterBackground()
|
||||
}
|
||||
@@ -403,6 +415,18 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tvCarInfo.text =
|
||||
"GPS时间:${mAutoPilotCarStateInfo?.values?.satelliteTime}\n" +
|
||||
"自车经纬度:\n${mAutoPilotCarStateInfo?.values?.lon}\n${mAutoPilotCarStateInfo?.values?.lat}\n"
|
||||
|
||||
tvIdentifyInfo.text =
|
||||
"感知数据个数:${mIdentifyDataSize}"
|
||||
tvTrajectoryInfoSize.text =
|
||||
"引导线点个数:${mTrajectoryInfoSize}"
|
||||
tvRouteInfoSize.text =
|
||||
"全局路径规划点个数:${mRouteInfoSize}"
|
||||
|
||||
// 用完之后重制为0,防止节点回掉突然没数据,导致页面显示还是之前的数据情况
|
||||
mIdentifyDataSize = 0
|
||||
mTrajectoryInfoSize = 0
|
||||
mRouteInfoSize = 0
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -447,12 +471,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onAutopilotIdentifyDataUpdate(trafficData: ArrayList<TrafficData>?) {
|
||||
UiThreadHandler.post {
|
||||
tvAutopilotInfo.post {
|
||||
tvIdentifyInfo.text =
|
||||
"感知数据个数:${trafficData?.size}\n"
|
||||
}
|
||||
}
|
||||
mIdentifyDataSize = trafficData?.size ?: 0
|
||||
}
|
||||
|
||||
override fun onAutopilotWarnMessage(autopilotWarnMessage: AutopilotWarnMessage?) {
|
||||
@@ -462,4 +481,12 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
override fun onAutopilotRecordResult(record: AutoPilotRecordResult?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotTrajectory(trajectoryInfos: ArrayList<ADASTrajectoryInfo>) {
|
||||
mTrajectoryInfoSize = trajectoryInfos.size
|
||||
}
|
||||
|
||||
override fun onAutopilotRotting(routeList: AutopilotRouteInfo?) {
|
||||
mRouteInfoSize = routeList?.models?.size ?: 0
|
||||
}
|
||||
}
|
||||
@@ -35,8 +35,8 @@
|
||||
android:id="@+id/tvAppInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:lineSpacingExtra="3dp"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_30"
|
||||
tools:text="应用基础信息" />
|
||||
|
||||
@@ -56,6 +56,22 @@
|
||||
android:textSize="@dimen/dp_30"
|
||||
tools:text="感知信息" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTrajectoryInfoSize"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_30"
|
||||
tools:text="引导线数据个数" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRouteInfoSize"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_30"
|
||||
tools:text="全局路径规划数据个数" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--鹰眼UI控制-->
|
||||
|
||||
Reference in New Issue
Block a user