[Upload]
DebugView增加自车经纬度及感知数量可视化 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -10,15 +9,14 @@ import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.autopilot.*
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
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.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
@@ -26,6 +24,7 @@ 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.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
@@ -55,7 +54,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener,
|
||||
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener {
|
||||
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener,
|
||||
IMoGoMapLocationListener, IMoGoAutopilotIdentifyListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -73,6 +73,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotCarStatusListenerManager.addListener(TAG, this)
|
||||
CallerMapLocationListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterForeground()
|
||||
}
|
||||
@@ -84,6 +85,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerAutopilotCarStatusListenerManager.removeListener(TAG)
|
||||
CallerMapLocationListenerManager.removeListener(TAG)
|
||||
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterBackground()
|
||||
}
|
||||
@@ -403,7 +405,14 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onAutopilotCarStateData(autoPilotCarStateInfo: AutopilotCarStateInfo?) {
|
||||
|
||||
//Logger.d(TAG, "autoPilotCarStateInfo:$autoPilotCarStateInfo")
|
||||
UiThreadHandler.post {
|
||||
tvAutopilotInfo.post {
|
||||
tvCarInfo.text =
|
||||
"GPS时间:${autoPilotCarStateInfo?.values?.receiverDataTime}\n" +
|
||||
"自车经纬度:\n${autoPilotCarStateInfo?.values?.lon}\n${autoPilotCarStateInfo?.values?.lat}\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotSNRequest() {
|
||||
@@ -418,4 +427,20 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
Logger.d(TAG, "location:$location")
|
||||
}
|
||||
|
||||
override fun onAutopilotIdentifyDataUpdate(trafficData: ArrayList<TrafficData>?) {
|
||||
UiThreadHandler.post {
|
||||
tvAutopilotInfo.post {
|
||||
tvIdentifyInfo.text =
|
||||
"感知数据个数:${trafficData?.size}\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotWarnMessage(autopilotWarnMessage: AutopilotWarnMessage?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotRecordResult(record: AutoPilotRecordResult?) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_900"
|
||||
android:layout_height="@dimen/dp_900"
|
||||
android:layout_height="@dimen/dp_1000"
|
||||
android:background="#FFFFFF">
|
||||
|
||||
<ScrollView
|
||||
@@ -57,9 +57,25 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textSize="@dimen/dp_30"
|
||||
tools:text="应用基础信息" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCarInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_30"
|
||||
tools:text="车辆基础信息" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIdentifyInfo"
|
||||
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