This commit is contained in:
lixiaopeng
2022-09-22 16:48:25 +08:00
committed by pangfan
parent 0d981dd1d5
commit 1760e03065
17 changed files with 84 additions and 33 deletions

View File

@@ -6,7 +6,6 @@ import android.util.Log
import androidx.annotation.RequiresPermission
import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.mogo.eagle.core.data.autopilot.toAutoPilotLine
import com.mogo.eagle.core.data.autopilot.toRouteInfo
@@ -29,6 +28,7 @@ import com.mogo.eagle.core.function.autopilot.adapter.MoGoHandAdasMsgManager
import com.mogo.eagle.core.function.autopilot.server.AsyncDataToAutopilotServer
import com.mogo.eagle.core.function.autopilot.telematic.IMsgHandler
import com.mogo.eagle.core.function.autopilot.telematic.TeleMsgHandler
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
@@ -51,9 +51,7 @@ import com.zhidao.support.adas.high.OnMultiDeviceListener
import com.zhidao.support.adas.high.common.Constants
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS
import com.zhidao.support.adas.high.common.CupidLogUtils
import com.zhidao.support.adas.high.common.MessageType
import com.zhidao.support.adas.high.common.MogoReport
import com.zhidao.support.adas.high.subscribe.SubscribeInterfaceOptions
import com.zhjt.service.chain.ChainLog
import com.zhjt.service.chain.TracingConstants
import io.netty.channel.Channel

View File

@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.autopilot.adapter
import android.location.Location
import android.util.Log
import chassis.VehicleStateOuterClass
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
@@ -310,6 +311,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
header: MessagePad.Header,
carConfigResp: MessagePad.CarConfigResp?
) {
Log.d("Upgrade", "isMapLoaded = " + HdMapBuildConfig.isMapLoaded + "___carConfigResp = " + carConfigResp)
if (HdMapBuildConfig.isMapLoaded && carConfigResp != null) {
AppConfigInfo.plateNumber = carConfigResp.plateNumber//车牌号
AppConfigInfo.iPCMacAddress = carConfigResp.macAddress//工控机MAC地址

View File

@@ -5,13 +5,13 @@ import android.text.TextUtils;
import android.util.Log;
import androidx.annotation.Nullable;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
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;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager;
@@ -19,6 +19,8 @@ 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.UiThreadHandler;
import com.zhidao.support.adas.high.AdasManager;
import org.jetbrains.annotations.NotNull;
@@ -60,6 +62,15 @@ public class MoGoHandAdasMsgManager implements
private int brakeLight = -1;
public void getConfig() {
com.elegant.utils.UiThreadHandler.postDelayed(new Runnable() {
@Override
public void run() {
CallerAutoPilotManager.INSTANCE.getCarConfig();
}
},0);
}
private int setTurnLightState(int turn_light) {
if (turn_light == 0) {
if (isOnTurnLight) {
@@ -106,6 +117,7 @@ public class MoGoHandAdasMsgManager implements
@Override
public void onAutopilotCarConfig(@NotNull MessagePad.CarConfigResp carConfigResp) {
if (carConfigResp != null && !TextUtils.isEmpty(carConfigResp.getMacAddress())) {
Log.d("Upgrade", "onAutopilotCarConfig carConfigResp.getMacAddress() = " + carConfigResp.getMacAddress());
CallerBindingcarManager.getBindingcarProvider().getBindingcarInfo(carConfigResp.getMacAddress(), MoGoAiCloudClientConfig.getInstance().getSn());
}
}
@@ -166,4 +178,5 @@ public class MoGoHandAdasMsgManager implements
public void onAutopilotBrake(float brake) {
}
}

View File

@@ -73,7 +73,6 @@ class TeleMsgHandler : IMsgHandler {
TextFormat.printer().escapingNonAscii(false).printToString(carConfig)
}"
)
// Log.d("liyz", "TeleMsgHandler macAddress = " + carConfig.macAddress)
CallerBindingcarManager.getBindingcarProvider().getBindingcarInfo(
carConfig.macAddress,
MoGoAiCloudClientConfig.getInstance().sn