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 dcbd2d555a..218f2a1d49 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 @@ -7,7 +7,7 @@ import androidx.constraintlayout.widget.ConstraintLayout import com.mogo.cloud.passport.MoGoAiCloudClient import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.autopilot.AdasOCHData -import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo +import com.mogo.eagle.core.data.autopilot.AutoPilotStatusInfo import com.mogo.eagle.core.data.constants.MoGoConfig import com.mogo.eagle.core.data.obu.ObuStatusInfo import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotStatusListener @@ -108,8 +108,8 @@ class DebugSettingView @JvmOverloads constructor( } - override fun onAutoPilotStatusResponse(autopilotStatusInfo: AutopilotStatusInfo?) { - tvAutopilotInfo.text = GsonUtils.toJson(autopilotStatusInfo) + override fun onAutoPilotStatusResponse(autoPilotStatusInfo: AutoPilotStatusInfo?) { + tvAutopilotInfo.text = GsonUtils.toJson(autoPilotStatusInfo) } } \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutoPilotStatusInfo.kt similarity index 97% rename from core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt rename to core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutoPilotStatusInfo.kt index dc0ae0ef25..b6f6d6d1db 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutoPilotStatusInfo.kt @@ -6,7 +6,7 @@ package com.mogo.eagle.core.data.autopilot * 域控制器状态信息 * 不建议自己初始化此对象,建议使用 CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); */ -class AutopilotStatusInfo { +class AutoPilotStatusInfo { /** * 当前链接的IP地址, 默认地址 192.168.1.102 */ diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutoPilotStatusListener.java b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutoPilotStatusListener.java index 71ed53967e..0f9867840f 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutoPilotStatusListener.java +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutoPilotStatusListener.java @@ -1,7 +1,7 @@ package com.mogo.eagle.core.function.api.autopilot; import com.mogo.eagle.core.data.autopilot.AdasOCHData; -import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; +import com.mogo.eagle.core.data.autopilot.AutoPilotStatusInfo; /** * @author xiaoyuzhou @@ -42,7 +42,7 @@ public interface IMoGoAutoPilotStatusListener { /** * 自动驾驶状态信息 * - * @param autopilotStatusInfo 状态信息 + * @param autoPilotStatusInfo 状态信息 */ - void onAutoPilotStatusResponse(AutopilotStatusInfo autopilotStatusInfo); + void onAutoPilotStatusResponse(AutoPilotStatusInfo autoPilotStatusInfo); } diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt index c9974830d0..543a7c8c02 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt @@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot import androidx.annotation.Nullable import com.mogo.eagle.core.data.autopilot.AdasOCHData -import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo +import com.mogo.eagle.core.data.autopilot.AutoPilotStatusInfo import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotStatusListener import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener import com.mogo.eagle.core.function.call.base.CallerBase @@ -18,7 +18,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase() { private val TAG = "CallerAutopilotListenerManager" // 存储最后一次回调的数据,当有新当位置注册了监听将此数据回调过去,防止有些模块注册顺序问题导致无法获取最新状态 - private var mAutopilotStatusInfo: AutopilotStatusInfo = AutopilotStatusInfo() + private var mAutoPilotStatusInfo: AutoPilotStatusInfo = AutoPilotStatusInfo() // 存储所有注册了监听的对象,invokeXXXX进行遍历回调,将信息同步 private val mAutoPilotStatusListeners: HashMap = HashMap() @@ -26,15 +26,15 @@ object CallerAutoPilotStatusListenerManager : CallerBase() { /** * 查询AutoPilot状态 */ - fun getAutoPilotStatusInfo(): AutopilotStatusInfo { - return mAutopilotStatusInfo + fun getAutoPilotStatusInfo(): AutoPilotStatusInfo { + return mAutoPilotStatusInfo } /** * 查询AutoPilot状态 */ fun getAutoPilotStatusInfoJsonString(): String { - return GsonUtils.toJson(mAutopilotStatusInfo) + return GsonUtils.toJson(mAutoPilotStatusInfo) } /** @@ -47,7 +47,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase() { @Nullable listener: IMoGoAutoPilotStatusListener ) { mAutoPilotStatusListeners[tag] = listener - listener.onAutoPilotStatusResponse(mAutopilotStatusInfo) + listener.onAutoPilotStatusResponse(mAutoPilotStatusInfo) } /** @@ -75,23 +75,23 @@ object CallerAutoPilotStatusListenerManager : CallerBase() { */ @Synchronized fun invokeAutoPilotStatusListener() { - LogUtils.dTag(TAG, "$mAutopilotStatusInfo") - invokeAutoPilotStatusListener(mAutopilotStatusInfo) + LogUtils.dTag(TAG, "$mAutoPilotStatusInfo") + invokeAutoPilotStatusListener(mAutoPilotStatusInfo) } /** * 自动驾驶状态信息回调 - * @param autopilotStatusInfo 自动驾驶状态信息 + * @param autoPilotStatusInfo 自动驾驶状态信息 */ @Synchronized - fun invokeAutoPilotStatusListener(autopilotStatusInfo: AutopilotStatusInfo) { - LogUtils.dTag(TAG, "$autopilotStatusInfo") - mAutopilotStatusInfo = autopilotStatusInfo + fun invokeAutoPilotStatusListener(autoPilotStatusInfo: AutoPilotStatusInfo) { + LogUtils.dTag(TAG, "$autoPilotStatusInfo") + mAutoPilotStatusInfo = autoPilotStatusInfo mAutoPilotStatusListeners.forEach { val tag = it.key val listener = it.value LogUtils.dTag(TAG, "tag:$tag listener:$listener") - listener.onAutoPilotStatusResponse(mAutopilotStatusInfo) + listener.onAutoPilotStatusResponse(mAutoPilotStatusInfo) } } diff --git a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasEventManager.java b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasEventManager.java index 47e8cad380..54cec4d0f4 100644 --- a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasEventManager.java +++ b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasEventManager.java @@ -1,7 +1,7 @@ package com.mogo.module.adas; import com.google.gson.Gson; -import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; +import com.mogo.eagle.core.data.autopilot.AutoPilotStatusInfo; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.module.adas.model.AdasServiceModel; import com.mogo.utils.logger.Logger; @@ -184,7 +184,7 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL AutopilotStatus.ValuesBean autopilotStatusValues = autopilotStatus.getValues(); if (autopilotStatusValues != null) { // 初始化自动驾驶状态信息 - AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); + AutoPilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); autopilotStatusInfo.setAutopilotStatus(autopilotStatusValues.getState()); autopilotStatusInfo.setAutoDriveStatus(autopilotStatusValues.getPilotmode()); autopilotStatusInfo.setErrorReason(autopilotStatusValues.getReason()); 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 77fce93099..081c2f2a4e 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 @@ -2,7 +2,7 @@ package com.mogo.module.common.datacenter; import com.mogo.commons.FunctionBuildConfig; import com.mogo.commons.debug.DebugConfig; -import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; +import com.mogo.eagle.core.data.autopilot.AutoPilotStatusInfo; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.module.common.MogoApisHandler; import com.mogo.service.cloud.location.CloudLocationInfo; @@ -94,7 +94,7 @@ public class SnapshotLocationDataCenter { // 使用与渠道配置一样的gps提供者提供的数据 if (gpsProvider == FunctionBuildConfig.gpsProvider) { //测试面板状态同步 - AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); + AutoPilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); autopilotStatusInfo.setLocationLat(lat); autopilotStatusInfo.setLocationLon(lon); CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();