diff --git a/app/productFlavors/fPadLenovo.gradle b/app/productFlavors/fPadLenovo.gradle index ef235a9a35..b4415802eb 100644 --- a/app/productFlavors/fPadLenovo.gradle +++ b/app/productFlavors/fPadLenovo.gradle @@ -27,7 +27,7 @@ project.android.productFlavors { buildConfigField 'int', 'GPS_PROVIDER', "1" // 构建的应用身份类型,司机|乘客 - buildConfigField 'int', 'APP_IDENTITY_MODE', "0x00" + buildConfigField 'int', 'APP_IDENTITY_MODE', "0x02" // 构建的是否是演示(美化)模式 buildConfigField 'boolean', 'IS_DEMO_MODE', 'true' } diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index 1ed3e4b322..0cc39ed625 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -51,7 +51,7 @@ class MoGoAutopilotProvider : 0x00 -> // 司机 { CallerMapDataCollectorManager.registerOnMapCollectTaskListener(this) - AdasManager.getInstance().create(context, "192.168.1.102") + AdasManager.getInstance().create(context, "192.168.1.141") } 0x01 -> // 乘客 { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index 8fc44ed188..7556670591 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -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?) { - 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) { + mTrajectoryInfoSize = trajectoryInfos.size + } + + override fun onAutopilotRotting(routeList: AutopilotRouteInfo?) { + mRouteInfoSize = routeList?.models?.size ?: 0 + } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml index 3c2f36e4ae..855965ce2a 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml @@ -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="感知信息" /> + + + + diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt index a0c12bee4b..d8bfadb408 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt @@ -105,6 +105,7 @@ object AppConfigInfo { } else { "" } - }${isConnectObu}
" + }${isConnectObu}
" + + "------------------工控机感知&规控数据---------------------
" } } \ No newline at end of file