优化日志

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-10-19 21:39:09 +08:00
parent 198efe707b
commit 1d50be10ba
4 changed files with 7 additions and 18 deletions

View File

@@ -171,7 +171,6 @@ public class AdasEventManager implements OnAdasMsgConnectStatusListener, IMoGoAu
@Override
public void onAutopilotStatusResponse(@NonNull AutopilotStatusInfo autoPilotStatusInfo) {
Logger.d(TAG, "autopilotStatus " + autoPilotStatusInfo);
int state = autoPilotStatusInfo.getState();
float speed = autoPilotStatusInfo.getSpeed();
mCurrentAutopilotStatus = state;
@@ -186,11 +185,9 @@ public class AdasEventManager implements OnAdasMsgConnectStatusListener, IMoGoAu
@Override
public void onAutopilotArriveAtStation(AutopilotStationInfo autopilotWayArrive) {
Logger.d(TAG, "autopilotArrive " + autopilotWayArrive);
if (autopilotWayArrive != null) {
double lon = autopilotWayArrive.getLon();
double lat = autopilotWayArrive.getLat();
Logger.d(TAG, "autopilotArrive reportSite");
reportSite(lon, lat);
for (IAdasDataListener listener : iAdasEventListeners) {
if (listener != null) {
@@ -202,7 +199,6 @@ public class AdasEventManager implements OnAdasMsgConnectStatusListener, IMoGoAu
@Override
public void onAutopilotCarStateData(@Nullable AutopilotCarStateInfo autoPilotCarStateInfo) {
Logger.d(TAG, "onCarStateData " + autoPilotCarStateInfo);
for (IAdasDataListener listener : iAdasEventListeners) {
if (listener != null) {
listener.ownerCarStateInfo(gson.toJson(autoPilotCarStateInfo));
@@ -223,7 +219,6 @@ public class AdasEventManager implements OnAdasMsgConnectStatusListener, IMoGoAu
Logger.d(TAG, "onAutopilotRoute is null !");
return;
}
Logger.d(TAG, "onAutopilotRoute : " + autopilotRoute.toString());
for (IAdasDataListener listener : iAdasEventListeners) {
if (listener != null) {
listener.autopilotRoute(autopilotRoute);
@@ -238,7 +233,6 @@ public class AdasEventManager implements OnAdasMsgConnectStatusListener, IMoGoAu
@Override
public void onAutopilotIdentifyDataUpdate(@Nullable List<TrafficData> trafficData) {
Logger.d(TAG, "onRectData " + trafficData);
// 仅在 vr 模式下显示 adas 识别车辆
if (trafficData == null) {
Logger.w(TAG, "--->action is null");

View File

@@ -117,7 +117,7 @@ public class IdentifyDataDrawer extends BaseDrawer {
sendMessage(MSG_REMOVE_DIRTY_MARKERS, mMarkersCaches);
mMarkersCaches.clear();
mMarkersCaches = newAdasRecognizedMarkersCaches;
Log.d("ADAS数据延时绘制", "render 接收数据 -> 处理结束 " + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start)) + "ms");
Log.d(TAG, "ADAS数据延时绘制 render 接收数据 -> 处理结束 " + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start)) + "ms");
}
/**
@@ -146,7 +146,7 @@ public class IdentifyDataDrawer extends BaseDrawer {
return;
}
Iterator<TrafficData> iterator = mLastPositions.values().iterator();
Log.d("EmArrow", "removeUselessLastRecord size : " + mLastPositions.size());
Log.d(TAG, "EmArrow removeUselessLastRecord size : " + mLastPositions.size());
while (iterator.hasNext()) {
TrafficData result = iterator.next();
long internal = result.getSatelliteTime() - getCurSatelliteTime();
@@ -195,15 +195,15 @@ public class IdentifyDataDrawer extends BaseDrawer {
}
final MogoLatLng renderLoc = new MogoLatLng(recognizedListResult.getLat(), recognizedListResult.getLon());
long cost = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);
Log.d("ADAS动画数据", "cost : " + cost);
Log.d(TAG, "ADAS动画数据 cost : " + cost);
final long intervalRef = interval - cost;
Log.d("ADAS动画数据", "最终赋值 : " + intervalRef + " 两帧间隔 : " + interval + " uuid : " + recognizedListResult.getUuid());
Log.d(TAG, "ADAS动画数据 最终赋值 : " + intervalRef + " 两帧间隔 : " + interval + " uuid : " + recognizedListResult.getUuid());
marker.addDynamicAnchorPosition(renderLoc, (float) recognizedListResult.getHeading(), intervalRef);
String carColor = getModelRenderColor(recognizedListResult.getType().getType(), FROM_ADAS, recognizedListResult.getThreatLevel());
marker.setAnchorColor(carColor);
newAdasRecognizedMarkersCaches.put(uniqueKey, marker);
Log.d("ADAS数据延时", "render 刷新一台车 cost : " + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start)));
Log.d(TAG, "render 刷新一台车 cost : " + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start)));
}
/**
@@ -235,7 +235,7 @@ public class IdentifyDataDrawer extends BaseDrawer {
.position(new MogoLatLng(recognizedListResult.getLat(), recognizedListResult.getLon()));
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).addMarker(DataTypes.TYPE_MARKER_ADAS, options);
cacheMarkerIconResMd5Val(resIdVal, marker);
Log.d("ADAS数据延时", "创建一个新 marker cost : " + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start)));
Log.d(TAG, "创建一个新 marker cost : " + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start)));
return marker;
}