diff --git a/.idea/misc.xml b/.idea/misc.xml index f98bdb3b31..8146320b2a 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -17,7 +17,7 @@ - + diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 9fb9243a7a..b3f19102fa 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -14,7 +14,7 @@ import com.mogo.cloud.passport.IMoGoTokenCallback; import com.mogo.cloud.passport.MoGoAiCloudClient; import com.mogo.cloud.passport.MoGoAiCloudClientConfig; import com.mogo.commons.AbsMogoApplication; -import com.mogo.commons.FunctionBuildConfig; +import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.commons.constants.SharedPrefsConstants; import com.mogo.commons.debug.DebugConfig; import com.mogo.commons.network.Utils; 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 cf5ef26e06..d48f3f38ab 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 @@ -8,6 +8,7 @@ import com.mogo.cloud.passport.MoGoAiCloudClient import com.mogo.commons.AbsMogoApplication import com.mogo.eagle.core.data.app.AppConfigInfo 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.obu.ObuStatusInfo import com.mogo.eagle.core.data.traffic.TrafficData @@ -98,6 +99,59 @@ class DebugSettingView @JvmOverloads constructor( btnRecordPackage.setOnClickListener { CallerAutoPilotManager.recordPackage() } + + + // 初始化 GSP数据源 数据 + rgGpsProvider.check( + when (FunctionBuildConfig.gpsProvider) { + 0 -> { + R.id.rbGpsProviderAndroid + } + 1 -> { + R.id.rbGpsProviderRTK + } + 2 -> { + R.id.rbGpsProviderOBU + } + else -> R.id.rbGpsProviderAndroid + } + ) + rgGpsProvider.setOnCheckedChangeListener { group, checkedId -> + when (checkedId) { + R.id.rbGpsProviderAndroid -> { + FunctionBuildConfig.gpsProvider = 0 + } + R.id.rbGpsProviderRTK -> { + FunctionBuildConfig.gpsProvider = 1 + } + R.id.rbGpsProviderOBU -> { + FunctionBuildConfig.gpsProvider = 2 + } + } + } + + // 初始化 感知数据是否绘制 选择情况 + rgIsDrawIdentifyData.check( + when (FunctionBuildConfig.isDrawIdentifyData) { + true -> { + R.id.rbDraw + } + false -> { + R.id.rbDoNotDraw + } + } + ) + rgIsDrawIdentifyData.setOnCheckedChangeListener { group, checkedId -> + when (checkedId) { + R.id.rbDraw -> { + FunctionBuildConfig.isDrawIdentifyData = true + } + R.id.rbDoNotDraw -> { + FunctionBuildConfig.isDrawIdentifyData = false + } + } + } + } /** 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 81963ea43e..98faab7373 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 @@ -12,6 +12,86 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> + + + + + + + + + + + + + + + + + + + + + + + + + + 发出 cost :" + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start)) + "ms"); + if (FunctionBuildConfig.isDrawIdentifyData) { + IdentifyDataDrawer.getInstance().renderAdasRecognizedResult(trafficData); + Log.i(TAG, "接收数据 -> 发出 cost :" + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start)) + "ms"); + } } catch (Exception e) { e.printStackTrace(); } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/datacenter/SnapshotLocationDataCenter.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/datacenter/SnapshotLocationDataCenter.java index 10ca090421..3bd59e348d 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/datacenter/SnapshotLocationDataCenter.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/datacenter/SnapshotLocationDataCenter.java @@ -1,6 +1,6 @@ package com.mogo.module.common.datacenter; -import com.mogo.commons.FunctionBuildConfig; +import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.commons.debug.DebugConfig; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; @@ -91,17 +91,19 @@ public class SnapshotLocationDataCenter { long systemTime = data.optLong("systemTime"); int gpsProvider = data.optInt("gpsProvider", 1); + //测试面板状态同步 + AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); + autopilotStatusInfo.setLocationLat(lat); + autopilotStatusInfo.setLocationLon(lon); + + autopilotStatusInfo.setLocationStatus(true); + CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatus(); + + DebugConfig.setStatusData(DebugConfig.sLon, lon); + DebugConfig.setStatusData(DebugConfig.sLat, lat); + // 使用与渠道配置一样的gps提供者提供的数据 if (gpsProvider == FunctionBuildConfig.gpsProvider) { - //测试面板状态同步 - AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); - autopilotStatusInfo.setLocationLat(lat); - autopilotStatusInfo.setLocationLon(lon); - CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatus(); - - DebugConfig.setStatusData(DebugConfig.sLon, lon); - DebugConfig.setStatusData(DebugConfig.sLat, lat); - CloudLocationInfo cloudLocationInfo = new CloudLocationInfo(); cloudLocationInfo.setAlt(alt); cloudLocationInfo.setHeading(heading); diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java index 2cf4493f02..43a5d79d64 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java @@ -6,7 +6,7 @@ import android.text.TextUtils; import com.mogo.cloud.socket.entity.SocketDownData; import com.mogo.commons.AbsMogoApplication; -import com.mogo.commons.FunctionBuildConfig; +import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.commons.debug.DebugConfig; import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.map.marker.IMogoMarker; @@ -16,12 +16,10 @@ import com.mogo.map.uicontroller.EnumMapUI; import com.mogo.module.common.ModuleNames; import com.mogo.module.common.MogoApisHandler; import com.mogo.module.common.api.CallChatApi; -import com.mogo.module.common.drawer.AdasRecognizedResultDrawer; import com.mogo.module.common.drawer.IdentifyDataDrawer; import com.mogo.module.common.drawer.MarkerDrawer; import com.mogo.module.common.drawer.OnlineCarDrawer; import com.mogo.module.common.drawer.RoadConditionDrawer; -import com.mogo.module.common.drawer.SnapshotSetDataDrawer; import com.mogo.module.common.drawer.marker.IMarkerView; import com.mogo.module.common.drawer.marker.MapMarkerAdapter; import com.mogo.module.common.drawer.marker.OnlineCarMarkerView; @@ -184,7 +182,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, // msg.sendToTarget(); // 使用与渠道配置一样的gps提供者提供的数据 修改fPadLenovo.gradle文件中的GPS_PROVIDER字段控制渲染来源 Logger.d(TAG, "result.addAdasRecognizedDataCallback == 3 ------> "); - if (FunctionBuildConfig.gpsProvider != 2) { + if (FunctionBuildConfig.isDrawIdentifyData) { IdentifyDataDrawer.getInstance().renderAdasRecognizedResult(resultList); }