[code_opt_3.3.0] split autopilot status and param
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package com.zhidao.support.adas.high;
|
||||
|
||||
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_INIT;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_SEND_GLOBAL_PATH;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_SEND_SYSTEM_CMD;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_SEND_TRAJECTORY_DOWNLOAD;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_START_AUTOPILOT;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_CONNECT_ADDRESS;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_INIT;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_STATUS_CHANGE_REASON;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_SOURCE_ADAS;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_TYPE_INIT_STATUS;
|
||||
@@ -16,6 +16,7 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -283,7 +284,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
@ChainLog(linkChainLog = CHAIN_TYPE_INIT_STATUS,
|
||||
linkCode = CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = CHAIN_CODE_CONNECT_ADDRESS,
|
||||
paramIndexes = {0,1})
|
||||
paramIndexes = {0, 1})
|
||||
private void connectSocket(String address, int port) {
|
||||
if (mSocket != null) {
|
||||
mSocket.connectWebSocket(address, port);
|
||||
@@ -513,7 +514,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
|
||||
@Override
|
||||
public void onConnecting(String msg) {
|
||||
updateConnectStatus(Constants.IPC_CONNECTION_STATUS.CONNECTING, msg);
|
||||
updateConnectStatus(Constants.IPC_CONNECTION_STATUS.CONNECTING, msg == null ? "" : msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -539,7 +540,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
ipcConnectedPort = Constants.DEFAULT_PORT;
|
||||
subscribeInterface = null;
|
||||
usedChassisType = Constants.CHASSIS_TYPE.UNKNOWN;
|
||||
updateConnectStatus(Constants.IPC_CONNECTION_STATUS.DISCONNECTED, t);
|
||||
updateConnectStatus(Constants.IPC_CONNECTION_STATUS.DISCONNECTED, t == null ? "" : t);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -627,11 +628,9 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* @param reason 状态描述
|
||||
* 如果ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.DISCONNECTED && reason==null 表示主动断开连接
|
||||
*/
|
||||
@ChainLog(linkChainLog = CHAIN_TYPE_INIT_STATUS,
|
||||
linkCode = CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = CHAIN_CODE_STATUS_CHANGE_REASON,
|
||||
paramIndexes = {0, 1})
|
||||
private void updateConnectStatus(@Define.IPCConnectionStatus int status, @Nullable String reason) {
|
||||
Log.d("emArrow", "status:" + status + " , reason :" + reason);
|
||||
log(status, reason);
|
||||
ipcConnectionStatus.set(status);
|
||||
if (status == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
AutopilotAbilityManager.getInstance().start();
|
||||
@@ -652,6 +651,14 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
CupidLogUtils.i(TAG, "工控机连接状态 status=" + status + " reason=" + reason);
|
||||
}
|
||||
|
||||
@ChainLog(linkChainLog = CHAIN_TYPE_INIT_STATUS,
|
||||
linkCode = CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = CHAIN_CODE_STATUS_CHANGE_REASON,
|
||||
paramIndexes = {0, 1})
|
||||
private void log(int status, @Nullable String reason) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopDispatchHandler() {
|
||||
|
||||
@@ -21,7 +21,6 @@ import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.os.Trace;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
@@ -391,6 +390,12 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_HD_MAP,
|
||||
linkCode = CHAIN_SOURCE_MAP,
|
||||
nodeAliasCode = CHAIN_CODE_HD_MAP_CALL,
|
||||
paramIndexes = {0}
|
||||
)
|
||||
@Override
|
||||
public void setRomaMode(int mode) {
|
||||
if (checkAMapView()) {
|
||||
@@ -818,12 +823,10 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
@Override
|
||||
public void onCameraChangeFinish(@Nullable CameraPosition cameraPosition) {
|
||||
if (cameraPosition != null) {
|
||||
Trace.beginSection("timer.onCameraChangeFinish");
|
||||
MogoMapListenerHandler.Companion.getMogoMapListenerHandler().onMapChanged(ObjectUtils.fromAMap(cameraPosition.getTarget()),
|
||||
cameraPosition.getZoom(),
|
||||
cameraPosition.getTilt(),
|
||||
cameraPosition.getBearing());
|
||||
Trace.endSection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -927,7 +930,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
/**
|
||||
* 加载3D模型
|
||||
*/
|
||||
private void loadPreVehicleModel() { //todo 耗时打印
|
||||
private void loadPreVehicleModel() {
|
||||
CallerLogger.INSTANCE.d(M_MAP + TAG, "添加感知模型到地图中……");
|
||||
ThreadUtils.getIoPool().submit(() -> {
|
||||
addPreVehicleModelWeiZhi(TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI, "添加感知模型到地图中……preVehicleStrWeiZhi=");
|
||||
@@ -1042,8 +1045,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
PointCloudHelper.INSTANCE.setPointCloudColor(color);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void cacheHDDataByCity(IHdCacheListener listener) {
|
||||
if (mMapView.getMapAutoViewHelper() != null) {
|
||||
|
||||
Reference in New Issue
Block a user