[dev_arch_opt_3.0]

[Change]
[1、重命名pnc相关]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2023-01-06 12:08:31 +08:00
parent 723540b9a4
commit b96577811f
14 changed files with 53 additions and 79 deletions

View File

@@ -40,7 +40,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListe
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyPlanningObj
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotWarnMessage
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningActionsListenerManager.invokePNCActions
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager.invokePNCActions
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordConfig
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager.invokeAutopilotStatistics

View File

@@ -17,7 +17,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.Companion.STATUS_AUTOPILOT_RUNNING
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningActionsListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -48,14 +48,14 @@ class PncActionsView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
CallerAutopilotPlanningActionsListenerManager.addListener(TAG, this)
CallerPlanningActionsListenerManager.addListener(TAG, this)
CallerTrafficLightListenerManager.addListener(TAG, this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerAutoPilotStatusListenerManager.removeListener(TAG)
CallerAutopilotPlanningActionsListenerManager.removeListener(TAG)
CallerPlanningActionsListenerManager.removeListener(TAG)
CallerTrafficLightListenerManager.removeListener(TAG)
}

View File

@@ -20,7 +20,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGearStateListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisSteeringStateListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisThrottleStateListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningActionsListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisBrakeStateListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisSteeringStateListenerManager;
@@ -114,7 +114,7 @@ public class TrafficDataView extends ConstraintLayout implements
CallerChassisGearStateListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisBrakeStateListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisThrottleStateListenerManager.INSTANCE.addListener(TAG, this);
CallerAutopilotPlanningActionsListenerManager.INSTANCE.addListener(TAG, planningActionMsg -> acceleration = planningActionMsg.getDestinationAcc());
CallerPlanningActionsListenerManager.INSTANCE.addListener(TAG, planningActionMsg -> acceleration = planningActionMsg.getDestinationAcc());
}
private void initView(@NonNull Context context) {
@@ -133,7 +133,7 @@ public class TrafficDataView extends ConstraintLayout implements
CallerChassisGearStateListenerManager.INSTANCE.removeListener(TAG);
CallerChassisBrakeStateListenerManager.INSTANCE.removeListener(TAG);
CallerChassisThrottleStateListenerManager.INSTANCE.removeListener(TAG);
CallerAutopilotPlanningActionsListenerManager.INSTANCE.removeListener(TAG);
CallerPlanningActionsListenerManager.INSTANCE.removeListener(TAG);
}

View File

@@ -7,20 +7,15 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths;
import com.mogo.eagle.core.function.api.map.IMogoMapService;
import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService;
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
import com.mogo.map.MogoGeoSearch;
import com.mogo.map.MogoLocationClient;
import com.mogo.map.MogoMapUIController;
import com.mogo.map.MogoMarkerManager;
import com.mogo.map.MogoOverlayManager;
import com.mogo.map.MogoPoiSearch;
import com.mogo.map.location.GDLocationClient;
import com.mogo.map.location.IMogoGDLocationClient;
import com.mogo.map.location.IMogoLocationClient;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.overlay.IMogoOverlayManager;
import com.mogo.map.search.geo.IMogoGeoSearch;
import com.mogo.map.search.poisearch.IMogoPoiSearch;
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
import com.mogo.map.uicontroller.IMogoMapUIController;
/**
@@ -37,16 +32,6 @@ public class MogoMapService implements IMogoMapService {
return MogoLocationClient.getInstance(context);
}
@Override
public IMogoGeoSearch getGeoSearch(Context context) {
return new MogoGeoSearch(context);
}
@Override
public IMogoPoiSearch getPoiSearch(Context context, MogoPoiSearchQuery query) {
return new MogoPoiSearch(context, query);
}
@Override
public IMogoMarkerManager getMarkerManager(Context context) {
return MogoMarkerManager.getInstance(context);

View File

@@ -1,7 +1,5 @@
package com.mogo.eagle.core.function.impl;
import android.util.Log;
import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.map.MogoLatLng;
@@ -11,10 +9,8 @@ import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService;
import com.mogo.eagle.core.function.impl.marker.drawer.MarkerDrawer;
import com.mogo.eagle.core.function.impl.marker.drawer.TrafficMarkerDrawer;
import com.mogo.eagle.core.function.impl.marker.drawer.V2XWarnDataDrawer;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.map.marker.IMogoMarker;
public class MogoMarkerServiceImpl implements IMogoMarkerService {
private static volatile MogoMarkerServiceImpl sInstance;

View File

@@ -55,10 +55,14 @@ public class V2XWarnDataDrawer extends BaseDrawer {
IMogoMarker marker = drawMarker(markerShowEntity, modeResType(type));
// marker.addDynamicAnchorPosition(new MogoLatLng(collisionlat, collisionLon), (float) heading, showTime * 1000);
UiThreadHandler.postDelayed(marker::remove, showTime * 1000);
}
//根据识别物类型 (行人1/自行车2/摩托车4/骑行车辆11)获取3D模型(对应查看getModelRes)
/**
* 根据识别物类型 (行人1/自行车2/摩托车4/骑行车辆11)获取3D模型(对应查看getModelRes)
*
* @param dataType 数据类型
* @return 做完映射后的数据类型
*/
private int modeResType(int dataType) {
switch (dataType) {
case 1:
@@ -72,6 +76,13 @@ public class V2XWarnDataDrawer extends BaseDrawer {
return 1;
}
/**
* 绘制3D元素
*
* @param markerShowEntity 要展示的3d数据类型
* @param modeResType
* @return
*/
public IMogoMarker drawMarker(MarkerShowEntity markerShowEntity, int modeResType) {
MogoMarkerOptions options = new MogoMarkerOptions()
.data(markerShowEntity)
@@ -90,6 +101,13 @@ public class V2XWarnDataDrawer extends BaseDrawer {
return marker;
}
/**
* 绘制箭头
* @param location
* @param markerType
* @param type
* @param rotate
*/
public void drawerArrowsMarkerWithLocation(MogoLatLng location, String markerType, int type, int rotate) {
MogoMarkerOptions options = new MogoMarkerOptions()
.latitude(location.getLat())

View File

@@ -70,7 +70,9 @@ public class MapFragment extends MvpFragment<MapView, MapPresenter>
@Override
public void stepInVrMode(boolean isDayMode) {
try {
if (mMogoMapView != null && mMogoMapView.getMap() != null && mMogoMapView.getMap().getUIController() != null) {
if (mMogoMapView != null
&& mMogoMapView.getMap() != null
&& mMogoMapView.getMap().getUIController() != null) {
mMogoMapView.getMap().getUIController().stepInVrMode(isDayMode);
}
} catch (Exception e) {

View File

@@ -1,26 +0,0 @@
package com.mogo.eagle.core.function.api.map;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.map.IDestroyable;
/**
* @author congtaowang
* @since 2020/10/23
* <p>
* 地图图层切换:高德地图 <-> 自研地图,过渡期使用
*/
public interface IMogoMapFrameController extends IProvider, IDestroyable {
void initDelegate(IMogoMapFrameController controller);
/**
* 切换到高德2D
*/
void changeTo2dMode();
/**
* 切换到自研vr
* @param isNightMode true-夜间模式false-白天模式
*/
void stepInVrMode(boolean isNightMode);
}

View File

@@ -29,23 +29,6 @@ public interface IMogoMapService extends IProvider {
*/
IMogoLocationClient getSingletonLocationClient(Context context);
/**
* 地理编码或逆地理编码服务
*
* @param context
* @return
*/
IMogoGeoSearch getGeoSearch(Context context);
/**
* poi搜索服务
*
* @param context
* @param query
* @return
*/
IMogoPoiSearch getPoiSearch(Context context, MogoPoiSearchQuery query);
/**
* marker 操作
*

View File

@@ -35,6 +35,13 @@ public interface IMogoMarkerService {
*/
void renderStopLineMarker(double lon, double lat);
/**
* 绘制箭头
* @param location
* @param markerType
* @param type
* @param rotate
*/
void drawerArrowsMarkerWithLocation(MogoLatLng location, String markerType, int type, int rotate);
/**

View File

@@ -30,7 +30,13 @@ public interface IMogoSmallMapProvider {
*/
void clearPolyline();
/**
* 查询全揽模式下V2X事件
*/
default void startQueryV2XEvents() {}
/**
* 清除V2X事件
*/
default void clearV2XMarkers() {}
}

View File

@@ -7,7 +7,7 @@ import mogo.telematics.pad.MessagePad
/**
* PNC 决策行为相关监听
*/
object CallerAutopilotPlanningActionsListenerManager : CallerBase<IMoGoAutopilotPlanningActionsListener>() {
object CallerPlanningActionsListenerManager : CallerBase<IMoGoAutopilotPlanningActionsListener>() {
/**
* pnc actions 决策回调

View File

@@ -37,7 +37,10 @@ public class AutopilotStatistics {
*/
public final MogoReportMsg.MogoReportMessage failedMessage;
public AutopilotStatistics(@Define.AutopilotStartStatus int status, long usedTime, MessagePad.SetAutopilotModeReq req, MogoReportMsg.MogoReportMessage failedMessage) {
public AutopilotStatistics(@Define.AutopilotStartStatus int status,
long usedTime,
MessagePad.SetAutopilotModeReq req,
MogoReportMsg.MogoReportMessage failedMessage) {
this.status = status;
this.usedTime = usedTime;
this.req = req;

View File

@@ -17,8 +17,6 @@ import android.graphics.Point;
import android.graphics.Rect;
import android.location.Location;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Trace;
import android.text.TextUtils;
import android.util.Log;
@@ -104,7 +102,8 @@ public class AMapViewWrapper implements IMogoMapView,
OnMarkClickListener,
OnMapStyleListener,
OnMapViewVisualAngleChangeListener,
OnRoadInfoListener, ILog {
OnRoadInfoListener,
ILog {
private static final String TAG = "AMapViewWrapper";
private final MapAutoView mMapView;
@@ -123,7 +122,9 @@ public class AMapViewWrapper implements IMogoMapView,
private boolean mIsFirstLocated = true;
private boolean mIsDelayed = false;
private final LocationListener mGpsLocationListener = location -> CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(ObjectUtils.fromLocation(location), 0, true);
// GPS 位置回调
private final LocationListener mGpsLocationListener =
location -> CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(ObjectUtils.fromLocation(location), 0, true);
public AMapViewWrapper(MapAutoView mMapView) {
CallerLogger.INSTANCE.i(M_MAP + TAG, "autoop--AMapViewWrapper: init");
@@ -429,7 +430,6 @@ public class AMapViewWrapper implements IMogoMapView,
}
/**
*
* @return true-是false=不是
*/
private boolean isVrMold() {