[状态栏]Can数据状态获取逻辑优化
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.autopilot.adapter
|
||||
|
||||
import android.util.*
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
@@ -139,6 +140,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
header: MessagePad.Header,
|
||||
vehicleState: VehicleStateOuterClass.VehicleState?
|
||||
) {
|
||||
|
||||
if (vehicleState != null) {
|
||||
//转向灯数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotLightSwitchData(vehicleState.light)
|
||||
@@ -149,10 +151,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
//挂挡档位数据
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotGearData(vehicleState.gear)
|
||||
} else {
|
||||
/**
|
||||
* 底盘没有返回数据
|
||||
*/
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotNotData(header.timestamp.toLong())
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotDataException(header.timestamp.toLong())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
private var connectStatus = false
|
||||
|
||||
override fun onConnectionIPCStatus(ipcConnectionStatus: Int, reason: String?) {
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotIPCStatusChanged(ipcConnectionStatus, reason)
|
||||
if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 连接成功")
|
||||
connectStatus = true
|
||||
|
||||
@@ -7,7 +7,6 @@ import android.util.Log;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener;
|
||||
@@ -20,7 +19,6 @@ import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -150,7 +148,6 @@ public class MoGoHandAdasMsgManager implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotNotData(long timestamp) {
|
||||
|
||||
public void onAutopilotDataException(long timestamp) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user