[2.13.0-arch-opt] move binding car to deva tools

This commit is contained in:
zhongchao
2023-01-12 10:11:23 +08:00
parent 8ceced4bcf
commit d8728fe8c9
57 changed files with 522 additions and 1240 deletions

View File

@@ -25,13 +25,12 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotProvider
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasListenerImpl
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasMsgConnectStatusListenerImpl
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoHandAdasMsgManager
import com.mogo.eagle.core.function.datacenter.autopilot.server.AsyncDataToAutopilotServer
import com.mogo.eagle.core.function.datacenter.autopilot.telematic.EventListener
import com.mogo.eagle.core.function.datacenter.autopilot.telematic.IMsgHandler
import com.mogo.eagle.core.function.datacenter.autopilot.telematic.TeleMsgHandler
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.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -83,7 +82,6 @@ class MoGoAutopilotProvider :
get() = TAG
override fun init(context: Context) {
MoGoHandAdasMsgManager.getInstance(context)
CallerLogger.i("$M_ADAS_IMPL$TAG", "初始化工控机连接……")
mContext = context
// 初始化ADAS 域控制器
@@ -692,11 +690,7 @@ class MoGoAutopilotProvider :
}
msgHandler.synMsgToAllClients()
} else {// 乘客屏
CallerBindingcarManager.getBindingcarProvider()
.getBindingcarInfo(
carConfigResp.macAddress,
MoGoAiCloudClientConfig.getInstance().sn
)
CallerDevaToolsManager.getBindingCarInfo( carConfigResp.macAddress, MoGoAiCloudClientConfig.getInstance().sn)
invokeNettyConnResult("乘客屏车牌号:${carConfigResp.plateNumber},Mac地址为${carConfigResp.macAddress}")
}
}

View File

@@ -1,60 +0,0 @@
package com.mogo.eagle.core.function.datacenter.autopilot.adapter;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener;
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.utilcode.util.UiThreadHandler;
import org.jetbrains.annotations.NotNull;
import mogo.telematics.pad.MessagePad;
public class MoGoHandAdasMsgManager implements
IMoGoAutopilotCarConfigListener{
private final String TAG = "AdasEventManager";
private static volatile MoGoHandAdasMsgManager moGoHandAdasMsgManager;
private Context mContext;
private MoGoHandAdasMsgManager(Context context) {
CallerAutopilotCarConfigListenerManager.INSTANCE.addListener(TAG, this);
mContext = context;
}
public static MoGoHandAdasMsgManager getInstance(Context context) {
if (moGoHandAdasMsgManager == null) {
synchronized (MoGoHandAdasMsgManager.class) {
if (moGoHandAdasMsgManager == null) {
moGoHandAdasMsgManager = new MoGoHandAdasMsgManager(context);
}
}
}
return moGoHandAdasMsgManager;
}
public void getConfig() {
com.elegant.utils.UiThreadHandler.postDelayed(new Runnable() {
@Override
public void run() {
CallerAutoPilotManager.INSTANCE.getCarConfig();
}
}, 0);
}
@Override
public void onAutopilotCarConfig(@NotNull MessagePad.CarConfigResp carConfigResp) {
if (carConfigResp != null && !TextUtils.isEmpty(carConfigResp.getMacAddress())) {
Log.d("Upgrade", "MoGoHandAdasMsgManager address = " + carConfigResp.getMacAddress());
CallerBindingcarManager.getBindingcarProvider().getBindingcarInfo(carConfigResp.getMacAddress(), MoGoAiCloudClientConfig.getInstance().getSn());
}
}
}

View File

@@ -11,7 +11,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LO
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager.setDemoMode
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager.setIgnoreConditionDraw
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.utilcode.mogo.logger.*
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.ToastUtils
@@ -93,10 +93,7 @@ class TeleMsgHandler : IMsgHandler {
TextFormat.printer().escapingNonAscii(false).printToString(carConfig)
}"
)
CallerBindingcarManager.getBindingcarProvider().getBindingcarInfo(
carConfig.macAddress,
MoGoAiCloudClientConfig.getInstance().sn
)
CallerDevaToolsManager.getBindingCarInfo(carConfig.macAddress, MoGoAiCloudClientConfig.getInstance().sn)
}
// SN
10 -> {