Merge branch 'dev_arch_opt_3.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0

# Conflicts:
#	OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/presenter/BaseBusPassengerPresenter.java
#	OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperOrderModel.java
#	app/src/main/AndroidManifest.xml
This commit is contained in:
yangyakun
2023-02-02 21:01:24 +08:00
123 changed files with 1161 additions and 931 deletions

View File

@@ -1,6 +1,6 @@
package com.mogo.och.bus.passenger.callback; package com.mogo.och.bus.passenger.callback;
import mogo.telematics.pad.MessagePad; import com.mogo.eagle.core.data.map.MogoLocation;
/** /**
* Created on 2022/3/31 * Created on 2022/3/31
@@ -11,5 +11,5 @@ public interface IBusPassengerControllerStatusCallback {
// 是否vr map模式 // 是否vr map模式
void onVRModeChanged(boolean isVRMode); void onVRModeChanged(boolean isVRMode);
// 自车定位 // 自车定位
void onCarLocationChanged(MessagePad.GnssInfo location); void onCarLocationChanged(MogoLocation location);
} }

View File

@@ -89,7 +89,7 @@ public class BusPassengerModel {
private IBusPassegerDriverStatusCallback mDriverStatusCallback; //出车收车状态 private IBusPassegerDriverStatusCallback mDriverStatusCallback; //出车收车状态
private IBusPassengerRouteLineInfoCallback mRouteLineInfoCallback; // bus路线信息更新 private IBusPassengerRouteLineInfoCallback mRouteLineInfoCallback; // bus路线信息更新
private MessagePad.GnssInfo mLocation = null; private MogoLocation mLocation = null;
private BusPassengerRoutesResult routesResult = null; private BusPassengerRoutesResult routesResult = null;
@@ -321,7 +321,7 @@ public class BusPassengerModel {
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() { private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
if (null == gnssInfo) return; if (null == gnssInfo) return;
mLocation = gnssInfo; mLocation = gnssInfo;
for (IBusPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){ for (IBusPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){

View File

@@ -1,5 +1,7 @@
package com.mogo.och.bus.passenger.presenter; package com.mogo.och.bus.passenger.presenter;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
import android.os.Looper; import android.os.Looper;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@@ -8,6 +10,7 @@ import androidx.lifecycle.LifecycleOwner;
import com.amap.api.maps.model.LatLng; import com.amap.api.maps.model.LatLng;
import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.mvp.Presenter; import com.mogo.commons.mvp.Presenter;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -22,10 +25,6 @@ import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment;
import java.util.List; import java.util.List;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
import mogo.telematics.pad.MessagePad;
/** /**
* Created on 2022/3/31 * Created on 2022/3/31
*/ */
@@ -110,7 +109,7 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
} }
@Override @Override
public void onCarLocationChanged(MessagePad.GnssInfo location) { public void onCarLocationChanged(MogoLocation location) {
if (location != null){ if (location != null){
runOnUIThread(() -> mView.onCarLocationChanged(location)); runOnUIThread(() -> mView.onCarLocationChanged(location));
} }
@@ -132,7 +131,7 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
} }
@Override @Override
public void updateStationsInfo(List<BusPassengerStation> stations, int currentStationIndex, boolean isArrived) { public void updateStationsInfo(List<BusPassengerStation> stations,int currentStationIndex,boolean isArrived) {
runOnUIThread(() -> mView.updateStationsInfo(stations,currentStationIndex, isArrived)); runOnUIThread(() -> mView.updateStationsInfo(stations,currentStationIndex, isArrived));
} }

View File

@@ -27,6 +27,7 @@ import com.amap.api.maps.model.Marker;
import com.amap.api.maps.model.MarkerOptions; import com.amap.api.maps.model.MarkerOptions;
import com.amap.api.maps.model.Polyline; import com.amap.api.maps.model.Polyline;
import com.amap.api.maps.model.PolylineOptions; import com.amap.api.maps.model.PolylineOptions;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
@@ -37,8 +38,6 @@ import com.mogo.och.bus.passenger.utils.BusPassengerMapAssetStyleUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import mogo.telematics.pad.MessagePad;
/** /**
* 乘客屏小地图 * 乘客屏小地图
*/ */
@@ -175,7 +174,7 @@ public class BusPassengerMapDirectionView
} }
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
if (gnssInfo == null) { if (gnssInfo == null) {
return; return;
} }

View File

@@ -16,7 +16,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.amap.api.maps.model.LatLng; import com.amap.api.maps.model.LatLng;
import com.elegant.utils.UiThreadHandler; import com.elegant.utils.UiThreadHandler;
import com.mogo.commons.debug.DebugConfig; import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.och.bus.passenger.R; import com.mogo.och.bus.passenger.R;
@@ -32,8 +32,6 @@ import com.mogo.och.common.module.wigets.MarqueeTextView;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import mogo.telematics.pad.MessagePad;
/** /**
* @author: wangmingjun * @author: wangmingjun
* @date: 2022/4/12 * @date: 2022/4/12
@@ -299,8 +297,8 @@ public class BusPassengerRouteFragment extends
lastBearing = bearing; lastBearing = bearing;
} }
public void onCarLocationChanged(MessagePad.GnssInfo location) { public void onCarLocationChanged(MogoLocation location) {
updateSpeedView((float) location.getVehicleSpeed()); updateSpeedView((float) location.getGnssSpeed());
} }
public void updateSpeedView(float speed){ public void updateSpeedView(float speed){

View File

@@ -24,10 +24,11 @@ import com.mogo.commons.module.status.StatusDescriptor;
import com.mogo.eagle.core.data.BaseData; import com.mogo.eagle.core.data.BaseData;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
@@ -377,7 +378,7 @@ public class OrderModel {
// 自车定位 // 自车定位
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() { private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
if (null == gnssInfo) return; if (null == gnssInfo) return;
mLongitude = gnssInfo.getLongitude(); mLongitude = gnssInfo.getLongitude();
mLatitude = gnssInfo.getLatitude(); mLatitude = gnssInfo.getLatitude();
@@ -393,7 +394,7 @@ public class OrderModel {
}; };
//根据围栏判断,是否到达站点 //根据围栏判断,是否到达站点
private void judgeArrivedStation(MessagePad.GnssInfo location) { private void judgeArrivedStation(MogoLocation location) {
if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) { if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) {
CallerLogger.INSTANCE.e(M_BUS + TAG, "到站数组越界"); CallerLogger.INSTANCE.e(M_BUS + TAG, "到站数组越界");
@@ -634,7 +635,7 @@ public class OrderModel {
return; return;
} }
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters); CallerAutoPilotControlManager.INSTANCE.startAutoPilot(parameters);
CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-开启自动驾驶====" + GsonUtil.jsonFromObject(parameters) CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-开启自动驾驶====" + GsonUtil.jsonFromObject(parameters)
+ " startLatLon=" + parameters.startName + "endLatLon=" + parameters.endName + + " startLatLon=" + parameters.startName + "endLatLon=" + parameters.endName +
@@ -778,8 +779,8 @@ public class OrderModel {
public void closeBeautificationMode() { public void closeBeautificationMode() {
if (FunctionBuildConfig.isDemoMode) {//收车结束美化 if (FunctionBuildConfig.isDemoMode) {//收车结束美化
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; //是否强制绘制引导线 FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; //是否强制绘制引导线
CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(false);// 同步给乘客屏 CallerAutoPilotControlManager.INSTANCE.setIgnoreConditionDraw(false);// 同步给乘客屏
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false);//是否自动启动自驾 CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(false);//是否自动启动自驾
CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为false"); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为false");
} }
} }
@@ -861,7 +862,7 @@ public class OrderModel {
CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为true每次滑动出发"); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为true每次滑动出发");
} else if (backgroundCurrentStationIndex > 0 && backgroundCurrentStationIndex < stationList.size() - 1) { } else if (backgroundCurrentStationIndex > 0 && backgroundCurrentStationIndex < stationList.size() - 1) {
//美化模式下 中间站点到站 引导线要一直绘制所以此处不出强制绘制不传false //美化模式下 中间站点到站 引导线要一直绘制所以此处不出强制绘制不传false
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(false);
CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignorefalse到达中间站"); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignorefalse到达中间站");
clearStartAutopilotTag(); clearStartAutopilotTag();
} else { } else {
@@ -952,8 +953,8 @@ public class OrderModel {
private void startBeautificationMode() { private void startBeautificationMode() {
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true;
CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(true); CallerAutoPilotControlManager.INSTANCE.setIgnoreConditionDraw(true);
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(true); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(true);
} }
public void clearBusStationDatas() { public void clearBusStationDatas() {
@@ -992,7 +993,7 @@ public class OrderModel {
return; return;
} }
CallerLogger.INSTANCE.d(M_BUS + TAG, "单程结束===="); CallerLogger.INSTANCE.d(M_BUS + TAG, "单程结束====");
CallerAutoPilotManager.INSTANCE.cancelAutoPilot(); CallerAutoPilotControlManager.INSTANCE.cancelAutoPilot();
endTask(); endTask();
} }

View File

@@ -2,8 +2,6 @@ package com.mogo.och.bus.callback;
import com.mogo.eagle.core.data.map.MogoLocation; import com.mogo.eagle.core.data.map.MogoLocation;
import mogo.telematics.pad.MessagePad;
/** /**
* Created on 2021/9/10 * Created on 2021/9/10
* *
@@ -13,7 +11,7 @@ public interface IBusControllerStatusCallback {
// 是否vr map模式 // 是否vr map模式
void onVRModeChanged(boolean isVRMode); void onVRModeChanged(boolean isVRMode);
// 自车定位 // 自车定位
void onCarLocationChanged(MessagePad.GnssInfo location); void onCarLocationChanged(MogoLocation location);
//开始开启自动驾驶 //开始开启自动驾驶
void startOpenAutopilot(); void startOpenAutopilot();
} }

View File

@@ -233,9 +233,9 @@ public class BusPresenter extends Presenter<BusFragment>
} }
@Override @Override
public void onCarLocationChanged(MessagePad.GnssInfo location) { public void onCarLocationChanged(MogoLocation location) {
if (null != location) { if (null != location) {
runOnUIThread(() -> mView.updateSpeedView((float) location.getVehicleSpeed())); runOnUIThread(() -> mView.updateSpeedView((float) location.getGnssSpeed()));
} }
} }

View File

@@ -1,6 +1,6 @@
package com.mogo.och.bus.util package com.mogo.och.bus.util
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
@@ -31,6 +31,6 @@ object BusSendTripInfoManager{
d(SceneConstant.M_BUS + "BusSendTripInfoManager", "type: "+ type d(SceneConstant.M_BUS + "BusSendTripInfoManager", "type: "+ type
+", lineName: "+ lineName +", departureStopName: "+ departureStopName +", lineName: "+ lineName +", departureStopName: "+ departureStopName
+ ", arrivalStopName: "+arrivalStopName+", isLastStop: "+isLastStop) + ", arrivalStopName: "+arrivalStopName+", isLastStop: "+isLastStop)
CallerAutoPilotManager.sendTripInfo(type,lineName,departureStopName, arrivalStopName, isLastStop) CallerAutoPilotControlManager.sendTripInfo(type,lineName,departureStopName, arrivalStopName, isLastStop)
} }
} }

View File

@@ -3,7 +3,7 @@ package com.mogo.och.bus.util;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.GsonUtils; import com.mogo.eagle.core.utilcode.util.GsonUtils;
import com.mogo.och.bus.bean.BusRoutesResult; import com.mogo.och.bus.bean.BusRoutesResult;
@@ -198,7 +198,7 @@ public class BusTrajectoryManager {
// mAutoPilotLine.setTimestamp(1654761600000L); //20220609 16:00 // mAutoPilotLine.setTimestamp(1654761600000L); //20220609 16:00
// mAutoPilotLine.setVehicleModel("红旗H9"); // mAutoPilotLine.setVehicleModel("红旗H9");
CallerAutoPilotManager.INSTANCE.sendTrajectoryDownloadReq(mAutoPilotLine); CallerAutoPilotControlManager.INSTANCE.sendTrajectoryDownloadReq(mAutoPilotLine);
CallerLogger.INSTANCE.d(M_BUS + TAG, "sendTrajectoryReq(): " CallerLogger.INSTANCE.d(M_BUS + TAG, "sendTrajectoryReq(): "
+ GsonUtils.toJson(mAutoPilotLine)); + GsonUtils.toJson(mAutoPilotLine));
} }

View File

@@ -3,6 +3,7 @@ package com.mogo.och.common.module.biz.model
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import com.mogo.eagle.core.data.BaseData import com.mogo.eagle.core.data.BaseData
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.utilcode.util.NetworkUtils import com.mogo.eagle.core.utilcode.util.NetworkUtils
@@ -17,7 +18,6 @@ import com.mogo.och.common.module.biz.constant.TaxiLoginStatusEnum
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
import com.mogo.och.common.module.biz.network.OchCommonServiceManager import com.mogo.och.common.module.biz.network.OchCommonServiceManager
import com.mogo.och.common.module.utils.ToastUtilsOch import com.mogo.och.common.module.utils.ToastUtilsOch
import mogo.telematics.pad.MessagePad
/** /**
* Created by pangfan on 2021/8/19 * Created by pangfan on 2021/8/19
@@ -46,7 +46,7 @@ object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
return true return true
} }
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) { override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
gnssInfo?.let { gnssInfo?.let {
mLongitude = it.longitude mLongitude = it.longitude
mLatitude = it.latitude mLatitude = it.latitude

View File

@@ -192,7 +192,7 @@ public class CoordinateCalculateRouteUtil {
for (MessagePad.Location m : models) { for (MessagePad.Location m : models) {
LatLng mogoLatLng = coordinateConverterWgsToGcj(mContext, m); LatLng mogoLatLng = coordinateConverterWgsToGcj(mContext, m);
MogoLocation location = new MogoLocation(); MogoLocation location = new MogoLocation();
location.setBearing((float) m.getHeading()); location.setHeading((float) m.getHeading());
location.setLatitude(mogoLatLng.latitude); location.setLatitude(mogoLatLng.latitude);
location.setLongitude(mogoLatLng.longitude); location.setLongitude(mogoLatLng.longitude);
list.add(location); list.add(location);
@@ -231,7 +231,7 @@ public class CoordinateCalculateRouteUtil {
*/ */
public static Map<Integer,List<MogoLocation>> getRemainPointListByCompareNew(int preIndex, public static Map<Integer,List<MogoLocation>> getRemainPointListByCompareNew(int preIndex,
List<MogoLocation> mRoutePoints, List<MogoLocation> mRoutePoints,
MessagePad.GnssInfo realLocation) { MogoLocation realLocation) {
Map<Integer,List<MogoLocation>> routePonits = new HashMap<>(); Map<Integer,List<MogoLocation>> routePonits = new HashMap<>();
List<MogoLocation> latePoints = new ArrayList<>(); // 剩余轨迹集合 List<MogoLocation> latePoints = new ArrayList<>(); // 剩余轨迹集合
int currentIndex = 0; //记录疑似点 int currentIndex = 0; //记录疑似点
@@ -245,8 +245,8 @@ public class CoordinateCalculateRouteUtil {
for (int i= 0; i < mRoutePoints.size(); i++){ for (int i= 0; i < mRoutePoints.size(); i++){
MogoLocation latLng = mRoutePoints.get(i); MogoLocation latLng = mRoutePoints.get(i);
//todo 先看index对应点的方向和realLocation方向是否一致 方向角度不能过90度 //todo 先看index对应点的方向和realLocation方向是否一致 方向角度不能过90度
if (realLocation.getHeading() == realLocation.getHeading() - latLng.getBearing() || if (realLocation.getHeading() == realLocation.getHeading() - latLng.getHeading() ||
Math.abs(realLocation.getHeading() - latLng.getBearing()) <= 90){ Math.abs(realLocation.getHeading() - latLng.getHeading()) <= 90){
float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(), float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
realLocation.getLatitude(), realLocation.getLatitude(),
latLng.getLongitude(),latLng.getLatitude()); latLng.getLongitude(),latLng.getLatitude());
@@ -276,7 +276,7 @@ public class CoordinateCalculateRouteUtil {
} }
public static int getArrivedPointIndexNew(int preIndex, List<MogoLocation> mRoutePoints, public static int getArrivedPointIndexNew(int preIndex, List<MogoLocation> mRoutePoints,
MessagePad.GnssInfo realLocation) { MogoLocation realLocation) {
int currentIndex = 0; //记录疑似点 //基础点 int currentIndex = 0; //记录疑似点 //基础点
MogoLocation baseLatLng = mRoutePoints.get(0); MogoLocation baseLatLng = mRoutePoints.get(0);
float baseDiffDis = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(), float baseDiffDis = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
@@ -285,8 +285,8 @@ public class CoordinateCalculateRouteUtil {
for (int i = 0; i < mRoutePoints.size(); i++) { for (int i = 0; i < mRoutePoints.size(); i++) {
MogoLocation latLng = mRoutePoints.get(i); MogoLocation latLng = mRoutePoints.get(i);
if (realLocation.getHeading() == realLocation.getHeading() - latLng.getBearing() || if (realLocation.getHeading() == realLocation.getHeading() - latLng.getHeading() ||
Math.abs(realLocation.getHeading() - latLng.getBearing()) <= 90){ Math.abs(realLocation.getHeading() - latLng.getHeading()) <= 90){
float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(), float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
realLocation.getLatitude(), realLocation.getLatitude(),
latLng.getLongitude(), latLng.getLatitude()); latLng.getLongitude(), latLng.getLatitude());

View File

@@ -1,6 +1,6 @@
package com.mogo.och.sweeper.callback; package com.mogo.och.sweeper.callback;
import mogo.telematics.pad.MessagePad; import com.mogo.eagle.core.data.map.MogoLocation;
/** /**
* Created on 2021/9/10 * Created on 2021/9/10
@@ -11,7 +11,7 @@ public interface ISweeperControllerStatusCallback {
// 是否vr map模式 // 是否vr map模式
void onVRModeChanged(boolean isVRMode); void onVRModeChanged(boolean isVRMode);
// 自车定位 // 自车定位
void onCarLocationChanged(MessagePad.GnssInfo location); void onCarLocationChanged(MogoLocation location);
//开始开启自动驾驶 //开始开启自动驾驶
void startOpenAutopilot(); void startOpenAutopilot();
} }

View File

@@ -19,9 +19,10 @@ import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.BaseData; import com.mogo.eagle.core.data.BaseData;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
@@ -273,7 +274,7 @@ public class SweeperOrderModel {
// 自车定位 // 自车定位
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() { private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
if (null == gnssInfo) return; if (null == gnssInfo) return;
mLongitude = gnssInfo.getLongitude(); mLongitude = gnssInfo.getLongitude();
mLatitude = gnssInfo.getLatitude(); mLatitude = gnssInfo.getLatitude();
@@ -289,7 +290,7 @@ public class SweeperOrderModel {
}; };
//根据围栏判断,是否到达起点 //根据围栏判断,是否到达起点
private void judgeStartStation(MessagePad.GnssInfo location) { private void judgeStartStation(MogoLocation location) {
if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) { if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) {
return; return;
@@ -390,7 +391,7 @@ public class SweeperOrderModel {
CallerLogger.INSTANCE.d(M_BUS + TAG, "单程真的结束了===="); CallerLogger.INSTANCE.d(M_BUS + TAG, "单程真的结束了====");
isGoingToNextStation = false; isGoingToNextStation = false;
backgroundCurrentStationIndex = 0; backgroundCurrentStationIndex = 0;
CallerAutoPilotManager.INSTANCE.cancelAutoPilot(); CallerAutoPilotControlManager.INSTANCE.cancelAutoPilot();
querySweeperRoutes(); querySweeperRoutes();
} }
} }
@@ -423,7 +424,7 @@ public class SweeperOrderModel {
return; return;
} }
isGoingToNextStation = true; isGoingToNextStation = true;
AIAssist.getInstance(mContext).speakTTSVoice("欢迎乘坐’蘑菇车联‘自动驾驶小巴车,请您坐好,注意乘车安全,行程即将开始"); AIAssist.getInstance(mContext).speakTTSVoice("欢迎乘坐’蘑菇车联‘无人驾驶小巴车,请您坐好,注意乘车安全,行程即将开始");
} }
/** /**
@@ -467,7 +468,7 @@ public class SweeperOrderModel {
// CallerLogger.INSTANCE.d( M_BUS + TAG, "开启自动驾驶====" + GsonUtil.jsonFromObject(parameters) // CallerLogger.INSTANCE.d( M_BUS + TAG, "开启自动驾驶====" + GsonUtil.jsonFromObject(parameters)
// +" startLatLon="+currentStation.getName()+"endLatLon="+nextStation.getName()); // +" startLatLon="+currentStation.getName()+"endLatLon="+nextStation.getName());
CallerLogger.INSTANCE.d(M_BUS + TAG, "开启自动驾驶====" + GsonUtil.jsonFromObject(parameters)); CallerLogger.INSTANCE.d(M_BUS + TAG, "开启自动驾驶====" + GsonUtil.jsonFromObject(parameters));
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters); CallerAutoPilotControlManager.INSTANCE.startAutoPilot(parameters);
if (mControllerStatusCallback != null) { if (mControllerStatusCallback != null) {
mControllerStatusCallback.startOpenAutopilot(); mControllerStatusCallback.startOpenAutopilot();
@@ -553,7 +554,7 @@ public class SweeperOrderModel {
private void closeBeautificationMode() { private void closeBeautificationMode() {
if (FunctionBuildConfig.isDemoMode) {//收车结束美化 if (FunctionBuildConfig.isDemoMode) {//收车结束美化
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false;
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(false);
CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为false收车"); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为false收车");
} }
} }
@@ -676,7 +677,7 @@ public class SweeperOrderModel {
&& backgroundCurrentStationIndex <= stationList.size() - 1) && backgroundCurrentStationIndex <= stationList.size() - 1)
&& stationList.get(backgroundCurrentStationIndex).isLeaving()) {//行驶过程中设置美化 && stationList.get(backgroundCurrentStationIndex).isLeaving()) {//行驶过程中设置美化
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true;
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(true); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(true);
CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为true每次滑动出发"); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为true每次滑动出发");
} }
@@ -794,8 +795,8 @@ public class SweeperOrderModel {
return; return;
} }
CallerLogger.INSTANCE.d(M_BUS + TAG, "单程结束===="); CallerLogger.INSTANCE.d(M_BUS + TAG, "单程结束====");
CallerAutoPilotManager.INSTANCE.cancelAutoPilot(); CallerAutoPilotControlManager.INSTANCE.cancelAutoPilot();
AIAssist.getInstance(mContext).speakTTSVoice("感谢您体验'蘑菇车联'自动驾驶小巴车,请您携带好随身物品,我们下次再见"); AIAssist.getInstance(mContext).speakTTSVoice("感谢您体验'蘑菇车联'无人驾驶小巴车,请您携带好随身物品,我们下次再见");
leaveStation(true, true); leaveStation(true, true);
} }
@@ -819,7 +820,7 @@ public class SweeperOrderModel {
if (FunctionBuildConfig.isDemoMode && backgroundCurrentStationIndex <= stationList.size() - 1) {//到达一站结束美化 if (FunctionBuildConfig.isDemoMode && backgroundCurrentStationIndex <= stationList.size() - 1) {//到达一站结束美化
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false;
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(false);
CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为false到最后一站"); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore置为false到最后一站");
} }
CallerLogger.INSTANCE.d(M_BUS + TAG, "到站====currentStationIndex=" + backgroundCurrentStationIndex); CallerLogger.INSTANCE.d(M_BUS + TAG, "到站====currentStationIndex=" + backgroundCurrentStationIndex);

View File

@@ -11,6 +11,7 @@ import androidx.lifecycle.LifecycleOwner;
import com.mogo.commons.mvp.Presenter; import com.mogo.commons.mvp.Presenter;
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
@@ -237,9 +238,9 @@ public class SweeperPresenter extends Presenter<SweeperFragment>
} }
@Override @Override
public void onCarLocationChanged(MessagePad.GnssInfo location) { public void onCarLocationChanged(MogoLocation location) {
if (null != location) { if (null != location) {
runOnUIThread(() -> mView.updateSpeedView((float) location.getVehicleSpeed())); runOnUIThread(() -> mView.updateSpeedView((float) location.getGnssSpeed()));
} }
} }

View File

@@ -27,7 +27,7 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianCleanSystemListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianCleanSystemListenerManager;
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener; import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
import com.mogo.eagle.core.utilcode.util.ThreadUtils; import com.mogo.eagle.core.utilcode.util.ThreadUtils;
@@ -39,7 +39,6 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import chassis.Chassis;
import chassis.ChassisStatesOuterClass; import chassis.ChassisStatesOuterClass;
import chassis.SpecialVehicleTaskCmdOuterClass; import chassis.SpecialVehicleTaskCmdOuterClass;
@@ -942,7 +941,7 @@ public class SweeperOperatePanelView extends LinearLayout {
// onSendCmd // onSendCmd
mCurrentCmdRequestCallback.onSendCmd(); mCurrentCmdRequestCallback.onSendCmd();
// 发送命令 // 发送命令
CallerAutoPilotManager.INSTANCE.sendSweeperFuTianTaskCmd(fuTianCleanCmd); CallerAutoPilotControlManager.INSTANCE.sendSweeperFuTianTaskCmd(fuTianCleanCmd);
// log发送命令 // log发送命令
logSweeperCmdValue(fuTianCleanCmd); logSweeperCmdValue(fuTianCleanCmd);
// 开启倒计时 // 开启倒计时

View File

@@ -3,7 +3,7 @@ package com.mogo.och.sweeper.util;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.GsonUtils; import com.mogo.eagle.core.utilcode.util.GsonUtils;
import com.mogo.och.sweeper.bean.SweeperRoutesResult; import com.mogo.och.sweeper.bean.SweeperRoutesResult;
@@ -197,7 +197,7 @@ public class SweeperTrajectoryManager {
// mAutoPilotLine.setTimestamp(1654761600000L); //20220609 16:00 // mAutoPilotLine.setTimestamp(1654761600000L); //20220609 16:00
// mAutoPilotLine.setVehicleModel("红旗H9"); // mAutoPilotLine.setVehicleModel("红旗H9");
CallerAutoPilotManager.INSTANCE.sendTrajectoryDownloadReq(mAutoPilotLine); CallerAutoPilotControlManager.INSTANCE.sendTrajectoryDownloadReq(mAutoPilotLine);
CallerLogger.INSTANCE.d(M_BUS + TAG, "sendTrajectoryReq(): " CallerLogger.INSTANCE.d(M_BUS + TAG, "sendTrajectoryReq(): "
+ GsonUtils.toJson(mAutoPilotLine)); + GsonUtils.toJson(mAutoPilotLine));
} }

View File

@@ -1,6 +1,6 @@
package com.mogo.och.taxi.passenger.callback; package com.mogo.och.taxi.passenger.callback;
import mogo.telematics.pad.MessagePad; import com.mogo.eagle.core.data.map.MogoLocation;
/** /**
* Created on 2021/9/10 * Created on 2021/9/10
@@ -11,5 +11,5 @@ public interface IOCHTaxiPassengerControllerStatusCallback {
// 是否vr map模式 // 是否vr map模式
void onVRModeChanged(boolean isVRMode); void onVRModeChanged(boolean isVRMode);
// 自车定位 // 自车定位
void onCarLocationChanged(MessagePad.GnssInfo location); void onCarLocationChanged(MogoLocation location);
} }

View File

@@ -32,7 +32,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener; import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener;
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener; import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
@@ -128,7 +128,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
private int delayTime = 2; private int delayTime = 2;
private double mLongitude, mLatitude; private double mLongitude, mLatitude;
private MessagePad.GnssInfo mLocation = null; private MogoLocation mLocation = null;
private List<MogoLocation> mLocationsModels = new ArrayList<>(); private List<MogoLocation> mLocationsModels = new ArrayList<>();
@@ -436,7 +436,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
} }
// TODO: 2021/9/12 // TODO: 2021/9/12
public void calculateTravelDistance(MessagePad.GnssInfo carLocation){ public void calculateTravelDistance(MogoLocation carLocation){
if (checkCurrentOCHOrder() && mCurrentOCHOrder.endSiteGcjPoint.size()>0) { if (checkCurrentOCHOrder() && mCurrentOCHOrder.endSiteGcjPoint.size()>0) {
double endLon = mCurrentOCHOrder.endSiteGcjPoint.get(0); double endLon = mCurrentOCHOrder.endSiteGcjPoint.get(0);
double endLat = mCurrentOCHOrder.endSiteGcjPoint.get(1); double endLat = mCurrentOCHOrder.endSiteGcjPoint.get(1);
@@ -477,7 +477,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
// 自车定位 // 自车定位
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() { private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
//位置变化时通过围栏判断是否到达x点 //位置变化时通过围栏判断是否到达x点
if (null == gnssInfo) return; if (null == gnssInfo) return;
if (checkCurrentOCHOrder()) { if (checkCurrentOCHOrder()) {
@@ -973,7 +973,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
return; return;
} }
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters); CallerAutoPilotControlManager.INSTANCE.startAutoPilot(parameters);
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "start autopilot with parameter: %s" CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "start autopilot with parameter: %s"
, GsonUtil.jsonFromObject(parameters) , GsonUtil.jsonFromObject(parameters)
+ " ,startSiteName=" + mCurrentOCHOrder.startSiteAddr + " ,startSiteName=" + mCurrentOCHOrder.startSiteAddr

View File

@@ -122,7 +122,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
} }
@Override @Override
public void onCarLocationChanged(MessagePad.GnssInfo location) { public void onCarLocationChanged(MogoLocation location) {
// 速度不用展示 // 速度不用展示
// LeftMenuOpen.INSTANCE.callCallBack(-1,-1,location.getSpeed()); // LeftMenuOpen.INSTANCE.callCallBack(-1,-1,location.getSpeed());
} }

View File

@@ -11,6 +11,7 @@ import androidx.lifecycle.LifecycleOwner;
import com.amap.api.maps.model.LatLng; import com.amap.api.maps.model.LatLng;
import com.mogo.commons.mvp.Presenter; import com.mogo.commons.mvp.Presenter;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.network.utils.GsonUtil; import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -139,7 +140,7 @@ public class TaxiPassengerServingOrderPresenter extends Presenter<TaxiPassengerS
private static final long TIMEINTERVAL = 4000; private static final long TIMEINTERVAL = 4000;
@Override @Override
public void onCarLocationChanged(MessagePad.GnssInfo location) { public void onCarLocationChanged(MogoLocation location) {
if (location != null){ if (location != null){
runOnUIThread(() -> mView.onCarLocationChanged(location)); runOnUIThread(() -> mView.onCarLocationChanged(location));
long currentTimeMillis = System.currentTimeMillis(); long currentTimeMillis = System.currentTimeMillis();

View File

@@ -0,0 +1,66 @@
package com.mogo.och.taxi.passenger.ui
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.mogo.commons.mvp.BaseFragment
import com.mogo.eagle.core.function.overview.view.OverMapView
class OverviewFragment : BaseFragment() {
private var overmapview:OverMapView?=null
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
if (overmapview == null) {
overmapview = OverMapView(requireContext())
} else {
val viewGroup = overmapview?.parent as ViewGroup
viewGroup.removeView(overmapview)
}
overmapview?.onCreateView(savedInstanceState)
return overmapview!!
}
override fun onResume() {
super.onResume()
overmapview?.onResume()
}
override fun onPause() {
super.onPause()
overmapview?.onPause()
}
override fun onDestroy() {
super.onDestroy()
overmapview?.onDestroy()
}
override fun getLayoutId(): Int {
return 0
}
override fun getTagName(): String {
return TAG
}
override fun initViews() {
}
companion object{
private const val TAG = "OverviewFragment"
@JvmStatic
fun newInstance(): OverviewFragment {
val args = Bundle()
val fragment = OverviewFragment()
fragment.arguments = args
return fragment
}
}
}

View File

@@ -61,6 +61,8 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
private WeakReference<TaxiPassengerCheckView> mArrivedCheckView; private WeakReference<TaxiPassengerCheckView> mArrivedCheckView;
private WeakReference<TaxiPassengerStartAutopilotView> mStartAutopilotView; private WeakReference<TaxiPassengerStartAutopilotView> mStartAutopilotView;
protected TaxiPassengerServingOrderFragment ochServingOrderFragment = null; protected TaxiPassengerServingOrderFragment ochServingOrderFragment = null;
protected OverviewFragment overviewFragment = null;
//消息盒子 //消息盒子
private PassengerMsgBoxButtonView viewPassengerMsgBoxButton; private PassengerMsgBoxButtonView viewPassengerMsgBoxButton;
private PassengerMsgBoxBubbleView viewPassengerMsgBoxBubble; private PassengerMsgBoxBubbleView viewPassengerMsgBoxBubble;
@@ -149,6 +151,12 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
} }
//OverlayLeftViewUtils.INSTANCE.dismissOverlayView(); //OverlayLeftViewUtils.INSTANCE.dismissOverlayView();
}); });
findViewById(R.id.iv_temp).setOnClickListener(view -> {
OverlayLeftViewUtils.INSTANCE.showOverlayView(getActivity(),0,true,-1,true);
//showOrHideArrivedEndLayout(true, "北京北京北京", "1527481606997577728");
//showOrHidePressengerCheckPager(true, "开始站点开", "开始站点开始站点开始", "2", "京A888888", "18811539480");
//OCHFloatWindowManager.getInstance().ShowFloatWindow(getContext());
});
} }
private void initArrivedView() { private void initArrivedView() {
@@ -258,10 +266,12 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void changeOverview(UIStatus uiStatus) { public void changeOverview(UIStatus uiStatus) {
if (uiStatus.status == UIStatus.LIVE) { if (uiStatus.status == UIStatus.LIVE) {
CallerHmiManager.INSTANCE.hideSmallFragment(); // CallerHmiManager.INSTANCE.hideSmallFragment();
showOrHideOverMapViewFragment(false);
showOrHideServingOrderFragment(true, false); showOrHideServingOrderFragment(true, false);
} else if (uiStatus.status == UIStatus.OVERVIEW) { } else if (uiStatus.status == UIStatus.OVERVIEW) {
CallerHmiManager.INSTANCE.showSmallFragment(); // CallerHmiManager.INSTANCE.showSmallFragment();
showOrHideOverMapViewFragment(true);
showOrHideServingOrderFragment(false, false); showOrHideServingOrderFragment(false, false);
} }
} }
@@ -281,7 +291,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
FragmentTransaction transaction = getChildFragmentManager().beginTransaction(); FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
if (isShow) { if (isShow) {
if (ochServingOrderFragment == null) { if (ochServingOrderFragment == null) {
ochServingOrderFragment = new TaxiPassengerServingOrderFragment().newInstance(); ochServingOrderFragment = TaxiPassengerServingOrderFragment.newInstance();
} }
if (showOrHideLefeMenu) { if (showOrHideLefeMenu) {
OverlayLeftViewUtils.INSTANCE.showOverlayView(getActivity(), 0, true, -1, true); OverlayLeftViewUtils.INSTANCE.showOverlayView(getActivity(), 0, true, -1, true);
@@ -316,6 +326,39 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
} }
} }
/**
* 显示或隐藏全局概览
*
* @param isShow
*/
public void showOrHideOverMapViewFragment(boolean isShow) {
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
if (isShow) {
if (overviewFragment == null) {
overviewFragment = OverviewFragment.newInstance();
}
if (overviewFragment.isHidden()) {
transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.show(overviewFragment).commitAllowingStateLoss();
return;
}
if (overviewFragment.isAdded()) {
transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.show(overviewFragment).commitAllowingStateLoss();
return;
}
transaction
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.add(R.id.fl_container_overview, overviewFragment)
.show(overviewFragment).commitAllowingStateLoss();
} else {
if (overviewFragment != null) {
transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE)
.hide(overviewFragment).commitAllowingStateLoss();
}
}
}
/** /**
* 显示或者隐藏乘客可点击自动驾驶页面 * 显示或者隐藏乘客可点击自动驾驶页面
* 乘客验证成功,页面显示,按钮置于不可点击 * 乘客验证成功,页面显示,按钮置于不可点击

View File

@@ -29,6 +29,7 @@ import com.amap.api.maps.model.MarkerOptions;
import com.amap.api.maps.model.Polyline; import com.amap.api.maps.model.Polyline;
import com.amap.api.maps.model.PolylineOptions; import com.amap.api.maps.model.PolylineOptions;
import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
@@ -39,8 +40,6 @@ import com.mogo.och.taxi.passenger.utils.TaxiPassengerMapAssetStyleUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import mogo.telematics.pad.MessagePad;
/** /**
* 乘客屏小地图 * 乘客屏小地图
*/ */
@@ -180,7 +179,7 @@ public class TaxiPassengerMapDirectionView
} }
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
if (gnssInfo == null){ if (gnssInfo == null){
return; return;
} }

View File

@@ -21,6 +21,7 @@ import androidx.fragment.app.FragmentTransaction;
import com.amap.api.maps.model.LatLng; import com.amap.api.maps.model.LatLng;
import com.mogo.commons.mvp.MvpFragment; import com.mogo.commons.mvp.MvpFragment;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -42,8 +43,6 @@ import com.mogo.och.taxi.passenger.utils.TPRouteDataTestUtils;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; import java.util.List;
import mogo.telematics.pad.MessagePad;
/** /**
* @author: wangmingjun * @author: wangmingjun
* @date: 2022/3/8 * @date: 2022/3/8
@@ -352,8 +351,8 @@ public class TaxiPassengerServingOrderFragment extends
} }
public void onCarLocationChanged(MessagePad.GnssInfo location) { public void onCarLocationChanged(MogoLocation location) {
updateSpeedView((float) location.getVehicleSpeed()); updateSpeedView((float) location.getGnssSpeed());
} }
public void onLimitingVelocityChange(int limitingVelocity) { public void onLimitingVelocityChange(int limitingVelocity) {

View File

@@ -3,15 +3,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:layout_marginTop="@dimen/dp_72">
<com.mogo.eagle.core.function.hmi.ui.widget.SteeringWheelView <com.mogo.eagle.core.function.hmi.ui.widget.SteeringWheelView
android:id="@+id/steering_wheel" android:id="@+id/steering_wheel"
android:layout_width="@dimen/dp_630" android:layout_width="@dimen/dp_630"
android:layout_height="@dimen/dp_630" android:layout_height="@dimen/dp_630"
android:layout_marginLeft="-59dp" android:layout_marginLeft="-59dp"
android:layout_marginTop="-40dp" android:layout_marginTop="@dimen/dp_32"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@@ -21,7 +20,7 @@
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height" android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginLeft="40dp" android:layout_marginLeft="40dp"
android:layout_marginTop="48dp" android:layout_marginTop="@dimen/dp_120"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/taxi_p_un_auto_nor" android:src="@drawable/taxi_p_un_auto_nor"
android:visibility="gone" android:visibility="gone"
@@ -96,6 +95,7 @@
android:id="@+id/btnAutopilotDisable" android:id="@+id/btnAutopilotDisable"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_72"
android:text="模拟 不可自动驾驶" android:text="模拟 不可自动驾驶"
android:textSize="20sp" android:textSize="20sp"
android:visibility="gone" android:visibility="gone"
@@ -154,7 +154,7 @@
android:id="@+id/module_mogo_och_navi_panel_container" android:id="@+id/module_mogo_och_navi_panel_container"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_120" android:layout_marginTop="@dimen/dp_192"
android:layout_marginRight="@dimen/dp_10" android:layout_marginRight="@dimen/dp_10"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@@ -163,10 +163,15 @@
android:id="@+id/traffic_light_view" android:id="@+id/traffic_light_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/taxi_p_traffic_light_layout_margin_top" android:layout_marginTop="@dimen/dp_95"
android:layout_marginRight="@dimen/taxi_p_traffic_light_layout_margin_right" android:layout_marginRight="@dimen/taxi_p_traffic_light_layout_margin_right"
android:visibility="gone" android:visibility="gone"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<FrameLayout
android:id="@+id/fl_container_overview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,6 +1,6 @@
package com.mogo.och.taxi.callback; package com.mogo.och.taxi.callback;
import mogo.telematics.pad.MessagePad; import com.mogo.eagle.core.data.map.MogoLocation;
/** /**
* Created on 2021/9/10 * Created on 2021/9/10
@@ -11,7 +11,7 @@ public interface ITaxiControllerStatusCallback {
// 是否vr map模式 // 是否vr map模式
void onVRModeChanged(boolean isVRMode); void onVRModeChanged(boolean isVRMode);
// 自车定位 // 自车定位
void onCarLocationChanged(MessagePad.GnssInfo location); void onCarLocationChanged(MogoLocation location);
//开始开启自动驾驶 //开始开启自动驾驶
void startOpenAutopilot(); void startOpenAutopilot();
} }

View File

@@ -30,7 +30,7 @@ import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
@@ -133,7 +133,7 @@ public class TaxiModel {
private int mPreRouteIndex = 0; private int mPreRouteIndex = 0;
private double mLongitude, mLatitude; private double mLongitude, mLatitude;
private MessagePad.GnssInfo mLocation = null; private MogoLocation mLocation = null;
private LoginService loginService; private LoginService loginService;
@@ -823,8 +823,8 @@ public class TaxiModel {
if (FunctionBuildConfig.isDemoMode) { if (FunctionBuildConfig.isDemoMode) {
// 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后置true // 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后置true
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true;
CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(true); CallerAutoPilotControlManager.INSTANCE.setIgnoreConditionDraw(true);
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(true); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(true);
CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore置为true更新本地order信息"); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore置为true更新本地order信息");
} }
@@ -833,7 +833,7 @@ public class TaxiModel {
if (mCurrentOCHOrder.orderStatus == TaxiOrderStatusEnum.ArriveAtEnd.getCode()){ if (mCurrentOCHOrder.orderStatus == TaxiOrderStatusEnum.ArriveAtEnd.getCode()){
if (FunctionBuildConfig.isDemoMode) { if (FunctionBuildConfig.isDemoMode) {
CallerLogger.INSTANCE.d(M_TAXI + TAG, "setIPCDemoModefalse"); CallerLogger.INSTANCE.d(M_TAXI + TAG, "setIPCDemoModefalse");
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(false);
} }
clearAutopilotControlParameters(); clearAutopilotControlParameters();
@@ -870,8 +870,8 @@ public class TaxiModel {
if (FunctionBuildConfig.isDemoMode) { if (FunctionBuildConfig.isDemoMode) {
// 当美化模式(演示模式)开启时: 取消或订单已完成时置false // 当美化模式(演示模式)开启时: 取消或订单已完成时置false
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false;
CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(false); CallerAutoPilotControlManager.INSTANCE.setIgnoreConditionDraw(false);
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(false);
CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore置为false已完成or清除当前订单"); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore置为false已完成or清除当前订单");
} }
} }
@@ -934,7 +934,7 @@ public class TaxiModel {
return; return;
} }
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters); CallerAutoPilotControlManager.INSTANCE.startAutoPilot(parameters);
CallerLogger.INSTANCE.d(M_TAXI + TAG, "start autopilot with parameter: %s", CallerLogger.INSTANCE.d(M_TAXI + TAG, "start autopilot with parameter: %s",
GsonUtil.jsonFromObject(parameters) GsonUtil.jsonFromObject(parameters)
+ " ,startSiteName=" + mCurrentOCHOrder.startSiteAddr + " ,startSiteName=" + mCurrentOCHOrder.startSiteAddr
@@ -987,7 +987,7 @@ public class TaxiModel {
//结束自动驾驶 //结束自动驾驶
public void cancelAutopilot() { public void cancelAutopilot() {
try { try {
CallerAutoPilotManager.INSTANCE.cancelAutoPilot(); CallerAutoPilotControlManager.INSTANCE.cancelAutoPilot();
CallerLogger.INSTANCE.d(M_TAXI + TAG, "结束自动驾驶"); CallerLogger.INSTANCE.d(M_TAXI + TAG, "结束自动驾驶");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@@ -995,7 +995,7 @@ public class TaxiModel {
} }
//根据围栏判断,是否到达起点 //根据围栏判断,是否到达起点
private void judgeStartStation(MessagePad.GnssInfo location) { private void judgeStartStation(MogoLocation location) {
if (mCurrentOCHOrder == null || mCurrentOCHOrder.startSiteGcjPoint == null if (mCurrentOCHOrder == null || mCurrentOCHOrder.startSiteGcjPoint == null
|| mCurrentOCHOrder.startSiteGcjPoint.size() < 2) { || mCurrentOCHOrder.startSiteGcjPoint.size() < 2) {
return; return;
@@ -1054,7 +1054,7 @@ public class TaxiModel {
// 自车定位 // 自车定位
private final IMoGoChassisLocationGCJ02Listener mMapLocationLIstener = new IMoGoChassisLocationGCJ02Listener() { private final IMoGoChassisLocationGCJ02Listener mMapLocationLIstener = new IMoGoChassisLocationGCJ02Listener() {
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
//位置变化时通过围栏判断是否到达x点 //位置变化时通过围栏判断是否到达x点
if (null == gnssInfo) return; if (null == gnssInfo) return;
if (checkCurrentOCHOrder()) { if (checkCurrentOCHOrder()) {
@@ -1076,7 +1076,7 @@ public class TaxiModel {
} }
}; };
private void judgeEndStation(MessagePad.GnssInfo location) { private void judgeEndStation(MogoLocation location) {
if (mCurrentOCHOrder == null || mCurrentOCHOrder.endSiteGcjPoint == null if (mCurrentOCHOrder == null || mCurrentOCHOrder.endSiteGcjPoint == null
|| mCurrentOCHOrder.endSiteGcjPoint.size() < 2) { || mCurrentOCHOrder.endSiteGcjPoint.size() < 2) {
return; return;
@@ -1172,8 +1172,8 @@ public class TaxiModel {
if (FunctionBuildConfig.isDemoMode) { if (FunctionBuildConfig.isDemoMode) {
// 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后置true // 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后置true
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true;
CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(true); CallerAutoPilotControlManager.INSTANCE.setIgnoreConditionDraw(true);
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(true); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(true);
CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore置为true到达出发点且已开启自动驾驶"); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore置为true到达出发点且已开启自动驾驶");
} }
} }
@@ -1243,7 +1243,7 @@ public class TaxiModel {
// 2022.10.08 到达目的地时候取消自动起自驾, 服务完成取消引导线和自动驾驶按钮状态 // 2022.10.08 到达目的地时候取消自动起自驾, 服务完成取消引导线和自动驾驶按钮状态
// FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; // FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false;
// CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(false); // CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(false);
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerAutoPilotControlManager.INSTANCE.setIPCDemoMode(false);
CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore置为false到达目的地"); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore置为false到达目的地");
} }
} }

View File

@@ -11,6 +11,7 @@ import androidx.lifecycle.LifecycleOwner;
import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.mvp.Presenter; import com.mogo.commons.mvp.Presenter;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -314,10 +315,10 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
} }
@Override @Override
public void onCarLocationChanged(MessagePad.GnssInfo location) { public void onCarLocationChanged(MogoLocation location) {
if (null != location){ if (null != location){
runOnUIThread(() -> { runOnUIThread(() -> {
mView.updateSpeedView((float) location.getVehicleSpeed()); mView.updateSpeedView((float) location.getGnssSpeed());
mView.updateLocation(location.getLatitude(),location.getLongitude()); mView.updateLocation(location.getLatitude(),location.getLongitude());
}); });
} }

View File

@@ -29,6 +29,7 @@ import com.amap.api.maps.model.MarkerOptions;
import com.amap.api.maps.model.Polyline; import com.amap.api.maps.model.Polyline;
import com.amap.api.maps.model.PolylineOptions; import com.amap.api.maps.model.PolylineOptions;
import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
@@ -38,8 +39,6 @@ import com.mogo.och.taxi.utils.TaxiMapAssetStyleUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import mogo.telematics.pad.MessagePad;
/** /**
* taxi司机端前往目的地小地图导航 * taxi司机端前往目的地小地图导航
*/ */
@@ -176,7 +175,7 @@ public class TaxiMapDirectionView
} }
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
if (gnssInfo == null){ if (gnssInfo == null){
return; return;
} }

View File

@@ -3,10 +3,9 @@ package com.mogo.och.taxi.utils;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.GsonUtils; import com.mogo.eagle.core.utilcode.util.GsonUtils;
import com.mogo.eagle.core.utilcode.util.ToastUtils;
import com.mogo.och.taxi.bean.OrderQueryRespBean; import com.mogo.och.taxi.bean.OrderQueryRespBean;
import com.mogo.och.taxi.constant.TaxiConst; import com.mogo.och.taxi.constant.TaxiConst;
import com.mogo.och.taxi.constant.TaxiOrderStatusEnum; import com.mogo.och.taxi.constant.TaxiOrderStatusEnum;
@@ -201,7 +200,7 @@ public class TaxiTrajectoryManager {
// mAutoPilotLine.setTimestamp(1654761600000L); //20220609 16:00 // mAutoPilotLine.setTimestamp(1654761600000L); //20220609 16:00
// mAutoPilotLine.setVehicleModel("红旗H9"); // mAutoPilotLine.setVehicleModel("红旗H9");
CallerAutoPilotManager.INSTANCE.sendTrajectoryDownloadReq(mAutoPilotLine); CallerAutoPilotControlManager.INSTANCE.sendTrajectoryDownloadReq(mAutoPilotLine);
CallerLogger.INSTANCE.d(M_TAXI + TAG, "sendTrajectoryReq(): " CallerLogger.INSTANCE.d(M_TAXI + TAG, "sendTrajectoryReq(): "
+ GsonUtils.toJson(mAutoPilotLine)); + GsonUtils.toJson(mAutoPilotLine));
} }

View File

@@ -13,7 +13,7 @@ import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
@@ -130,7 +130,7 @@ class DispatchAutoPilotManager private constructor() :
AutopilotControlParameters.AutoPilotLonLat(it.endLat, it.endLon) AutopilotControlParameters.AutoPilotLonLat(it.endLat, it.endLon)
currentAutopilot.vehicleType = 10 currentAutopilot.vehicleType = 10
CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "开启自动驾驶====$currentAutopilot") CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "开启自动驾驶====$currentAutopilot")
CallerAutoPilotManager.startAutoPilot(currentAutopilot) CallerAutoPilotControlManager.startAutoPilot(currentAutopilot)
} }
} }

View File

@@ -6,6 +6,7 @@ import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP_G
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
import com.mogo.eagle.core.data.enums.EventTypeEnumNew import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.map.MogoLatLng import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg import com.mogo.eagle.core.data.msgbox.V2XMsg
@@ -26,7 +27,6 @@ import com.mogo.eagle.core.utilcode.util.LocationUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.zhjt.service_biz.BizConfig import com.zhjt.service_biz.BizConfig
import mogo.telematics.pad.MessagePad
import kotlin.math.abs import kotlin.math.abs
import kotlin.math.ceil import kotlin.math.ceil
import kotlin.math.floor import kotlin.math.floor
@@ -44,7 +44,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
// 是否已进入到路口(停止线处) // 是否已进入到路口(停止线处)
private var isEnter = false private var isEnter = false
private var mLocation: MessagePad.GnssInfo? = null private var mLocation: MogoLocation? = null
companion object { companion object {
@@ -100,7 +100,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
// 路口100m闯红灯预警 // 路口100m闯红灯预警
mLocation?.let { mLocation?.let {
// 单位m/s // 单位m/s
val speed = it.vehicleSpeed val speed = it.gnssSpeed
// 车停止或者速度非常慢,可能返回负数或者很小的值,需要过滤 // 车停止或者速度非常慢,可能返回负数或者很小的值,需要过滤
CallerLogger.d("$M_V2X$TAG", "speed is:$speed") CallerLogger.d("$M_V2X$TAG", "speed is:$speed")
if (speed <= 2.5f) return// 小于等于9km/h不处理 if (speed <= 2.5f) return// 小于等于9km/h不处理
@@ -277,7 +277,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG) CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
} }
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) { override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
gnssInfo?.let { gnssInfo?.let {
mLocation = it mLocation = it
} }

View File

@@ -3,6 +3,7 @@ package com.mogo.eagle.function.biz.v2x.trafficlight.core
import android.content.Context import android.content.Context
import android.os.Handler import android.os.Handler
import android.os.Looper import android.os.Looper
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.trafficlight.* import com.mogo.eagle.core.data.trafficlight.*
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
@@ -15,7 +16,6 @@ import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandl
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_CROSS_ROAD import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_CROSS_ROAD
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT
import com.mogo.eagle.function.biz.v2x.trafficlight.network.TrafficLightNetWorkModel import com.mogo.eagle.function.biz.v2x.trafficlight.network.TrafficLightNetWorkModel
import mogo.telematics.pad.MessagePad
class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener { class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
@@ -30,7 +30,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
private var mContext: Context? = null private var mContext: Context? = null
private val trafficLightNetWorkModel = TrafficLightNetWorkModel() private val trafficLightNetWorkModel = TrafficLightNetWorkModel()
private var mLocation: MessagePad.GnssInfo? = null private var mLocation: MogoLocation? = null
private var roadIDResult: RoadIDResult? = null private var roadIDResult: RoadIDResult? = null
private var trafficLightResult: TrafficLightResult? = null private var trafficLightResult: TrafficLightResult? = null
@@ -174,7 +174,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
trafficLightResult = null trafficLightResult = null
} }
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) { override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
gnssInfo?.let { gnssInfo?.let {
mLocation = it mLocation = it
checkOutOfRange() checkOutOfRange()

View File

@@ -57,6 +57,7 @@ dependencies {
implementation rootProject.ext.dependencies.mogoaicloudtelematic implementation rootProject.ext.dependencies.mogoaicloudtelematic
implementation rootProject.ext.dependencies.mogoobu implementation rootProject.ext.dependencies.mogoobu
implementation rootProject.ext.dependencies.amapnavi3dmap
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_data implementation rootProject.ext.dependencies.mogo_core_data

View File

@@ -4,6 +4,7 @@ import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.eagle.core.data.constants.MogoServicePaths import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.function.api.datacenter.IDataCenterProvider import com.mogo.eagle.core.function.api.datacenter.IDataCenterProvider
import com.mogo.eagle.core.function.datacenter.location.MoGoLocationDispatcher
@Route(path = MogoServicePaths.PATH_DATA_CENTER_MODULE) @Route(path = MogoServicePaths.PATH_DATA_CENTER_MODULE)
class DataCenterProvider: IDataCenterProvider { class DataCenterProvider: IDataCenterProvider {
@@ -12,7 +13,7 @@ class DataCenterProvider: IDataCenterProvider {
get() = "DataCenterProvider" get() = "DataCenterProvider"
override fun init(context: Context?) { override fun init(context: Context?) {
MoGoLocationDispatcher.initListener()
} }
override fun onDestroy() { override fun onDestroy() {

View File

@@ -21,7 +21,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LO
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
import com.mogo.eagle.core.data.trafficlight.toTrafficLightDetail import com.mogo.eagle.core.data.trafficlight.toTrafficLightDetail
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotProvider import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotControlProvider
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider 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.MoGoAdasListenerImpl
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasMsgConnectStatusListenerImpl import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasMsgConnectStatusListenerImpl
@@ -67,8 +67,9 @@ import java.util.concurrent.TimeUnit
* @date 2021/9/22 8:43 下午 * @date 2021/9/22 8:43 下午
*/ */
@Route(path = MogoServicePaths.PATH_AUTO_PILOT) @Route(path = MogoServicePaths.PATH_AUTO_PILOT)
class MoGoAutopilotProvider : class MoGoAutopilotControlProvider :
IMoGoAutopilotProvider, IMoGoMapDataCollectProvider.OnMapCollectCmdListener, IMoGoAutopilotControlProvider,
IMoGoMapDataCollectProvider.OnMapCollectCmdListener,
IMoGoAutopilotCarConfigListener { IMoGoAutopilotCarConfigListener {
private val TAG = "MoGoAutoPilotProvider" private val TAG = "MoGoAutoPilotProvider"
private var mContext: Context? = null private var mContext: Context? = null

View File

@@ -45,8 +45,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListen
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordConfig 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.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager.invokeAutopilotStatistics import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager.invokeAutopilotStatistics
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager.invokeChassisLocationGCJ02
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager.invokeChassisLocationWGS84
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager.invokePNCActions import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager.invokePNCActions
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager.invokeAutopilotRotting import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager.invokeAutopilotRotting
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningTrajectoryListenerManager.invokeAutopilotTrajectory import com.mogo.eagle.core.function.call.autopilot.CallerPlanningTrajectoryListenerManager.invokeAutopilotTrajectory
@@ -135,10 +133,8 @@ class MoGoAdasListenerImpl : OnAdasListener {
clientPkFileName = "sn" clientPkFileName = "sn"
) )
override fun onGnssInfo(header: MessagePad.Header, gnssInfo: MessagePad.GnssInfo) { override fun onGnssInfo(header: MessagePad.Header, gnssInfo: MessagePad.GnssInfo) {
// WGS84坐标系高精度位置信息 CallerChassisGnssListenerManager.invokeChassisGnssListener(gnssInfo)
invokeChassisLocationWGS84(gnssInfo)
// GCJ02高德坐标系位置信息
invokeChassisLocationGCJ02(gnssInfo)
if (gnssInfo != null) { if (gnssInfo != null) {
if (1 == FunctionBuildConfig.gpsProvider) { if (1 == FunctionBuildConfig.gpsProvider) {
// 同步给MAP地图 // 同步给MAP地图

View File

@@ -5,7 +5,7 @@ import com.mogo.commons.debug.DebugConfig.*
import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.cloud.IMoGoCloudListener import com.mogo.eagle.core.function.api.cloud.IMoGoCloudListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
@@ -52,13 +52,13 @@ class MoGoAdasMsgConnectStatusListenerImpl :
// 同步SN给工控机 // 同步SN给工控机
syncBasicInfoToAutopilot() syncBasicInfoToAutopilot()
//每次工控机连接成功后,需同步当前设置的美化模式状态 //每次工控机连接成功后,需同步当前设置的美化模式状态
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) CallerAutoPilotControlManager.setDemoMode(FunctionBuildConfig.isDemoMode)
//当连接状态是关闭美化模式时,同步给工控机 //当连接状态是关闭美化模式时,同步给工控机
if (!FunctionBuildConfig.isDemoMode) { if (!FunctionBuildConfig.isDemoMode) {
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode) CallerAutoPilotControlManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
} }
//每次工控机连接成功后,需同步当前设置的雨天模式状态 //每次工控机连接成功后,需同步当前设置的雨天模式状态
CallerAutoPilotManager.setRainMode(FunctionBuildConfig.isRainMode) CallerAutoPilotControlManager.setRainMode(FunctionBuildConfig.isRainMode)
} else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.DISCONNECTED) { } else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.DISCONNECTED) {
CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 连接失败 reason:$reason") CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 连接失败 reason:$reason")
if (connectStatus) { if (connectStatus) {

View File

@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.datacenter.autopilot.server
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
/** /**
@@ -26,6 +26,6 @@ class AsyncDataToAutopilotServer private constructor() : IMoGoTrafficLightListen
} }
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) { override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
CallerAutoPilotManager.sendTrafficLightData(trafficLightResult) CallerAutoPilotControlManager.sendTrafficLightData(trafficLightResult)
} }
} }

View File

@@ -8,9 +8,9 @@ import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager.setDemoMode import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setDemoMode
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager.setIgnoreConditionDraw import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setIgnoreConditionDraw
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager 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.*
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
@@ -174,7 +174,7 @@ class TeleMsgHandler : IMsgHandler {
private fun queryCarConfig() { private fun queryCarConfig() {
invokeNettyConnResult("乘客屏请求司机屏向工控机查询配置信息") invokeNettyConnResult("乘客屏请求司机屏向工控机查询配置信息")
CallerAutoPilotManager.getCarConfig() CallerAutoPilotControlManager.getCarConfig()
} }
override fun handleClientConn2Server(channel: Channel?) { override fun handleClientConn2Server(channel: Channel?) {

View File

@@ -1,16 +0,0 @@
package com.mogo.eagle.core.function.datacenter.location
import com.mogo.eagle.core.data.enums.DataSourceType
import mogo.telematics.pad.MessagePad
/**
* 位置回调监听
*/
interface IMoGoLocationListener {
/**
* 位置改变回调用
* @param gnssInfo 位置信息
* @param sourceType 数据来源
*/
fun onLocationChanged(gnssInfo: MessagePad.GnssInfo, sourceType: DataSourceType)
}

View File

@@ -0,0 +1,176 @@
package com.mogo.eagle.core.function.datacenter.location
import com.amap.api.location.AMapLocation
import com.amap.api.location.AMapLocationClient
import com.amap.api.location.AMapLocationClientOption
import com.amap.api.location.AMapLocationListener
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.constants.SharedPrefsConstants
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGnssListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGnssListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.Utils
import mogo.telematics.pad.MessagePad
/**
* 融合定位服务,这里同时监听多来源的位置信息,并支持修改频率
*
* @author donghongyu
*/
object MoGoLocationDispatcher :
IMoGoChassisGnssListener,
AMapLocationListener {
private val TAG = "MoGoLocationManager"
private var mCityCode: String? = null
private var mapLocation: AMapLocation? = null
/**
* 最后一次工控机GNSS返回更新的位置
*/
private var lastGnssLocation: MogoLocation = MogoLocation()
/**
* 最后一次高德定位返回的位置信息
*/
private var lastGaoDeLocation: MogoLocation = MogoLocation()
fun initListener() {
// 高德SDK隐私政策
AMapLocationClient.updatePrivacyShow(Utils.getApp(), true, true)
AMapLocationClient.updatePrivacyAgree(Utils.getApp(), true)
try {
val mLocationClient = AMapLocationClient(Utils.getApp())
//初始化定位参数
//声明mLocationOption对象
val mLocationOption = AMapLocationClientOption()
//设置定位监听
mLocationClient.setLocationListener(this)
//设置定位模式为高精度模式Battery_Saving为低功耗模式Device_Sensors是仅设备模式
mLocationOption.locationMode = AMapLocationClientOption.AMapLocationMode.Hight_Accuracy
//设置定位间隔,单位毫秒,默认为2000ms
mLocationOption.interval = 1000
//设置定位参数
mLocationClient.setLocationOption(mLocationOption)
// 启动定位监听
mLocationClient.startLocation()
} catch (e: Exception) {
e.printStackTrace()
}
// 初始化监听订阅工控机位置信息
CallerChassisGnssListenerManager.addListener(TAG, this)
}
override fun onChassisGnss(gnssInfo: MessagePad.GnssInfo) {
// 更新GNSS 信息
lastGnssLocation.gnssInfo = gnssInfo
lastGnssLocation.lastReceiveTime = TimeUtils.getNowMills()
// 将高德中的一些用于业务的数据进行融合例如CityCode、address等
mapLocation?.let {
lastGnssLocation.cityName = it.city
lastGnssLocation.cityCode = it.cityCode
lastGnssLocation.provider = it.provider
lastGnssLocation.address = it.address
lastGnssLocation.district = it.district
lastGnssLocation.province = it.province
lastGnssLocation.adCode = it.adCode
lastGnssLocation.locationDetail = it.locationDetail
lastGnssLocation.poiName = it.poiName
lastGnssLocation.aoiName = it.aoiName
lastGnssLocation.street = it.street
lastGnssLocation.streetNum = it.streetNum
lastGnssLocation.description = it.description
lastGnssLocation.buildingId = it.buildingId
lastGnssLocation.floor = it.floor
lastGnssLocation.errorCode = it.errorCode
lastGnssLocation.errorInfo = it.errorInfo
}
// WGS84坐标系高精度位置信息
CallerChassisLocationWGS84ListenerManager.invokeChassisLocationWGS84(
lastGnssLocation,
DataSourceType.TELEMATIC
)
// GCJ02高德坐标系位置信息
CallerChassisLocationGCJ20ListenerManager.invokeChassisLocationGCJ02(
lastGnssLocation,
DataSourceType.TELEMATIC
)
}
/**
* 高德地图位置改变回调
* @param aMapLocation 位置信息
*/
override fun onLocationChanged(aMapLocation: AMapLocation) {
mapLocation = aMapLocation
// 更新GNSS 信息
// 将高德中的一些用于业务的数据进行融合例如CityCode、address等
mapLocation?.let {
// 转换 GCJ02-->WGS84 坐标
val wgs84Location =
CoordinateTransform.GCJ02ToWGS84(it.longitude, it.latitude)
lastGaoDeLocation.longitude = wgs84Location[0]
lastGaoDeLocation.latitude = wgs84Location[1]
lastGaoDeLocation.heading = it.bearing.toDouble()
lastGaoDeLocation.gnssSpeed = it.speed
lastGaoDeLocation.altitude = it.altitude
lastGaoDeLocation.satelliteTime = it.time
lastGaoDeLocation.lastReceiveTime = TimeUtils.getNowMills()
lastGaoDeLocation.cityName = it.city
lastGaoDeLocation.cityCode = it.cityCode
lastGaoDeLocation.provider = it.provider
lastGaoDeLocation.address = it.address
lastGaoDeLocation.district = it.district
lastGaoDeLocation.province = it.province
lastGaoDeLocation.adCode = it.adCode
lastGaoDeLocation.locationDetail = it.locationDetail
lastGaoDeLocation.poiName = it.poiName
lastGaoDeLocation.aoiName = it.aoiName
lastGaoDeLocation.street = it.street
lastGaoDeLocation.streetNum = it.streetNum
lastGaoDeLocation.description = it.description
lastGaoDeLocation.buildingId = it.buildingId
lastGaoDeLocation.floor = it.floor
lastGaoDeLocation.errorCode = it.errorCode
lastGaoDeLocation.errorInfo = it.errorInfo
}
// 计算最后一次工控机同步的定位是否超时,如果超时则切换为高德地图定位,暂定超过30秒需要切换
if (TimeUtils.getNowMills() - lastGnssLocation.lastReceiveTime > 30000) {
// WGS84坐标系高精度位置信息
CallerChassisLocationWGS84ListenerManager.invokeChassisLocationWGS84(
lastGaoDeLocation,
DataSourceType.MAP
)
// GCJ02高德坐标系位置信息
CallerChassisLocationGCJ20ListenerManager.invokeChassisLocationGCJ02(
lastGaoDeLocation,
DataSourceType.MAP
)
}
// 本地SP缓存城市Code
val cityCode = aMapLocation.cityCode
if (cityCode != null && cityCode.isNotEmpty()) {
mCityCode = aMapLocation.cityCode
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
.putString(SharedPrefsConstants.LOCATION_CITY_CODE, cityCode)
}
}
}

View File

@@ -1,71 +0,0 @@
package com.mogo.eagle.core.function.datacenter.location
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
import com.mogo.eagle.core.function.api.obu.IMoGoObuLocationWGS84Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.support.obu.model.MogoObuHvBasicsData
import mogo.telematics.pad.MessagePad
/**
* 融合定位服务,这里同时监听多来源的位置信息,并支持修改频率
*
* @author donghongyu
*/
object MoGoLocationManager :
CallerBase<IMoGoLocationListener>(),
IMoGoChassisLocationWGS84Listener,
IMoGoObuLocationWGS84Listener {
private val TAG = "MoGoLocationManager"
init {
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
}
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) {
M_LISTENERS.forEach {
val tag = it.key
// 获取数据监听需要的HZ
val hz = M_LISTENERS_HZ[tag]
if (hz != null && hz > 0) {
val hzTime = (1.0 / hz.toDouble()) * 1000
// 获取最后一次回调的时间
val hzLastSendTime = M_LISTENERS_HZ_LAST_SEND_TIME[tag]
if (hzLastSendTime != null && hzLastSendTime > 0) {
// 计算是否进入下一次回调周期
val nowTime = TimeUtils.getNowMills()
if (nowTime - hzLastSendTime > hzTime) {
syncLocationCallback(tag, it, gnssInfo, DataSourceType.TELEMATIC)
}
} else {
syncLocationCallback(tag, it, gnssInfo, DataSourceType.TELEMATIC)
}
} else {
syncLocationCallback(tag, it, gnssInfo, DataSourceType.TELEMATIC)
}
}
}
/**
* 向订阅位置信息的发出定位信息
*/
private fun syncLocationCallback(
tag: String,
it: Map.Entry<String, IMoGoLocationListener>,
gnssInfo: MessagePad.GnssInfo,
sourceType: DataSourceType
) {
// 记录最后一次回调时间
M_LISTENERS_HZ_LAST_SEND_TIME[tag] = TimeUtils.getNowMills()
val listener = it.value
listener.onLocationChanged(gnssInfo, sourceType)
}
override fun onObuLocationWGS84(data: MogoObuHvBasicsData) {
}
}

View File

@@ -3,15 +3,20 @@
##### 位置回调融合工控机、OBU、高德地图 ##### 位置回调融合工控机、OBU、高德地图
```kotlin ```kotlin
// 注册监听位置变换 // 注册监听位置变换,唯一标记要接受数据的HZ回掉监听
MoGoLocationManager.addListener(Companion.functionName, object : IMoGoLocationListener { CallerChassisLocationWGS84ListenerManager.addListener(Companion.functionName, 20,object :IMoGoChassisLocationWGS84Listener{
override fun onLocationChanged( override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
gnssInfo: MessagePad.GnssInfo,
sourceType: DataSourceType
) {
TODO("Not yet implemented") TODO("Not yet implemented")
} }
}) })
// 设置数据回调频率单位HZ1HZ的周期是1秒50HZ的周期是1/50=0.02秒10HZ的周期是1/10=0.1秒。 // 设置数据回调频率单位HZ1HZ的周期是1秒50HZ的周期是1/50=0.02秒10HZ的周期是1/10=0.1秒。
MoGoLocationManager.setListenerHz(Companion.functionName, 20) CallerChassisLocationWGS84ListenerManager.setListenerHz(Companion.functionName, 20)
// 注册监听位置变换,唯一标记要接受数据的HZ回掉监听
CallerChassisLocationGCJ20ListenerManager.addListener(Companion.functionName, 20,object :IMoGoChassisLocationGCJ02Listener{
override fun onChassisLocationGCJ02(gnssInfo: MogoLocation) {
TODO("Not yet implemented")
}
})
``` ```

View File

@@ -10,11 +10,12 @@ import android.widget.RadioButton
import android.widget.TextView import android.widget.TextView
import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
@@ -27,7 +28,6 @@ import com.zhjt.mogo_core_function_devatools.R
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import mogo.telematics.pad.MessagePad
import record_cache.RecordPanelOuterClass import record_cache.RecordPanelOuterClass
import java.util.* import java.util.*
@@ -119,7 +119,7 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
// 添加 ADAS车辆状态&定位 监听 // 添加 ADAS车辆状态&定位 监听
CallerChassisLocationWGS84ListenerManager.addListener(this.hashCode().toString(), this) CallerChassisLocationWGS84ListenerManager.addListener(this.hashCode().toString(), this)
//开始录制AI数据采集Bag包 //开始录制AI数据采集Bag包
CallerAutoPilotManager.recordPackage( CallerAutoPilotControlManager.recordPackage(
99, 99,
Random(SystemClock.elapsedRealtime()).nextInt(), Random(SystemClock.elapsedRealtime()).nextInt(),
20, 20,
@@ -353,7 +353,7 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
fun closeWindow() fun closeWindow()
} }
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) { override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
latitude = gnssInfo.latitude latitude = gnssInfo.latitude
longitude = gnssInfo.longitude longitude = gnssInfo.longitude
} }

View File

@@ -11,7 +11,7 @@ import androidx.recyclerview.widget.GridLayoutManager
import com.mogo.eagle.core.data.badcase.RecordTypeEntity import com.mogo.eagle.core.data.badcase.RecordTypeEntity
import com.mogo.eagle.core.data.badcase.TopicEntity import com.mogo.eagle.core.data.badcase.TopicEntity
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.eagle.core.utilcode.util.ToastUtils
@@ -206,7 +206,7 @@ internal class BadCaseConfigView @JvmOverloads constructor(
super.onAttachedToWindow() super.onAttachedToWindow()
CallerAutopilotRecordListenerManager.addListener(TAG, this) CallerAutopilotRecordListenerManager.addListener(TAG, this)
//获取数据采集录制模式配置列表 //获取数据采集录制模式配置列表
CallerAutoPilotManager.getBadCaseConfig(0, 0, listOf()) CallerAutoPilotControlManager.getBadCaseConfig(0, 0, listOf())
recordTypesList.add(RecordTypeEntity(0,"自定义", arrayListOf())) recordTypesList.add(RecordTypeEntity(0,"自定义", arrayListOf()))
} }

View File

@@ -11,7 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.mogo.eagle.core.data.badcase.RecordCaseEntity; import com.mogo.eagle.core.data.badcase.RecordCaseEntity;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
import com.mogo.eagle.core.utilcode.util.ThreadUtils; import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.zhjt.mogo_core_function_devatools.R; import com.zhjt.mogo_core_function_devatools.R;
@@ -77,7 +77,7 @@ public class CaseListDialog extends Dialog implements IMoGoAutopilotRecordListen
super.onAttachedToWindow(); super.onAttachedToWindow();
CallerAutopilotRecordListenerManager.INSTANCE.addListener(TAG, this); CallerAutopilotRecordListenerManager.INSTANCE.addListener(TAG, this);
//获取数据采集录制模式配置列表 //获取数据采集录制模式配置列表
CallerAutoPilotManager.INSTANCE.getBadCaseConfig(0, 0,new ArrayList<>()); CallerAutoPilotControlManager.INSTANCE.getBadCaseConfig(0, 0,new ArrayList<>());
} }
@Override @Override

View File

@@ -17,7 +17,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.mogo.eagle.core.data.badcase.RecordTypeEntity; import com.mogo.eagle.core.data.badcase.RecordTypeEntity;
import com.mogo.eagle.core.data.badcase.TopicEntity; import com.mogo.eagle.core.data.badcase.TopicEntity;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
import com.mogo.eagle.core.utilcode.util.ThreadUtils; import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.eagle.core.utilcode.util.ToastUtils; import com.mogo.eagle.core.utilcode.util.ToastUtils;
@@ -69,7 +69,7 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
init(); init();
initEvent(); initEvent();
//获取所有Topic //获取所有Topic
CallerAutoPilotManager.INSTANCE.getBadCaseConfig(1, 0, new ArrayList<>()); CallerAutoPilotControlManager.INSTANCE.getBadCaseConfig(1, 0, new ArrayList<>());
if (recordType != null) { if (recordType != null) {
tvCaseName.setText(recordType.getDesc()); tvCaseName.setText(recordType.getDesc());
if (recordType.getTopicsList().size() > 0) { if (recordType.getTopicsList().size() > 0) {
@@ -160,7 +160,7 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
}); });
tvSave.setOnClickListener(v -> { tvSave.setOnClickListener(v -> {
if (recordType != null) { if (recordType != null) {
Boolean success = CallerAutoPilotManager.INSTANCE.getBadCaseConfig(2, recordType.getId(), addTopicList); Boolean success = CallerAutoPilotControlManager.INSTANCE.getBadCaseConfig(2, recordType.getId(), addTopicList);
if (Boolean.TRUE.equals(success)) { if (Boolean.TRUE.equals(success)) {
ToastUtils.showShort("Topic设置成功"); ToastUtils.showShort("Topic设置成功");
if (recordType.getId() == 0) { if (recordType.getId() == 0) {

View File

@@ -14,11 +14,12 @@ import android.widget.TextView
import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.badcase.RecordCaseEntity import com.mogo.eagle.core.data.badcase.RecordCaseEntity
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
@@ -35,7 +36,6 @@ import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
import com.zhjt.mogo_core_function_devatools.badcase.record.RecordManager import com.zhjt.mogo_core_function_devatools.badcase.record.RecordManager
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import mogo.telematics.pad.MessagePad
import record_cache.RecordPanelOuterClass import record_cache.RecordPanelOuterClass
import java.io.File import java.io.File
import java.util.* import java.util.*
@@ -347,7 +347,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
mWindowManager!!.addView(mFloatLayout, mWindowParams) mWindowManager!!.addView(mFloatLayout, mWindowParams)
//开启录包 //开启录包
if (recordCaseEntity != null) { if (recordCaseEntity != null) {
CallerAutoPilotManager.recordPackage( CallerAutoPilotControlManager.recordPackage(
recordCaseEntity.caseId, recordCaseEntity.caseId,
Random(SystemClock.elapsedRealtime()).nextInt(), Random(SystemClock.elapsedRealtime()).nextInt(),
BadCaseConfig.totalDuration, BadCaseConfig.totalDuration,
@@ -355,7 +355,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
recordCaseEntity.topicList recordCaseEntity.topicList
) )
} else { } else {
CallerAutoPilotManager.recordPackage( CallerAutoPilotControlManager.recordPackage(
BadCaseConfig.type, Random(SystemClock.elapsedRealtime()).nextInt(), BadCaseConfig.type, Random(SystemClock.elapsedRealtime()).nextInt(),
BadCaseConfig.totalDuration, BadCaseConfig.previousDuration BadCaseConfig.totalDuration, BadCaseConfig.previousDuration
) )
@@ -394,7 +394,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
fun closeWindow() fun closeWindow()
} }
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) { override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
latitude = gnssInfo.latitude latitude = gnssInfo.latitude
longitude = gnssInfo.longitude longitude = gnssInfo.longitude
} }

View File

@@ -15,6 +15,7 @@ import android.widget.TextView
import com.google.android.flexbox.FlexboxLayout import com.google.android.flexbox.FlexboxLayout
import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.RecordBagMsg import com.mogo.eagle.core.data.msgbox.RecordBagMsg
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
@@ -34,7 +35,6 @@ import com.zhjt.mogo_core_function_devatools.badcase.record.RecordManager
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import me.jessyan.autosize.utils.AutoSizeUtils import me.jessyan.autosize.utils.AutoSizeUtils
import mogo.telematics.pad.MessagePad
import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.EventBus
import java.io.File import java.io.File
@@ -380,9 +380,9 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
fun closeWindow() fun closeWindow()
} }
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) { override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
latitude = gnssInfo?.latitude latitude = gnssInfo.latitude
longitude = gnssInfo?.longitude longitude = gnssInfo.longitude
} }
} }

View File

@@ -15,7 +15,7 @@ import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_FULL_LOG import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_FULL_LOG
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION
import com.mogo.eagle.core.function.api.map.deva.IMoGoMapDevaProvider import com.mogo.eagle.core.function.api.map.deva.IMoGoMapDevaProvider
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -220,7 +220,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
Logger.init(LogLevel.DEBUG) Logger.init(LogLevel.DEBUG)
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = true MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = true
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowNetDebugLog = true MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowNetDebugLog = true
CallerAutoPilotManager.setEnableLog(true) CallerAutoPilotControlManager.setEnableLog(true)
} }
/** /**
@@ -230,7 +230,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
Logger.init(if (DebugConfig.isDebug()) LogLevel.DEBUG else LogLevel.OFF) Logger.init(if (DebugConfig.isDebug()) LogLevel.DEBUG else LogLevel.OFF)
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = false MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = false
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowNetDebugLog = false MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowNetDebugLog = false
CallerAutoPilotManager.setEnableLog(false) CallerAutoPilotControlManager.setEnableLog(false)
} }
override fun onError(errorCount: Int) { override fun onError(errorCount: Int) {

View File

@@ -41,7 +41,7 @@ internal class CanImpl(ctx: Context) :
private val state: AtomicInteger by lazy { AtomicInteger(Int.MIN_VALUE) } private val state: AtomicInteger by lazy { AtomicInteger(Int.MIN_VALUE) }
override fun onCreate() { override fun onCreate() {
send(CanStatus(CallerAutoPilotManager.isConnected())) send(CanStatus(CallerAutoPilotControlManager.isConnected()))
CallerChassisAccStateListenerManager.addListener(TAG, this) CallerChassisAccStateListenerManager.addListener(TAG, this)
CallerChassisBrakeStateListenerManager.addListener(TAG, this) CallerChassisBrakeStateListenerManager.addListener(TAG, this)
@@ -60,7 +60,7 @@ internal class CanImpl(ctx: Context) :
private fun isCanEnabled(): Boolean { private fun isCanEnabled(): Boolean {
val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode() val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode()
return CallerAutoPilotManager.isConnected() && code != "EHW_CAN" && (state.get() == Int.MIN_VALUE || state.get() == 0) return CallerAutoPilotControlManager.isConnected() && code != "EHW_CAN" && (state.get() == Int.MIN_VALUE || state.get() == 0)
} }

View File

@@ -28,7 +28,7 @@ internal class IpcImpl(ctx: Context): IFlow<IpcStatus>(ctx), IMoGoAutopilotStatu
} }
private fun checkAndSend() { private fun checkAndSend() {
send(IpcStatus(CallerAutoPilotManager.isConnected())) send(IpcStatus(CallerAutoPilotControlManager.isConnected()))
} }
override fun onDestroy() { override fun onDestroy() {

View File

@@ -2,9 +2,10 @@ package com.zhjt.mogo_core_function_devatools.status.flow.rtk
import android.content.Context import android.content.Context
import android.util.Log import android.util.Log
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -15,7 +16,6 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import mogo.telematics.pad.MessagePad.GnssInfo
import system_master.SystemStatusInfo.HealthInfo import system_master.SystemStatusInfo.HealthInfo
import system_master.SystemStatusInfo.StatusInfo import system_master.SystemStatusInfo.StatusInfo
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicBoolean
@@ -42,7 +42,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
CallerLogger.d("$M_DEVA$TAG", "-- onCreate --") CallerLogger.d("$M_DEVA$TAG", "-- onCreate --")
CallerAutoPilotStatusListenerManager.addListener(TAG, this) CallerAutoPilotStatusListenerManager.addListener(TAG, this)
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this) CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
if (CallerAutoPilotManager.isConnected()) { if (CallerAutoPilotControlManager.isConnected()) {
check() check()
} }
} }
@@ -53,7 +53,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
} }
check?.takeIf { it.isActive }?.cancel() check?.takeIf { it.isActive }?.cancel()
launch(Dispatchers.Unconfined) { launch(Dispatchers.Unconfined) {
CallerAutoPilotManager.sendStatusQueryReq() CallerAutoPilotControlManager.sendStatusQueryReq()
delay(5000) delay(5000)
isOldVersion.set(true) isOldVersion.set(true)
}.also { }.also {
@@ -74,18 +74,18 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) { override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) {
super.onAutopilotIpcConnectStatusChanged(status, reason) super.onAutopilotIpcConnectStatusChanged(status, reason)
if (!CallerAutoPilotManager.isConnected()) { if (!CallerAutoPilotControlManager.isConnected()) {
CallerLogger.d("$M_DEVA$TAG", "工控机断开了....") CallerLogger.d("$M_DEVA$TAG", "工控机断开了....")
healthInfo.set(null) healthInfo.set(null)
send(RTKStatus("", -1)) send(RTKStatus("", -1))
} }
if (CallerAutoPilotManager.isConnected() && check == null && !isOldVersion.get()) { if (CallerAutoPilotControlManager.isConnected() && check == null && !isOldVersion.get()) {
check() check()
} }
} }
override fun onChassisLocationWGS84(gnssInfo: GnssInfo) { override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
if (isOldVersion.get()) { if (isOldVersion.get()) {
if (isRTKEnabled()) { if (isRTKEnabled()) {
send(RTKStatus("RTK", 0)) send(RTKStatus("RTK", 0))
@@ -103,7 +103,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
private fun isRTKEnabled(): Boolean { private fun isRTKEnabled(): Boolean {
val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode() val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode()
val gnssInfo = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() val gnssInfo = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
return CallerAutoPilotManager.isConnected() && ( return CallerAutoPilotControlManager.isConnected() && (
code != "EHW_RTK" && code != "EHW_RTK" &&
code != "EHW_GNSS" && code != "EHW_GNSS" &&
code != "ESYS_RTK_STATUS_FAULT" && code != "ESYS_RTK_STATUS_FAULT" &&

View File

@@ -40,7 +40,7 @@ internal class TracingImpl(ctx: Context): IFlow<TracingStatus>(ctx), IMoGoAutopi
override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) { override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) {
super.onAutopilotIpcConnectStatusChanged(status, reason) super.onAutopilotIpcConnectStatusChanged(status, reason)
if (!CallerAutoPilotManager.isConnected()) { if (!CallerAutoPilotControlManager.isConnected()) {
old = UNKNOWN old = UNKNOWN
send(TracingStatus(UNKNOWN)) send(TracingStatus(UNKNOWN))
} }

View File

@@ -19,7 +19,7 @@ internal class StatusModel : ViewModel() {
const val TAG = "StatusModel" const val TAG = "StatusModel"
val DEFAULTS = Pair(null, ArrayList<Status>().also { val DEFAULTS = Pair(null, ArrayList<Status>().also {
it += IpcStatus(CallerAutoPilotManager.isConnected()) it += IpcStatus(CallerAutoPilotControlManager.isConnected())
it += CanStatus(false) it += CanStatus(false)
it += TracingStatus(UNKNOWN) it += TracingStatus(UNKNOWN)
it += RTKStatus("", -1) it += RTKStatus("", -1)

View File

@@ -7,7 +7,7 @@ import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -51,7 +51,7 @@ object SyncConfig {
else -> { else -> {
} }
} }
AppConfigInfo.teleTimeStamp = CallerAutoPilotManager.getTeleTimeStamp() AppConfigInfo.teleTimeStamp = CallerAutoPilotControlManager.getTeleTimeStamp()
logOutConfig(AppConfigInfo) logOutConfig(AppConfigInfo)
} }

View File

@@ -31,9 +31,8 @@ import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
import com.mogo.eagle.core.data.report.ReportEntity import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
@@ -51,7 +50,6 @@ import com.mogo.eagle.core.function.hmi.ui.setting.CameraLiveView.Companion.came
import com.mogo.eagle.core.function.hmi.ui.setting.IPCReportWindow import com.mogo.eagle.core.function.hmi.ui.setting.IPCReportWindow
import com.mogo.eagle.core.function.hmi.ui.setting.ToolsView.Companion.toolsView import com.mogo.eagle.core.function.hmi.ui.setting.ToolsView.Companion.toolsView
import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
import com.mogo.eagle.core.function.main.DisplayEffectsHelper import com.mogo.eagle.core.function.main.DisplayEffectsHelper
import com.mogo.eagle.core.utilcode.kotlin.safeCancel import com.mogo.eagle.core.utilcode.kotlin.safeCancel
@@ -216,7 +214,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
SharedPrefsMgr.getInstance(it) SharedPrefsMgr.getInstance(it)
.putLong("roadwork", System.currentTimeMillis() / 1000) .putLong("roadwork", System.currentTimeMillis() / 1000)
} }
CallerAutoPilotManager.sendTripInfo(5, "", "", "", false) CallerAutoPilotControlManager.sendTripInfo(5, "", "", "", false)
} }
} }

View File

@@ -12,7 +12,7 @@ import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.EventTypeEnumNew import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.* import com.mogo.eagle.core.data.msgbox.*
import com.mogo.eagle.core.data.report.ReportEntity import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
@@ -95,7 +95,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat()) holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
var resultStr = "类型:" var resultStr = "类型:"
for (result in reportEntity.resultList){ for (result in reportEntity.resultList){
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}" resultStr = "${resultStr}${CallerAutoPilotControlManager.getReportResultDesc(result)}"
} }
holder.tvBubbleReportType.text = resultStr holder.tvBubbleReportType.text = resultStr
holder.clReportLayout.setOnClickListener { holder.clReportLayout.setOnClickListener {

View File

@@ -13,7 +13,7 @@ import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.EventTypeEnumNew import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.* import com.mogo.eagle.core.data.msgbox.*
import com.mogo.eagle.core.data.report.ReportEntity import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.R
@@ -133,7 +133,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
var resultStr = "类型:" var resultStr = "类型:"
for (result in reportEntity.resultList) { for (result in reportEntity.resultList) {
resultStr = resultStr =
"${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}" "${resultStr}${CallerAutoPilotControlManager.getReportResultDesc(result)}"
} }
holder.tvReportTypeNormal.text = resultStr holder.tvReportTypeNormal.text = resultStr
holder.tvReportTypeOpen.text = resultStr holder.tvReportTypeOpen.text = resultStr
@@ -141,7 +141,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
var actionStr = "" var actionStr = ""
for (action in reportEntity.actionsList) { for (action in reportEntity.actionsList) {
actionStr = actionStr =
"${actionStr}${CallerAutoPilotManager.getReportActionDesc(action)}" "${actionStr}${CallerAutoPilotControlManager.getReportActionDesc(action)}"
} }
holder.tvReportActionOpen.text = "建议操作:$actionStr" holder.tvReportActionOpen.text = "建议操作:$actionStr"
holder.tvStatusSelect.setOnClickListener { holder.tvStatusSelect.setOnClickListener {

View File

@@ -19,7 +19,7 @@ import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo.NoticeTrafficAccountInfo import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo.NoticeTrafficAccountInfo
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
import com.mogo.eagle.core.data.notice.NoticeValue import com.mogo.eagle.core.data.notice.NoticeValue
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager.startAutoPilot import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.startAutoPilot
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lat import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lat
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lon import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lon
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager.bizProvider import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager.bizProvider

View File

@@ -38,6 +38,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.deva.scene.SceneModule import com.mogo.eagle.core.data.deva.scene.SceneModule
import com.mogo.eagle.core.data.enums.TrafficTypeEnum import com.mogo.eagle.core.data.enums.TrafficTypeEnum
import com.mogo.eagle.core.data.gnss.AccelerationEntity import com.mogo.eagle.core.data.gnss.AccelerationEntity
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.obu.ObuStatusInfo import com.mogo.eagle.core.data.obu.ObuStatusInfo
import com.mogo.eagle.core.data.report.ReportEntity import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.api.autopilot.* import com.mogo.eagle.core.function.api.autopilot.*
@@ -120,7 +121,7 @@ internal class DebugSettingView @JvmOverloads constructor(
private var logViewAttach = false private var logViewAttach = false
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
private var mGnssInfo: MessagePad.GnssInfo? = null private var mGnssInfo: MogoLocation? = null
private var accelerationFloatWindow: AccelerationFloatWindow? = null private var accelerationFloatWindow: AccelerationFloatWindow? = null
private var accelerationList = arrayListOf<AccelerationEntity>() private var accelerationList = arrayListOf<AccelerationEntity>()
@@ -220,7 +221,7 @@ internal class DebugSettingView @JvmOverloads constructor(
Timer().schedule(timerTaskRefresh, Date(), 300) Timer().schedule(timerTaskRefresh, Date(), 300)
if (AppConfigInfo.isConnectAutopilot && (AppConfigInfo.plateNumber.isNullOrEmpty() || AppConfigInfo.iPCMacAddress.isNullOrEmpty())) { if (AppConfigInfo.isConnectAutopilot && (AppConfigInfo.plateNumber.isNullOrEmpty() || AppConfigInfo.iPCMacAddress.isNullOrEmpty())) {
//查询工控机基础配置信息 //查询工控机基础配置信息
CallerAutoPilotManager.getCarConfig() CallerAutoPilotControlManager.getCarConfig()
} }
} }
@@ -594,10 +595,10 @@ internal class DebugSettingView @JvmOverloads constructor(
"demoMode", "demoMode",
DemoModeView(context) DemoModeView(context)
) )
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) CallerAutoPilotControlManager.setDemoMode(FunctionBuildConfig.isDemoMode)
if (!FunctionBuildConfig.isDemoMode) { if (!FunctionBuildConfig.isDemoMode) {
//关闭美化模式时,通知工控机 //关闭美化模式时,通知工控机
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode) CallerAutoPilotControlManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
} }
tbIsDrawAutopilotTrajectoryData.isEnabled = !FunctionBuildConfig.isDemoMode tbIsDrawAutopilotTrajectoryData.isEnabled = !FunctionBuildConfig.isDemoMode
if (!FunctionBuildConfig.isDemoMode) { if (!FunctionBuildConfig.isDemoMode) {
@@ -615,7 +616,7 @@ internal class DebugSettingView @JvmOverloads constructor(
tbIsRainMode.isChecked = FunctionBuildConfig.isRainMode tbIsRainMode.isChecked = FunctionBuildConfig.isRainMode
//雨天模式 //雨天模式
tbIsRainMode.setOnCheckedChangeListener { _, isChecked -> tbIsRainMode.setOnCheckedChangeListener { _, isChecked ->
CallerAutoPilotManager.setRainMode(isChecked) CallerAutoPilotControlManager.setRainMode(isChecked)
FunctionBuildConfig.isRainMode = isChecked FunctionBuildConfig.isRainMode = isChecked
} }
//雨天模式按钮只在司机屏生效,乘客屏不显示 //雨天模式按钮只在司机屏生效,乘客屏不显示
@@ -634,7 +635,7 @@ internal class DebugSettingView @JvmOverloads constructor(
//重启工控机所有节点 //重启工控机所有节点
btnIpcReboot.onClick { btnIpcReboot.onClick {
CallerAutoPilotManager.sendIpcReboot() CallerAutoPilotControlManager.sendIpcReboot()
ToastUtils.showLong("重启命令已发送") ToastUtils.showLong("重启命令已发送")
} }
//只在司机端设置工控机节点重启功能 //只在司机端设置工控机节点重启功能
@@ -773,7 +774,7 @@ internal class DebugSettingView @JvmOverloads constructor(
// 模拟自动驾驶中 // 模拟自动驾驶中
tbChangeAutoPilotStatus.setOnCheckedChangeListener { _, isChecked -> tbChangeAutoPilotStatus.setOnCheckedChangeListener { _, isChecked ->
CallerAutoPilotManager.setControlAutopilotCarAuto(isChecked) CallerAutoPilotControlManager.setControlAutopilotCarAuto(isChecked)
} }
when { when {
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) -> { AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) -> {
@@ -794,7 +795,7 @@ internal class DebugSettingView @JvmOverloads constructor(
} }
//初始化ADAS日志开关状态 //初始化ADAS日志开关状态
tbADASLog.isChecked = CallerAutoPilotManager.isEnableLog() tbADASLog.isChecked = CallerAutoPilotControlManager.isEnableLog()
//查看上报历史列表 //查看上报历史列表
tbReportMore.setOnCheckedChangeListener { _, isChecked -> tbReportMore.setOnCheckedChangeListener { _, isChecked ->
@@ -915,7 +916,7 @@ internal class DebugSettingView @JvmOverloads constructor(
btnConnectServerIp.setOnClickListener { btnConnectServerIp.setOnClickListener {
val ip = etConnectServerIp.text.toString() val ip = etConnectServerIp.text.toString()
if (!ip.isNullOrEmpty()) { if (!ip.isNullOrEmpty()) {
CallerAutoPilotManager.connectSpecifiedServer(ip) CallerAutoPilotControlManager.connectSpecifiedServer(ip)
} }
} }
@@ -982,7 +983,7 @@ internal class DebugSettingView @JvmOverloads constructor(
btnSetAutopilotIP.setOnClickListener { btnSetAutopilotIP.setOnClickListener {
val autoPilotIp = etAutopilotIP.text.toString() val autoPilotIp = etAutopilotIP.text.toString()
if (autoPilotIp.isNotEmpty()) { if (autoPilotIp.isNotEmpty()) {
CallerAutoPilotManager.resetIpAddress(autoPilotIp) CallerAutoPilotControlManager.resetIpAddress(autoPilotIp)
} else { } else {
ToastUtils.showShort("请输入正确的IP地址") ToastUtils.showShort("请输入正确的IP地址")
} }
@@ -990,7 +991,7 @@ internal class DebugSettingView @JvmOverloads constructor(
//断开与工控机的连接 //断开与工控机的连接
btnDisconnectIpc.setOnClickListener { btnDisconnectIpc.setOnClickListener {
CallerAutoPilotManager.disconnectIpc() CallerAutoPilotControlManager.disconnectIpc()
} }
/** /**
@@ -1000,32 +1001,32 @@ internal class DebugSettingView @JvmOverloads constructor(
val recordTimeStr = etInputRecordTime.text?.toString() val recordTimeStr = etInputRecordTime.text?.toString()
try { try {
if (recordTimeStr.isNullOrEmpty()) { if (recordTimeStr.isNullOrEmpty()) {
CallerAutoPilotManager.recordPackage() CallerAutoPilotControlManager.recordPackage()
} }
val recordTime = recordTimeStr?.toInt() val recordTime = recordTimeStr?.toInt()
if (recordTime != null && recordTime > 0) { if (recordTime != null && recordTime > 0) {
CallerAutoPilotManager.recordPackage(recordTime) CallerAutoPilotControlManager.recordPackage(recordTime)
} else { } else {
CallerAutoPilotManager.recordPackage() CallerAutoPilotControlManager.recordPackage()
} }
} catch (e: Exception) { } catch (e: Exception) {
CallerAutoPilotManager.recordPackage() CallerAutoPilotControlManager.recordPackage()
} }
} }
btnRecordBag.onClick { btnRecordBag.onClick {
val recordTimeStr = etInputRecordBagTime.text?.toString() val recordTimeStr = etInputRecordBagTime.text?.toString()
try { try {
if (recordTimeStr.isNullOrEmpty()) { if (recordTimeStr.isNullOrEmpty()) {
CallerAutoPilotManager.recordPackage() CallerAutoPilotControlManager.recordPackage()
} }
val recordTime = recordTimeStr?.toInt() val recordTime = recordTimeStr?.toInt()
if (recordTime != null && recordTime > 0) { if (recordTime != null && recordTime > 0) {
CallerAutoPilotManager.recordPackage(recordTime) CallerAutoPilotControlManager.recordPackage(recordTime)
} else { } else {
CallerAutoPilotManager.recordPackage() CallerAutoPilotControlManager.recordPackage()
} }
} catch (e: Exception) { } catch (e: Exception) {
CallerAutoPilotManager.recordPackage() CallerAutoPilotControlManager.recordPackage()
} }
} }
@@ -1193,9 +1194,9 @@ internal class DebugSettingView @JvmOverloads constructor(
*/ */
tbADASLog.setOnCheckedChangeListener { _, isChecked -> tbADASLog.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) { if (isChecked) {
CallerAutoPilotManager.setEnableLog(true) CallerAutoPilotControlManager.setEnableLog(true)
} else { } else {
CallerAutoPilotManager.setEnableLog(false) CallerAutoPilotControlManager.setEnableLog(false)
} }
} }
@@ -1519,7 +1520,7 @@ internal class DebugSettingView @JvmOverloads constructor(
tvAppVersionNameKey.text = "鹰眼版本名:${AppUtils.getAppVersionName()}" tvAppVersionNameKey.text = "鹰眼版本名:${AppUtils.getAppVersionName()}"
tvAutopilotProtocolVersionInfo.text = tvAutopilotProtocolVersionInfo.text =
"Autopilot协议版本${CallerAutoPilotManager.getProtocolVersion()}" "Autopilot协议版本${CallerAutoPilotControlManager.getProtocolVersion()}"
if (AppConfigInfo.protocolVersionNumber == 0) { if (AppConfigInfo.protocolVersionNumber == 0) {
tvIpcProtocolVersionInfo.text = "工控机协议版本:未知" tvIpcProtocolVersionInfo.text = "工控机协议版本:未知"
} else { } else {
@@ -1825,7 +1826,7 @@ internal class DebugSettingView @JvmOverloads constructor(
} }
} }
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) { override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
mGnssInfo = gnssInfo mGnssInfo = gnssInfo
//实时加速度列表 //实时加速度列表
ThreadUtils.runOnUiThread { ThreadUtils.runOnUiThread {
@@ -1904,14 +1905,14 @@ internal class DebugSettingView @JvmOverloads constructor(
var resultStr = "result:" var resultStr = "result:"
for (result in it.resultList) { for (result in it.resultList) {
resultStr = resultStr =
"$resultStr$result${CallerAutoPilotManager.getReportResultDesc(result)} " "$resultStr$result${CallerAutoPilotControlManager.getReportResultDesc(result)} "
} }
tvReportResult.text = resultStr tvReportResult.text = resultStr
var actionStr = "action:" var actionStr = "action:"
for (action in it.actionsList) { for (action in it.actionsList) {
actionStr = actionStr =
"$actionStr$action${CallerAutoPilotManager.getReportActionDesc(action)} " "$actionStr$action${CallerAutoPilotControlManager.getReportActionDesc(action)} "
} }
tvReportActions.text = actionStr tvReportActions.text = actionStr
@@ -2010,14 +2011,14 @@ internal class DebugSettingView @JvmOverloads constructor(
var resultStr = "result:" var resultStr = "result:"
for (result in it.resultList) { for (result in it.resultList) {
resultStr = resultStr =
"$resultStr$result${CallerAutoPilotManager.getReportResultDesc(result)} " "$resultStr$result${CallerAutoPilotControlManager.getReportResultDesc(result)} "
} }
tvReportResult.text = resultStr tvReportResult.text = resultStr
var actionStr = "action:" var actionStr = "action:"
for (action in it.actionsList) { for (action in it.actionsList) {
actionStr = actionStr =
"$actionStr$action${CallerAutoPilotManager.getReportActionDesc(action)} " "$actionStr$action${CallerAutoPilotControlManager.getReportActionDesc(action)} "
} }
tvReportActions.text = actionStr tvReportActions.text = actionStr
if ("error" == it.level) { if ("error" == it.level) {

View File

@@ -6,7 +6,7 @@ import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.report.ReportEntity import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.R
import me.jessyan.autosize.AutoSizeCompat import me.jessyan.autosize.AutoSizeCompat
@@ -37,13 +37,13 @@ class IPCReportAdapter: RecyclerView.Adapter<IPCReportAdapter.IPCReportHolder>()
holder.tvReportTimeContent.text = it.time holder.tvReportTimeContent.text = it.time
var resultStr = "发生异常" var resultStr = "发生异常"
for (result in it.resultList){ for (result in it.resultList){
resultStr = "${resultStr}-${CallerAutoPilotManager.getReportResultDesc(result)}" resultStr = "${resultStr}-${CallerAutoPilotControlManager.getReportResultDesc(result)}"
} }
holder.tvReportResultContent.text = resultStr holder.tvReportResultContent.text = resultStr
holder.tvReportMsgContent.text = it.msg holder.tvReportMsgContent.text = it.msg
var actionStr = "" var actionStr = ""
for (action in it.actionsList){ for (action in it.actionsList){
actionStr = "${actionStr}-${CallerAutoPilotManager.getReportActionDesc(action)}" actionStr = "${actionStr}-${CallerAutoPilotControlManager.getReportActionDesc(action)}"
} }
holder.tvReportActionContent.text = actionStr holder.tvReportActionContent.text = actionStr
} }

View File

@@ -9,7 +9,7 @@ import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.report.ReportEntity import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.R
/** /**
@@ -45,12 +45,12 @@ class ReportListAdapter(context: Context) :
holder.tvReportCode.text = "code:${it.code}" holder.tvReportCode.text = "code:${it.code}"
var resultStr = "result:" var resultStr = "result:"
for (result in it.resultList) { for (result in it.resultList) {
resultStr = "$resultStr$result${CallerAutoPilotManager.getReportResultDesc(result)} " resultStr = "$resultStr$result${CallerAutoPilotControlManager.getReportResultDesc(result)} "
} }
holder.tvReportResult.text = resultStr holder.tvReportResult.text = resultStr
var actionStr = "action:" var actionStr = "action:"
for (action in it.actionsList) { for (action in it.actionsList) {
actionStr = "$actionStr$action${CallerAutoPilotManager.getReportActionDesc(action)} " actionStr = "$actionStr$action${CallerAutoPilotControlManager.getReportActionDesc(action)} "
} }
holder.tvReportActions.text = actionStr holder.tvReportActions.text = actionStr

View File

@@ -10,7 +10,7 @@ import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
@@ -49,7 +49,7 @@ internal class SOPSettingView @JvmOverloads constructor(
//绕障类功能开关 //绕障类功能开关
tbObstacleAvoidance.isChecked = FunctionBuildConfig.isDetouring tbObstacleAvoidance.isChecked = FunctionBuildConfig.isDetouring
tbObstacleAvoidance.setOnCheckedChangeListener { _, isChecked -> tbObstacleAvoidance.setOnCheckedChangeListener { _, isChecked ->
CallerAutoPilotManager.sendDetouring(isChecked) CallerAutoPilotControlManager.sendDetouring(isChecked)
FunctionBuildConfig.isDetouring = isChecked FunctionBuildConfig.isDetouring = isChecked
} }
@@ -161,10 +161,10 @@ internal class SOPSettingView @JvmOverloads constructor(
tbDemoMode.setOnCheckedChangeListener { _, _ -> tbDemoMode.setOnCheckedChangeListener { _, _ ->
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context)) CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context))
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) CallerAutoPilotControlManager.setDemoMode(FunctionBuildConfig.isDemoMode)
if (!FunctionBuildConfig.isDemoMode) { if (!FunctionBuildConfig.isDemoMode) {
//关闭美化模式时,通知工控机 //关闭美化模式时,通知工控机
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode) CallerAutoPilotControlManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
} }
} }
//只在司机端设置美化模式开关功能 //只在司机端设置美化模式开关功能
@@ -177,7 +177,7 @@ internal class SOPSettingView @JvmOverloads constructor(
tbRainMode.isChecked = FunctionBuildConfig.isRainMode tbRainMode.isChecked = FunctionBuildConfig.isRainMode
//雨天模式 //雨天模式
tbRainMode.setOnCheckedChangeListener { _, isChecked -> tbRainMode.setOnCheckedChangeListener { _, isChecked ->
CallerAutoPilotManager.setRainMode(isChecked) CallerAutoPilotControlManager.setRainMode(isChecked)
FunctionBuildConfig.isRainMode = isChecked FunctionBuildConfig.isRainMode = isChecked
} }
//雨天模式按钮只在司机屏生效,乘客屏不显示 //雨天模式按钮只在司机屏生效,乘客屏不显示
@@ -227,7 +227,7 @@ internal class SOPSettingView @JvmOverloads constructor(
} }
btnSpeedSet.setOnClickListener { btnSpeedSet.setOnClickListener {
val isSuccess = val isSuccess =
CallerAutoPilotManager.sendDetouringSpeed(FunctionBuildConfig.detouringSpeed.toDouble()) CallerAutoPilotControlManager.sendDetouringSpeed(FunctionBuildConfig.detouringSpeed.toDouble())
if (isSuccess == true) { if (isSuccess == true) {
ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置成功") ToastUtils.showShort("变道绕障的目标障碍物速度阈值设置成功")
} else { } else {

View File

@@ -4,7 +4,7 @@ import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
@@ -25,10 +25,10 @@ class DemoModeHiddenSwitch(context: Context, attrs: AttributeSet?) : View(contex
"demoMode", "demoMode",
DemoModeView(context) DemoModeView(context)
) )
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) CallerAutoPilotControlManager.setDemoMode(FunctionBuildConfig.isDemoMode)
if (!FunctionBuildConfig.isDemoMode) { if (!FunctionBuildConfig.isDemoMode) {
//关闭美化模式时,通知工控机 //关闭美化模式时,通知工控机
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode) CallerAutoPilotControlManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
} }
} }
} }

View File

@@ -7,7 +7,6 @@ import android.graphics.Color
import android.graphics.drawable.ColorDrawable import android.graphics.drawable.ColorDrawable
import android.os.Process import android.os.Process
import android.util.AttributeSet import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.widget.FrameLayout import android.widget.FrameLayout
@@ -18,10 +17,9 @@ import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo
import com.mogo.eagle.core.data.temp.EventLogout import com.mogo.eagle.core.data.temp.EventLogout
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
@@ -77,7 +75,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
} }
else -> { else -> {
// 设置自动驾驶速度 // 设置自动驾驶速度
val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speed) val isSuccess = CallerAutoPilotControlManager.setAutoPilotSpeed(speed)
when { when {
isSuccess -> { isSuccess -> {
ToastUtils.showShort("车速设置成功,立即生效") ToastUtils.showShort("车速设置成功,立即生效")
@@ -110,7 +108,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
} }
if (AppConfigInfo.isConnectAutopilot) { if (AppConfigInfo.isConnectAutopilot) {
CallerAutoPilotManager.getCarConfig() CallerAutoPilotControlManager.getCarConfig()
} }
// if (maxAcceleration > 0) { // if (maxAcceleration > 0) {
// tvAcceleration.text = "加速度 $maxAcceleration m/s²" // tvAcceleration.text = "加速度 $maxAcceleration m/s²"
@@ -142,7 +140,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
//速度确认 //速度确认
tvSureModify.setOnClickListener { tvSureModify.setOnClickListener {
val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speedLimit) val isSuccess = CallerAutoPilotControlManager.setAutoPilotSpeed(speedLimit)
when { when {
isSuccess -> { isSuccess -> {
//速度显示 //速度显示

View File

@@ -8,7 +8,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lat import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lat
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lon import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lon
@@ -85,7 +85,7 @@ class AutoPilotStatusView constructor(
AutopilotControlParameters.AutoPilotLonLat(26.819716071924688, 112.57715442110867) AutopilotControlParameters.AutoPilotLonLat(26.819716071924688, 112.57715442110867)
currentAutopilot.vehicleType = 10 currentAutopilot.vehicleType = 10
CallerAutoPilotManager.startAutoPilot(currentAutopilot) CallerAutoPilotControlManager.startAutoPilot(currentAutopilot)
} }
/** /**

View File

@@ -9,7 +9,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.R
@@ -68,7 +68,7 @@ class CheckSystemView @JvmOverloads constructor(
else { else {
//确认重启 //确认重启
CallerLogger.d("$M_HMI$TAG", "reboot confirm") CallerLogger.d("$M_HMI$TAG", "reboot confirm")
CallerAutoPilotManager.setIPCReboot() CallerAutoPilotControlManager.setIPCReboot()
} }
} }

View File

@@ -5,12 +5,12 @@ import android.graphics.Color
import android.util.AttributeSet import android.util.AttributeSet
import android.view.Gravity import android.view.Gravity
import android.widget.FrameLayout import android.widget.FrameLayout
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import mogo.telematics.pad.MessagePad
import java.util.* import java.util.*
/** /**
@@ -29,7 +29,7 @@ class SpeedPanelView @JvmOverloads constructor(
var mContext: Context var mContext: Context
var mSpeedChartView: SpeedChartView var mSpeedChartView: SpeedChartView
var mLatLng: MessagePad.GnssInfo? = null var mLatLng: MogoLocation? = null
var mSpeedLimit = 60 var mSpeedLimit = 60
private val timer by lazy { private val timer by lazy {
@@ -77,7 +77,7 @@ class SpeedPanelView @JvmOverloads constructor(
timer.schedule(task, Date(), 200) timer.schedule(task, Date(), 200)
} }
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) { override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
gnssInfo?.let { gnssInfo?.let {
mLatLng = gnssInfo mLatLng = gnssInfo
} }

View File

@@ -24,7 +24,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.mofang.MfConstants; import com.mogo.eagle.core.data.mofang.MfConstants;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider; import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener; import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager; import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
import com.mogo.eagle.core.function.hmi.R; import com.mogo.eagle.core.function.hmi.R;
@@ -351,7 +351,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (isShowToast) { if (isShowToast) {
ToastUtils.showShort("方块 单击C ← 向左变道 "); ToastUtils.showShort("方块 单击C ← 向左变道 ");
} }
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneLeft(); CallerAutoPilotControlManager.INSTANCE.sendOperatorChangeLaneLeft();
} }
} }
return true; return true;
@@ -372,7 +372,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (isShowToast) { if (isShowToast) {
ToastUtils.showShort("方块 单击D → 向右变道 "); ToastUtils.showShort("方块 单击D → 向右变道 ");
} }
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight(); CallerAutoPilotControlManager.INSTANCE.sendOperatorChangeLaneRight();
} }
} }
return true; return true;
@@ -384,14 +384,14 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (isShowToast) { if (isShowToast) {
ToastUtils.showShort("方块 长按E 鸣笛 "); ToastUtils.showShort("方块 长按E 鸣笛 ");
} }
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1); CallerAutoPilotControlManager.INSTANCE.sendOperatorSetHorn(1);
if (timerHorn == null) { if (timerHorn == null) {
timerHorn = new Timer(); timerHorn = new Timer();
} }
timerHorn.schedule(new TimerTask() { timerHorn.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(2); CallerAutoPilotControlManager.INSTANCE.sendOperatorSetHorn(2);
timerHorn = null; timerHorn = null;
} }
}, 500); }, 500);
@@ -404,7 +404,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (isShowToast) { if (isShowToast) {
ToastUtils.showShort("方块 单击E 开启自动驾驶 "); ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
} }
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters()); CallerAutoPilotControlManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
} }
} }
return true; return true;
@@ -425,7 +425,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
timerAcc.schedule(new TimerTask() { timerAcc.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
CallerAutoPilotManager.INSTANCE.sendOperatorSetAcceleratedSpeed(accelerated); CallerAutoPilotControlManager.INSTANCE.sendOperatorSetAcceleratedSpeed(accelerated);
} }
}, 0, 500); }, 0, 500);
} }
@@ -434,7 +434,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
timerAcc.cancel(); timerAcc.cancel();
timerAcc = null; timerAcc = null;
} }
CallerAutoPilotManager.INSTANCE.sendOperatorSetAcceleratedSpeed(acc); CallerAutoPilotControlManager.INSTANCE.sendOperatorSetAcceleratedSpeed(acc);
} }
} }

View File

@@ -20,13 +20,12 @@ import android.widget.FrameLayout;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.module.intent.IMogoIntentListener; import com.mogo.commons.module.intent.IMogoIntentListener;
import com.mogo.commons.module.intent.IntentManager; import com.mogo.commons.module.intent.IntentManager;
import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider; import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener; import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager; import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
import com.mogo.eagle.core.function.hmi.R; import com.mogo.eagle.core.function.hmi.R;
@@ -300,7 +299,7 @@ public class PassengerLauncherActivity extends MainActivity implements IMogoInte
isCombinationKey = false; isCombinationKey = false;
if ((pressCUpTime - startPressTime) < 300) { if ((pressCUpTime - startPressTime) < 300) {
ToastUtils.showShort("方块 单击C ← 向左变道 "); ToastUtils.showShort("方块 单击C ← 向左变道 ");
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneLeft(); CallerAutoPilotControlManager.INSTANCE.sendOperatorChangeLaneLeft();
} }
} }
return true; return true;
@@ -318,7 +317,7 @@ public class PassengerLauncherActivity extends MainActivity implements IMogoInte
isCombinationKey = false; isCombinationKey = false;
if ((pressDUpTime - startPressTime) < 300) { if ((pressDUpTime - startPressTime) < 300) {
ToastUtils.showShort("方块 单击D → 向右变道 "); ToastUtils.showShort("方块 单击D → 向右变道 ");
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight(); CallerAutoPilotControlManager.INSTANCE.sendOperatorChangeLaneRight();
} }
} }
@@ -329,14 +328,14 @@ public class PassengerLauncherActivity extends MainActivity implements IMogoInte
if (!isCombinationKey) { if (!isCombinationKey) {
if ((pressEDownTime - startPressTime) > 1900) { if ((pressEDownTime - startPressTime) > 1900) {
ToastUtils.showShort("方块 长按E 鸣笛 "); ToastUtils.showShort("方块 长按E 鸣笛 ");
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1); CallerAutoPilotControlManager.INSTANCE.sendOperatorSetHorn(1);
if (timerHorn == null) { if (timerHorn == null) {
timerHorn = new Timer(); timerHorn = new Timer();
} }
timerHorn.schedule(new TimerTask() { timerHorn.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(2); CallerAutoPilotControlManager.INSTANCE.sendOperatorSetHorn(2);
timerHorn = null; timerHorn = null;
} }
}, 500); }, 500);
@@ -348,7 +347,7 @@ public class PassengerLauncherActivity extends MainActivity implements IMogoInte
isCombinationKey = false; isCombinationKey = false;
if ((pressEUpTime - startPressTime) < 300) { if ((pressEUpTime - startPressTime) < 300) {
ToastUtils.showShort("方块 单击E 开启自动驾驶 "); ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters()); CallerAutoPilotControlManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
} }
} }
@@ -372,7 +371,7 @@ public class PassengerLauncherActivity extends MainActivity implements IMogoInte
timerAcc.schedule(new TimerTask() { timerAcc.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
CallerAutoPilotManager.INSTANCE.sendOperatorSetAcceleratedSpeed(accelerated); CallerAutoPilotControlManager.INSTANCE.sendOperatorSetAcceleratedSpeed(accelerated);
} }
}, 0, 500); }, 0, 500);
} }
@@ -381,7 +380,7 @@ public class PassengerLauncherActivity extends MainActivity implements IMogoInte
timerAcc.cancel(); timerAcc.cancel();
timerAcc = null; timerAcc = null;
} }
CallerAutoPilotManager.INSTANCE.sendOperatorSetAcceleratedSpeed(acc); CallerAutoPilotControlManager.INSTANCE.sendOperatorSetAcceleratedSpeed(acc);
} }
} }

View File

@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.business;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.enums.DataSourceType; import com.mogo.eagle.core.data.enums.DataSourceType;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager; import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
@@ -13,8 +14,6 @@ import java.util.Objects;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
import mogo.telematics.pad.MessagePad;
/** /**
* 限速 * 限速
* *
@@ -24,7 +23,7 @@ public class SpeedLimitDataManager implements IMoGoChassisLocationGCJ02Listener
private final static String TAG = "SpeedLimitDataManager"; private final static String TAG = "SpeedLimitDataManager";
private static volatile SpeedLimitDataManager instance; private static volatile SpeedLimitDataManager instance;
private MessagePad.GnssInfo mLocation; private MogoLocation mLocation;
private SpeedLimitDataManager() { private SpeedLimitDataManager() {
} }
@@ -41,7 +40,7 @@ public class SpeedLimitDataManager implements IMoGoChassisLocationGCJ02Listener
} }
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
mLocation = gnssInfo; mLocation = gnssInfo;
} }

View File

@@ -8,16 +8,18 @@ import com.mogo.cloud.passport.MoGoAiCloudClient
import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.constants.MogoServicePaths import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.* import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
import com.mogo.eagle.core.function.call.autopilot.* import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
import com.zhidaoauto.map.operational.open.GatherApi import com.zhidaoauto.map.operational.open.GatherApi
import com.zhidaoauto.map.operational.open.GatherParams import com.zhidaoauto.map.operational.open.GatherParams
import com.zhidaoauto.map.operational.open.abs.OnTaskListener import com.zhidaoauto.map.operational.open.abs.OnTaskListener
import mogo.telematics.pad.MessagePad.GnssInfo
import record_cache.RecordPanelOuterClass import record_cache.RecordPanelOuterClass
import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.CopyOnWriteArrayList import java.util.concurrent.CopyOnWriteArrayList
@@ -168,14 +170,14 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
} }
} }
override fun onChassisLocationGCJ02(gnssInfo: GnssInfo?) { override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
val location = CallerMapLocationListenerManager.getCurrentLocation() ?: return val location = CallerMapLocationListenerManager.getCurrentLocation() ?: return
executor.get()?.updateLocation( executor.get()?.updateLocation(
location.longitude, location.longitude,
location.latitude, location.latitude,
location.altitude, location.altitude,
location.bearing, location.heading.toFloat(),
location.speed, location.gnssSpeed,
false) false)
} }

View File

@@ -5,6 +5,7 @@ import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningTrajectoryListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningTrajectoryListener;
@@ -65,7 +66,7 @@ public class MogoRouteOverlayManager implements
} }
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
if (gnssInfo == null) { if (gnssInfo == null) {
return; return;
} }

View File

@@ -8,10 +8,10 @@ import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.commons.mvp.MvpFragment import com.mogo.commons.mvp.MvpFragment
import com.mogo.eagle.core.data.constants.MoGoConfig import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.map.CenterLine import com.mogo.eagle.core.data.map.CenterLine
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
import com.mogo.eagle.core.function.business.MapPointCloudSubscriber import com.mogo.eagle.core.function.business.MapPointCloudSubscriber
@@ -19,29 +19,21 @@ import com.mogo.eagle.core.function.business.SpeedLimitDataManager
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBrakeLight import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBrakeLight
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
import com.mogo.eagle.core.function.call.map.CallerHDMapManager import com.mogo.eagle.core.function.call.map.CallerHDMapManager
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
import com.mogo.eagle.core.function.datacenter.location.IMoGoLocationListener
import com.mogo.eagle.core.function.datacenter.location.MoGoLocationManager
import com.mogo.eagle.core.function.overview.InfStructureManager
import com.mogo.eagle.core.function.overview.InfStructureManager.savePlanningData
import com.mogo.eagle.core.function.overview.obtainViewModel
import com.mogo.eagle.core.function.overview.vm.OverViewModel
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.core.utilcode.util.Utils import com.mogo.eagle.core.utilcode.util.Utils
import com.mogo.map.IMogoMap import com.mogo.map.IMogoMap
import com.mogo.map.MogoMapView import com.mogo.map.MogoMapView
import com.mogo.map.uicontroller.IMogoMapUIController import com.mogo.map.uicontroller.IMogoMapUIController
import com.zhidaoauto.map.sdk.open.MapAutoApi import com.zhidaoauto.map.sdk.open.MapAutoApi
import com.zhidaoauto.map.sdk.open.business.PointCloudHelper import com.zhidaoauto.map.sdk.open.business.PointCloudHelper
import mogo.telematics.pad.MessagePad
/** /**
* @author donghongyu * @author donghongyu
@@ -54,8 +46,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
MapView, MapView,
IMoGoMapFragmentProvider, IMoGoMapFragmentProvider,
IMoGoSkinModeChangeListener, IMoGoSkinModeChangeListener,
IMoGoLocationListener, IMoGoChassisLocationWGS84Listener,
IMoGoPlanningRottingListener,
IMoGoChassisLamplightListener { IMoGoChassisLamplightListener {
private var mMogoMapView: MogoMapView? = null private var mMogoMapView: MogoMapView? = null
@@ -113,8 +104,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
} }
// 添加换肤监听 // 添加换肤监听
CallerSkinModeListenerManager.addListener(Companion.functionName, this) CallerSkinModeListenerManager.addListener(Companion.functionName, this)
CallerPlanningRottingListenerManager.addListener(Companion.functionName, this) CallerChassisLocationWGS84ListenerManager.addListener(Companion.functionName, this)
MoGoLocationManager.addListener(Companion.functionName, this)
CallerChassisLamplightListenerManager.addListener(Companion.functionName, this) CallerChassisLamplightListenerManager.addListener(Companion.functionName, this)
} }
@@ -200,15 +190,6 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
MogoRouteOverlayManager.getInstance().init() MogoRouteOverlayManager.getInstance().init()
MapPointCloudSubscriber.instance MapPointCloudSubscriber.instance
SpeedLimitDataManager.getInstance().start() SpeedLimitDataManager.getInstance().start()
// TODO GD地图业务需要与高精地图业务拆开 --- 扶风
queryInfStructure()
}
private fun queryInfStructure() {
val viewModel = this.obtainViewModel(OverViewModel::class.java)
viewModel.infStructuresMap.observe(this.viewLifecycleOwner) { t -> InfStructureManager.saveData(t) }
viewModel.fetchInfStructures()
} }
override fun getUIController(): IMogoMapUIController { override fun getUIController(): IMogoMapUIController {
@@ -217,8 +198,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
override fun onDestroyView() { override fun onDestroyView() {
CallerSkinModeListenerManager.removeListener(Companion.functionName) CallerSkinModeListenerManager.removeListener(Companion.functionName)
CallerPlanningRottingListenerManager.removeListener(Companion.functionName) CallerChassisLocationWGS84ListenerManager.removeListener(Companion.functionName)
MoGoLocationManager.removeListener(Companion.functionName)
CallerChassisLamplightListenerManager.removeListener(Companion.functionName) CallerChassisLamplightListenerManager.removeListener(Companion.functionName)
if (mMogoMapView != null) { if (mMogoMapView != null) {
@@ -334,11 +314,6 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
override val functionName: String override val functionName: String
get() = functionName get() = functionName
// TODO 全览模式需要自己监听 --- 扶风
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
UiThreadHandler.post { savePlanningData(globalPathResp!!.wayPointsList) }
}
private var turnLightTimes = 0 private var turnLightTimes = 0
private var isOnTurnLight = false private var isOnTurnLight = false
private var turnLight = 0 private var turnLight = 0
@@ -346,8 +321,8 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
private var isShowTurnLight = false private var isShowTurnLight = false
private var brakeLight = -1 private var brakeLight = -1
override fun onLocationChanged(gnssInfo: MessagePad.GnssInfo,sourceType: DataSourceType) { override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
// 新地图控件 // 新地图控件
mMogoMapView?.setExtraGPSData(gnssInfo) mMogoMapView?.setExtraGPSData(gnssInfo)
if (gnssInfo != null) { if (gnssInfo != null) {
@@ -364,6 +339,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
} }
} }
override fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?) { override fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?) {
//can数据转发 转向灯状态 0是正常 1是左转 2是右转 //can数据转发 转向灯状态 0是正常 1是左转 2是右转
if (lightSwitch != null) { if (lightSwitch != null) {

View File

@@ -19,9 +19,10 @@ import com.amap.api.maps.model.*
import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.map.Infrastructure import com.mogo.eagle.core.data.map.Infrastructure
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager.getGlobalPath import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.getGlobalPath
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showVideoDialog import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showVideoDialog
@@ -83,7 +84,7 @@ class OverMapView @JvmOverloads constructor(
// 绘制轨迹线的集合 // 绘制轨迹线的集合
private val textureList: MutableList<BitmapDescriptor?> = ArrayList() private val textureList: MutableList<BitmapDescriptor?> = ArrayList()
private val texIndexList: MutableList<Int> = ArrayList() private val texIndexList: MutableList<Int> = ArrayList()
private var mLocation: MessagePad.GnssInfo? = null private var mLocation: MogoLocation? = null
private var isFirstLocation = true private var isFirstLocation = true
var mCustomMapStyleOptions: CustomMapStyleOptions? = null var mCustomMapStyleOptions: CustomMapStyleOptions? = null
var currMarkerList: ArrayList<Marker>? = null var currMarkerList: ArrayList<Marker>? = null
@@ -269,12 +270,14 @@ class OverMapView @JvmOverloads constructor(
* 室内某个bag包自动驾驶启动8s后返回 * 室内某个bag包自动驾驶启动8s后返回
*/ */
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) { override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
Log.d(TAG, "onAutopilotRotting") globalPathResp?.let {
handlePlanningData(globalPathResp!!.wayPointsList) handlePlanningData(it.wayPointsList)
}
} }
} }
fun handlePlanningData(locationList: List<MessagePad.Location>) { fun handlePlanningData(locationList: List<MessagePad.Location>?) {
if (locationList.isNullOrEmpty()) return
val list: List<MessagePad.Location> = locationList val list: List<MessagePad.Location> = locationList
// 转成高德坐标系并存储 // 转成高德坐标系并存储
updateRoutePoints(list, mContext!!) updateRoutePoints(list, mContext!!)
@@ -493,7 +496,7 @@ class OverMapView @JvmOverloads constructor(
* *
* @param location * @param location
*/ */
private fun drawCarMarker(location: MessagePad.GnssInfo?) { private fun drawCarMarker(location: MogoLocation?) {
if (location == null) return if (location == null) return
if (mCarMarker != null) { if (mCarMarker != null) {
val currentLatLng = LatLng(location.latitude, location.longitude) val currentLatLng = LatLng(location.latitude, location.longitude)
@@ -568,7 +571,7 @@ class OverMapView @JvmOverloads constructor(
} }
} }
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) { override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
mLocation = gnssInfo mLocation = gnssInfo
lonLat = Pair(gnssInfo!!.longitude, gnssInfo.latitude) lonLat = Pair(gnssInfo!!.longitude, gnssInfo.latitude)
drawCarMarker(gnssInfo) drawCarMarker(gnssInfo)

View File

@@ -31,6 +31,7 @@ import com.amap.api.maps.model.Polyline;
import com.amap.api.maps.model.PolylineOptions; import com.amap.api.maps.model.PolylineOptions;
import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.Infrastructure; import com.mogo.eagle.core.data.map.Infrastructure;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
@@ -92,7 +93,7 @@ public class AMapCustomView
private List<BitmapDescriptor> textureList = new ArrayList<>(); private List<BitmapDescriptor> textureList = new ArrayList<>();
private List<Integer> texIndexList = new ArrayList<>(); private List<Integer> texIndexList = new ArrayList<>();
private MessagePad.GnssInfo mLocation; private MogoLocation mLocation;
private boolean isFirstLocation = true; private boolean isFirstLocation = true;
CustomMapStyleOptions mCustomMapStyleOptions; CustomMapStyleOptions mCustomMapStyleOptions;
@@ -224,11 +225,14 @@ public class AMapCustomView
@Override @Override
public void onAutopilotRotting(@org.jetbrains.annotations.Nullable MessagePad.GlobalPathResp globalPathResp) { public void onAutopilotRotting(@org.jetbrains.annotations.Nullable MessagePad.GlobalPathResp globalPathResp) {
Log.d(TAG, "onAutopilotRotting"); Log.d(TAG, "onAutopilotRotting");
handlePlanningData(globalPathResp.getWayPointsList()); if (globalPathResp != null) {
handlePlanningData(globalPathResp.getWayPointsList());
}
} }
}; };
public void handlePlanningData(List<MessagePad.Location> locationList) { public void handlePlanningData(List<MessagePad.Location> locationList) {
if (locationList == null || locationList.size() == 0) return;
List list = locationList; List list = locationList;
// 转成高德坐标系并存储 // 转成高德坐标系并存储
MarkerDrawerManager.INSTANCE.updateRoutePoints(list, mContext); MarkerDrawerManager.INSTANCE.updateRoutePoints(list, mContext);
@@ -456,7 +460,7 @@ public class AMapCustomView
* *
* @param location * @param location
*/ */
private void drawCarMarker(MessagePad.GnssInfo location) { private void drawCarMarker(MogoLocation location) {
if (location == null) return; if (location == null) return;
if (mCarMarker != null) { if (mCarMarker != null) {
LatLng currentLatLng = new LatLng(location.getLatitude(), location.getLongitude()); LatLng currentLatLng = new LatLng(location.getLatitude(), location.getLongitude());
@@ -534,7 +538,7 @@ public class AMapCustomView
} }
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
mLocation = gnssInfo; mLocation = gnssInfo;
MarkerDrawerManager.INSTANCE.setLonLat(new Pair(gnssInfo.getLongitude(), gnssInfo.getLatitude())); MarkerDrawerManager.INSTANCE.setLonLat(new Pair(gnssInfo.getLongitude(), gnssInfo.getLatitude()));
drawCarMarker(gnssInfo); drawCarMarker(gnssInfo);

View File

@@ -13,7 +13,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths; import com.mogo.eagle.core.data.constants.MoGoFragmentPaths;
import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider; import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.map.R; import com.mogo.eagle.core.function.map.R;
import com.mogo.eagle.core.function.overview.InfStructureManager; import com.mogo.eagle.core.function.overview.InfStructureManager;
@@ -117,7 +117,7 @@ public class OverviewMapFragment extends BaseFragment
public void onActivityCreated(@Nullable Bundle savedInstanceState) { public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState); super.onActivityCreated(savedInstanceState);
// 主动查一次全局路径规划的数据 // 主动查一次全局路径规划的数据
CallerAutoPilotManager.INSTANCE.getGlobalPath(); CallerAutoPilotControlManager.INSTANCE.getGlobalPath();
queryV2XEvents(); queryV2XEvents();
} }

View File

@@ -32,6 +32,7 @@ import com.amap.api.maps.model.PolylineOptions;
import com.mogo.cloud.commons.utils.CoordinateUtils; import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.map.R; import com.mogo.eagle.core.function.map.R;
@@ -47,8 +48,6 @@ import java.util.List;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
import mogo.telematics.pad.MessagePad;
/** /**
* 小地图的方向View * 小地图的方向View
* *
@@ -75,7 +74,7 @@ public class SmallMapDirectionView
private Polyline mPolyline; private Polyline mPolyline;
private CameraUpdate mCameraUpdate; private CameraUpdate mCameraUpdate;
private Context mContext; private Context mContext;
private MessagePad.GnssInfo mLocation; private MogoLocation mLocation;
public SmallMapDirectionView(Context context) { public SmallMapDirectionView(Context context) {
this(context, null); this(context, null);
@@ -179,7 +178,7 @@ public class SmallMapDirectionView
} }
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
if (gnssInfo == null) { if (gnssInfo == null) {
return; return;
} }

View File

@@ -17,7 +17,7 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider; import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.function.map.R; import com.mogo.eagle.core.function.map.R;
@@ -143,7 +143,7 @@ public class SmallMapFragment extends BaseFragment
clearPolyline(); clearPolyline();
}else if (tempStatus == 1 && autoPilotStatus == 0){ }else if (tempStatus == 1 && autoPilotStatus == 0){
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:getGlobalPath"); CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:getGlobalPath");
CallerAutoPilotManager.INSTANCE.getGlobalPath(); CallerAutoPilotControlManager.INSTANCE.getGlobalPath();
} }
autoPilotStatus = tempStatus; autoPilotStatus = tempStatus;
} }

View File

@@ -29,9 +29,9 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_C
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS
import com.mogo.eagle.core.data.map.MogoLocation import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.* import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager import com.mogo.eagle.core.function.call.analytics.AnalyticsManager
import com.mogo.eagle.core.function.call.autopilot.* import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
@@ -46,7 +46,6 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.rousetime.android_startup.AndroidStartup import com.rousetime.android_startup.AndroidStartup
import com.zhjt.service.chain.ChainLog import com.zhjt.service.chain.ChainLog
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
import mogo.telematics.pad.MessagePad.GnssInfo
class HttpDnsStartUp : AndroidStartup<Boolean>() { class HttpDnsStartUp : AndroidStartup<Boolean>() {
@@ -293,10 +292,9 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
CallerChassisLocationGCJ20ListenerManager.addListener( CallerChassisLocationGCJ20ListenerManager.addListener(
TAG, TAG,
object : IMoGoChassisLocationGCJ02Listener { object : IMoGoChassisLocationGCJ02Listener {
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
override fun onChassisLocationGCJ02(gnssInfo: GnssInfo?) { mogoLocation?.let {
CallerMapLocationListenerManager.getCurrentLocation()?.let { loc -> MogoLocationInfoServices.getInstance().provideLocation(mogoLocation)
MogoLocationInfoServices.getInstance().provideLocation(loc)
} }
} }
}, },

View File

@@ -1,47 +1,53 @@
package com.mogo.eagle.core.function.v2x.events package com.mogo.eagle.core.function.v2x.events
import android.content.* import android.content.Context
import android.os.* import android.content.Intent
import android.util.* import android.os.Handler
import androidx.localbroadcastmanager.content.* import android.os.Looper
import com.mogo.cloud.passport.* import android.util.Log
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import com.mogo.cloud.passport.IMoGoTokenCallback
import com.mogo.cloud.passport.MoGoAiCloudClient
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.constants.HostConst import com.mogo.commons.constants.HostConst
import com.mogo.commons.module.ServiceConst.CARD_TYPE_ROAD_CONDITION import com.mogo.commons.module.ServiceConst.CARD_TYPE_ROAD_CONDITION
import com.mogo.eagle.core.data.enums.EventTypeEnumNew import com.mogo.commons.network.ParamsUtil
import com.mogo.eagle.core.data.enums.EventTypeHelper
import com.mogo.commons.network.*
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_V2N import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_V2N
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CLOUD_V2N import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CLOUD_V2N
import com.mogo.eagle.core.data.enums.* import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.map.* import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.enums.EventTypeHelper
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay import com.mogo.eagle.core.data.map.entity.MarkerExploreWay
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity import com.mogo.eagle.core.data.map.entity.MarkerShowEntity
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity import com.mogo.eagle.core.data.map.entity.V2XMessageEntity
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.data.traffic.* import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.eagle.core.function.api.autopilot.* import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.api.hmi.warning.* import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.api.map.listener.* import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.* import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.hmi.* import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.* import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.v2x.events.alarm.* import com.mogo.eagle.core.function.v2x.events.alarm.V2XAlarmServer
import com.mogo.eagle.core.function.v2x.events.bridge.* import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.* import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_EXTRA_KEY
import com.mogo.eagle.core.function.v2x.events.manager.* import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_HANDLER_ACTION
import com.mogo.eagle.core.function.v2x.events.receiver.* import com.mogo.eagle.core.function.v2x.events.receiver.SceneBroadcastReceiver
import com.mogo.eagle.core.function.v2x.events.scenario.impl.* import com.mogo.eagle.core.function.v2x.events.scenario.impl.V2XScenarioManager
import com.mogo.eagle.core.function.v2x.events.utils.* import com.mogo.eagle.core.function.v2x.events.utils.TrackUtils
import com.mogo.eagle.core.function.v2x.events.utils.MapUtils import com.mogo.eagle.core.function.v2x.events.utils.toRoadMarker
import com.mogo.eagle.core.function.v2x.internal.V2XManager import com.mogo.eagle.core.function.v2x.internal.V2XManager
import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback
import com.mogo.eagle.core.function.v2x.internal.config.V2XConfig import com.mogo.eagle.core.function.v2x.internal.config.V2XConfig
@@ -51,27 +57,35 @@ import com.mogo.eagle.core.function.v2x.internal.data.V2XWarningTarget
import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent
import com.mogo.eagle.core.function.v2x.road.V2XEventServiceApi import com.mogo.eagle.core.function.v2x.road.V2XEventServiceApi
import com.mogo.eagle.core.network.MoGoRetrofitFactory import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.utilcode.mogo.logger.* import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.* import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.core.utilcode.util.Utils import com.mogo.eagle.core.utilcode.util.Utils
import com.mogo.map.marker.* import com.mogo.map.marker.IMogoMarker
import com.mogo.map.marker.IMogoMarkerClickListener
import com.mogo.map.marker.MogoMarkersHandler.Companion.mogoMarkersHandler import com.mogo.map.marker.MogoMarkersHandler.Companion.mogoMarkersHandler
import com.shuyu.gsyvideoplayer.* import com.shuyu.gsyvideoplayer.GSYVideoManager
import com.shuyu.gsyvideoplayer.cache.* import com.shuyu.gsyvideoplayer.cache.CacheFactory
import com.shuyu.gsyvideoplayer.model.* import com.shuyu.gsyvideoplayer.cache.ProxyCacheManager
import com.shuyu.gsyvideoplayer.player.* import com.shuyu.gsyvideoplayer.model.VideoOptionModel
import com.shuyu.gsyvideoplayer.utils.* import com.shuyu.gsyvideoplayer.player.IjkPlayerManager
import com.zhjt.service.chain.* import com.shuyu.gsyvideoplayer.player.PlayerFactory
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
import com.zhjt.service.chain.ChainLog
import com.zhjt.service.chain.TracingConstants
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import kotlinx.coroutines.* import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.android.* import kotlinx.coroutines.Dispatchers
import mogo.telematics.pad.MessagePad.GnssInfo import kotlinx.coroutines.android.asCoroutineDispatcher
import tv.danmaku.ijk.media.player.* import kotlinx.coroutines.cancel
import java.util.concurrent.* import kotlinx.coroutines.launch
import java.util.concurrent.atomic.* import tv.danmaku.ijk.media.player.IjkMediaPlayer
import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicBoolean
object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback, IV2XCallback { object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback, IV2XCallback {
@@ -116,13 +130,6 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
private fun registerListener() { private fun registerListener() {
V2XManager.addCallback(this) V2XManager.addCallback(this)
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this) CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
mogoMarkersHandler.registerMarkerClickListener(CARD_TYPE_ROAD_CONDITION,
object : IMogoMarkerClickListener {
override fun onMarkerClicked(marker: IMogoMarker?): Boolean {
handleRoadConditionMarkerClick(marker)
return super.onMarkerClicked(marker)
}
})
} }
private fun unRegisterListener() { private fun unRegisterListener() {
@@ -131,63 +138,6 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
mogoMarkersHandler.unregisterMarkerClickListener(CARD_TYPE_ROAD_CONDITION) mogoMarkersHandler.unregisterMarkerClickListener(CARD_TYPE_ROAD_CONDITION)
} }
private fun handleRoadConditionMarkerClick(marker: IMogoMarker?) {
//点击的marker的具体数据
val exploreWay = extractFromMarker(marker)
exploreWay?.let {
val item = it.items[0]
val path = item.url
if (path.contains(".mp4")) {
initVideo()
}
val roadEventEntity = V2XRoadEventEntity()
roadEventEntity.noveltyInfo = exploreWay
roadEventEntity.poiType = it.poiType
roadEventEntity.expireTime = 20000 //地理位置
//地理位置
val location = it.location
roadEventEntity.location = location
val v2XMessageEntity: V2XMessageEntity<V2XRoadEventEntity> =
V2XMessageEntity<V2XRoadEventEntity>()
v2XMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING
v2XMessageEntity.isShowState = true
v2XMessageEntity.isOnlyShow = true
v2XMessageEntity.isNeedAddLine = false
v2XMessageEntity.content = roadEventEntity
val intent = Intent(BROADCAST_SCENE_HANDLER_ACTION)
intent.putExtra(BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity)
LocalBroadcastManager.getInstance(context()).sendBroadcast(intent)
//埋点
TrackUtils.trackV2XMarkerClick(2)
}
}
private fun initVideo() {
PlayerFactory.setPlayManager(IjkPlayerManager::class.java)
CacheFactory.setCacheManager(ProxyCacheManager::class.java)
val list = mutableListOf<VideoOptionModel>()
list.add(VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "enable-accurate-seek", 1))
list.add(VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "videotoolbox", 0))
GSYVideoManager.instance().optionModelList = list
GSYVideoType.enableMediaCodec()
GSYVideoType.enableMediaCodecTexture()
}
private fun extractFromMarker(marker: IMogoMarker?): MarkerExploreWay? {
if (marker == null) {
return null
}
if (marker.getObject() is MarkerShowEntity) {
val showEntity = marker.getObject() as MarkerShowEntity
if (showEntity.bindObj is MarkerExploreWay) {
return showEntity.bindObj as MarkerExploreWay
}
}
return null
}
override fun onChassisLocationGCJ02(gnssInfo: GnssInfo?) { override fun onChassisLocationGCJ02(gnssInfo: GnssInfo?) {
val location = CallerMapLocationListenerManager.getCurrentLocation() ?: return val location = CallerMapLocationListenerManager.getCurrentLocation() ?: return
BridgeApi.location.set(location) BridgeApi.location.set(location)
@@ -208,14 +158,13 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
val min = if (EventTypeEnumNew.isCloudSocketEvent(v2XRoadEventEntity.poiType)) 0 else 5 val min = if (EventTypeEnumNew.isCloudSocketEvent(v2XRoadEventEntity.poiType)) 0 else 5
CallerLogger.d( CallerLogger.d(
"$M_V2X$TAG", "$M_V2X$TAG",
"--- trigger show before ---:data=>[${location.longitude}, ${location.latitude}, ${location.speed}], distance: $distance, minDistance: $min, poiType: ${v2XRoadEventEntity.poiType}" "--- trigger show before ---:data=>[${location.longitude}, ${location.latitude}, ${location.gnssSpeed}], distance: $distance, minDistance: $min, poiType: ${v2XRoadEventEntity.poiType}"
) )
if (distance >= min) { if (distance >= min) {
CallerLogger.d( CallerLogger.d(
"$M_V2X$TAG", "$M_V2X$TAG",
"--- trigger show ---:poiType:" + v2XRoadEventEntity.poiType "--- trigger show ---:poiType:" + v2XRoadEventEntity.poiType
) )
TrackUtils.trackV2xRoadProduceEvent(1)
val v2XMessageEntity = V2XMessageEntity<V2XRoadEventEntity>() val v2XMessageEntity = V2XMessageEntity<V2XRoadEventEntity>()
v2XMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING v2XMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING
v2XMessageEntity.content = v2XRoadEventEntity v2XMessageEntity.content = v2XRoadEventEntity

View File

@@ -1,7 +1,5 @@
package com.mogo.eagle.core.function.v2x.events.alarm; package com.mogo.eagle.core.function.v2x.events.alarm;
import android.util.Log;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew; import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
import com.mogo.eagle.core.data.map.MogoLocation; import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.map.entity.MarkerLocation; import com.mogo.eagle.core.data.map.entity.MarkerLocation;
@@ -51,7 +49,7 @@ public class V2XAlarmServer {
if (poiLocation == null) { if (poiLocation == null) {
continue; continue;
} }
if (isOutOfRange(poiLocation.getLon(), poiLocation.getLat(), currentLocation.getLongitude(), currentLocation.getLatitude(), currentLocation.getBearing())) { if (isOutOfRange(poiLocation.getLon(), poiLocation.getLat(), currentLocation.getLongitude(), currentLocation.getLatitude(), currentLocation.getHeading())) {
iterator.remove(); iterator.remove();
} }
} }
@@ -75,7 +73,7 @@ public class V2XAlarmServer {
} }
} }
// 2、道路事件方向与当前行驶方向角度偏差《20度以内 // 2、道路事件方向与当前行驶方向角度偏差《20度以内
double carBearing = currentLocation.getBearing(); double carBearing = currentLocation.getHeading();
double eventBearing = eventLocation.getAngle(); double eventBearing = eventLocation.getAngle();
double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing); double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing);
Logger.d(TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle); Logger.d(TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle);
@@ -86,7 +84,7 @@ public class V2XAlarmServer {
currentLocation.getLatitude(), currentLocation.getLatitude(),
eventLocation.getLon(), eventLocation.getLon(),
eventLocation.getLat(), eventLocation.getLat(),
(int) currentLocation.getBearing() (int) currentLocation.getHeading()
); );
Logger.d(TAG, "eventAngle:" + eventAngle); Logger.d(TAG, "eventAngle:" + eventAngle);

View File

@@ -13,11 +13,6 @@ import androidx.annotation.Keep;
*/ */
@Keep @Keep
public class MoGoV2XServicePaths { public class MoGoV2XServicePaths {
/**
* V2X 状态管理
*/
@Keep
public static final String PATH_V2X_STATUS_MANAGER = "/v2xStatusManager/api";
/** /**
* V2X 道路事件POI点 * V2X 道路事件POI点
@@ -25,11 +20,6 @@ public class MoGoV2XServicePaths {
@Keep @Keep
public static final String PATH_V2X_MARKER_MANAGER = "/v2xMarkerManager/api"; public static final String PATH_V2X_MARKER_MANAGER = "/v2xMarkerManager/api";
/**
* V2X 道路事件与车辆的连接线
*/
@Keep
public static final String PATH_V2X_POLYLINE_MANAGER = "/v2xPolylineManager/api";
/** /**
* V2X 道路事件与车辆的连接线 * V2X 道路事件与车辆的连接线

View File

@@ -9,10 +9,6 @@ package com.mogo.eagle.core.function.v2x.events.consts;
*/ */
public class V2XConst { public class V2XConst {
/**
* V2X面板名称
*/
public static final String MODULE_NAME = "V2X_UI";
/** /**
* V2X 场景广播 Action * V2X 场景广播 Action
@@ -28,23 +24,10 @@ public class V2XConst {
public static final String BROADCAST_SCENE_ACTION = "com.v2x.scene_local_broadcast"; public static final String BROADCAST_SCENE_ACTION = "com.v2x.scene_local_broadcast";
/**
* V2X 埋点
*/
public static final String V2X_ROAD_SHOW = "v2x_road_show";
public static final String V2X_ROAD_PRODUCE = "v2x_road_produce"; public static final String V2X_ROAD_PRODUCE = "v2x_road_produce";
public static final String LAUNCHER_ICON_CLICK = "Launcher_Icon_Click"; public static final String LAUNCHER_ICON_CLICK = "Launcher_Icon_Click";
/**
* V2X 地图上发出警告的POI
*/
public static final String V2X_EVENT_ALARM_POI = "V2X_EVENT_ALARM_POI";
/*
*V2X 车路云前方预警-识别物
* */
public static final String V2X_FRONT_WARNING_MARKER = "V2X_FRONT_WARNING_MARKER";
/** /**
* V2X预警日志tag * V2X预警日志tag
*/ */

View File

@@ -4,13 +4,14 @@ import android.os.Handler
import android.os.HandlerThread import android.os.HandlerThread
import android.util.Log import android.util.Log
import com.mogo.cloud.commons.utils.CoordinateUtils import com.mogo.cloud.commons.utils.CoordinateUtils
import com.mogo.eagle.core.function.call.autopilot.* import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.utilcode.util.* import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
import com.mogo.map.marker.IMogoMarker import com.mogo.map.marker.IMogoMarker
import com.mogo.map.overlay.IMogoPolyline import com.mogo.map.overlay.IMogoPolyline
import kotlinx.coroutines.Runnable import kotlinx.coroutines.Runnable
import mogo.telematics.pad.MessagePad.GnssInfo import java.util.*
import java.util.LinkedList
import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicReference import java.util.concurrent.atomic.AtomicReference
@@ -83,7 +84,7 @@ object MarkerRemoveManager {
} }
Log.d(TAG, "--- checkTask --- 3 ---") Log.d(TAG, "--- checkTask --- 3 ---")
val toRemove = toRemoveMakers.iterator() val toRemove = toRemoveMakers.iterator()
val carLoc = AtomicReference<GnssInfo>() val carLoc = AtomicReference<MogoLocation>()
while (toRemove.hasNext()) { while (toRemove.hasNext()) {
val marker = toRemove.next() val marker = toRemove.next()
if (carLoc.get() == null) { if (carLoc.get() == null) {

View File

@@ -45,7 +45,7 @@ class V2XAiRoadEventMarker {
if (polygons.size > 0) { if (polygons.size > 0) {
val l2 = entity.noveltyInfo?.location ?: return val l2 = entity.noveltyInfo?.location ?: return
v2xLocation.set(MogoLocation().also { v2xLocation.set(MogoLocation().also {
it.longitude = l2.lon; it.latitude = l2.lat; it.bearing = l2.angle.toFloat() it.longitude = l2.lon; it.latitude = l2.lat; it.heading = l2.angle
}) })
val options = MogoPolylineOptions() val options = MogoPolylineOptions()

View File

@@ -7,8 +7,11 @@ import android.text.Spannable;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan; import android.text.style.ForegroundColorSpan;
import android.util.Log; import android.util.Log;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.enums.WarningDirectionEnum; import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity; import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.msgbox.MsgBoxBean; import com.mogo.eagle.core.data.msgbox.MsgBoxBean;
import com.mogo.eagle.core.data.msgbox.MsgBoxType; import com.mogo.eagle.core.data.msgbox.MsgBoxType;
@@ -19,14 +22,13 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager; import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario; import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker; import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.internal.data.V2XWarningTarget; import com.mogo.eagle.core.function.v2x.internal.data.V2XWarningTarget;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Locale; import java.util.Locale;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import mogo.telematics.pad.MessagePad;
/** /**
* @author liujing * @author liujing
* @description 车路云—场景预警-V1.0 前车/行人/摩托车/盲区碰撞预警 * @description 车路云—场景预警-V1.0 前车/行人/摩托车/盲区碰撞预警
@@ -128,7 +130,7 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoChas
} }
@Override @Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) { public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) {
sV2XWarningMarker.onCarLocationChanged2(gnssInfo); sV2XWarningMarker.onCarLocationChanged2(gnssInfo);
} }

View File

@@ -3,32 +3,33 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.warning;
import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA; import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA; import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X; import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
import com.mogo.cloud.commons.utils.CoordinateUtils; import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.module.status.MogoStatusManager; import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.commons.utils.Trigonometric;
import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation; import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.v2x.DrawLineInfo;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager; import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.data.v2x.DrawLineInfo;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoPersonWarnPolylineManager; import com.mogo.eagle.core.function.v2x.events.manager.IMoGoPersonWarnPolylineManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoStopPolylineManager; import com.mogo.eagle.core.function.v2x.events.manager.IMoGoStopPolylineManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoWarnPolylineManager; import com.mogo.eagle.core.function.v2x.events.manager.IMoGoWarnPolylineManager;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker; import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.eagle.core.function.v2x.internal.data.V2XLocation;
import com.mogo.eagle.core.function.v2x.internal.data.V2XWarningTarget;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler; import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.marker.IMogoMarkerManager; import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.overlay.IMogoPolyline; import com.mogo.map.overlay.IMogoPolyline;
import com.mogo.commons.utils.Trigonometric;
import com.mogo.eagle.core.function.v2x.internal.data.V2XLocation;
import com.mogo.eagle.core.function.v2x.internal.data.V2XWarningTarget;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import mogo.telematics.pad.MessagePad;
/** /**
* @author liujing * @author liujing
@@ -52,7 +53,7 @@ public class V2XWarningMarker implements IV2XMarker {
* */ * */
private MogoLatLng middleLocationInStopLine = new MogoLatLng(0, 0); private MogoLatLng middleLocationInStopLine = new MogoLatLng(0, 0);
private static long showTime = 6000; private static long showTime = 6000;
private float bearing; private double bearing;
private boolean hasStopLines = false; private boolean hasStopLines = false;
@Override @Override
@@ -75,7 +76,7 @@ public class V2XWarningMarker implements IV2XMarker {
if (location == null) { if (location == null) {
return; return;
} }
bearing = location.getBearing(); bearing = location.getHeading();
if (mCloundWarningInfo != null && mCloundWarningInfo.getStopLines() != null) { if (mCloundWarningInfo != null && mCloundWarningInfo.getStopLines() != null) {
hasStopLines = mCloundWarningInfo.getStopLines().size() > 0; hasStopLines = mCloundWarningInfo.getStopLines().size() > 0;
@@ -428,7 +429,7 @@ public class V2XWarningMarker implements IV2XMarker {
} }
//线随车动 //线随车动
public void onCarLocationChanged2(MessagePad.GnssInfo latLng) { public void onCarLocationChanged2(MogoLocation latLng) {
carLocation = new MogoLatLng(latLng.getLatitude(), latLng.getLongitude()); carLocation = new MogoLatLng(latLng.getLatitude(), latLng.getLongitude());
if (MogoStatusManager.getInstance().isVrMode() && !isSelfLineClear) { if (MogoStatusManager.getInstance().isVrMode() && !isSelfLineClear) {
if (mCloundWarningInfo != null) { if (mCloundWarningInfo != null) {

View File

@@ -1,36 +0,0 @@
package com.mogo.eagle.core.function.v2x.events.utils;
import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
import java.util.HashMap;
import java.util.Map;
/**
* 统计埋点工具
*/
public class TrackUtils {
/**
* @param type type=1 短距离角度匹配
* type=2 历史轨迹匹配
*/
public static void trackV2xRoadProduceEvent(int type) {
try {
Map<String, Object> properties = new HashMap<>();
properties.put("type", type);
AnalyticsUtils.track(V2XConst.V2X_ROAD_PRODUCE, properties);
} catch (Exception e) {
e.printStackTrace();
}
}
public static void trackV2XMarkerClick(int type) {
try {
Map<String, Object> properties = new HashMap<>();
properties.put("type", type);
AnalyticsUtils.track(V2XConst.LAUNCHER_ICON_CLICK, properties);
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@@ -10,7 +10,7 @@ import com.mogo.eagle.core.function.v2x.internal.data.V2XMarkerResponse
import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent
import com.mogo.eagle.core.function.v2x.internal.http.V2XRefreshModel import com.mogo.eagle.core.function.v2x.internal.http.V2XRefreshModel
import com.mogo.eagle.core.function.v2x.internal.http.callback.IV2XRefreshCallback import com.mogo.eagle.core.function.v2x.internal.http.callback.IV2XRefreshCallback
import com.mogo.eagle.core.function.v2x.internal.logger.Logger import com.mogo.eagle.core.function.v2x.internal.logger.V2XLogger
import com.mogo.eagle.core.function.v2x.internal.socket.* import com.mogo.eagle.core.function.v2x.internal.socket.*
import com.mogo.eagle.core.function.v2x.internal.socket.V2XMessageListener_401012 import com.mogo.eagle.core.function.v2x.internal.socket.V2XMessageListener_401012
import com.mogo.eagle.core.function.v2x.internal.socket.V2XMessageListener_401018 import com.mogo.eagle.core.function.v2x.internal.socket.V2XMessageListener_401018
@@ -86,12 +86,12 @@ object V2XManager {
* @param config 相关配置类 * @param config 相关配置类
*/ */
fun init(config: V2XConfig) { fun init(config: V2XConfig) {
Logger.d(TAG, "-- init --") V2XLogger.d(TAG, "-- init --")
if (V2XManager.config.get() != null) { if (V2XManager.config.get() != null) {
throw IllegalStateException("V2XManager has been initialized, don't initialize repeatably.") throw IllegalStateException("V2XManager has been initialized, don't initialize repeatably.")
} }
V2XManager.config.set(config) V2XManager.config.set(config)
Logger.loggable = config.loggable V2XLogger.loggable = config.loggable
} }
/** /**
@@ -104,28 +104,28 @@ object V2XManager {
* 3.短链[V2XRefreshModel.querySnapshot]定时轮循,轮循时长取[V2XConfig.durationForTriggerRefresh] * 3.短链[V2XRefreshModel.querySnapshot]定时轮循,轮循时长取[V2XConfig.durationForTriggerRefresh]
*/ */
fun start() { fun start() {
Logger.d(TAG, "-- start --") V2XLogger.d(TAG, "-- start --")
val config = config.get() ?: throw IllegalStateException("V2XManager has not been initialized, please invoke V2XManager#init(config: X2XConfig) firstly.") val config = config.get() ?: throw IllegalStateException("V2XManager has not been initialized, please invoke V2XManager#init(config: X2XConfig) firstly.")
if (started.get()) { if (started.get()) {
Logger.d(TAG, "-- has been started --") V2XLogger.d(TAG, "-- has been started --")
return return
} }
if (config.aiCloudConfig.sn?.isBlank() == true) { if (config.aiCloudConfig.sn?.isBlank() == true) {
Logger.e(TAG, "sn is null or blank, please ensure sn exists and then invoke V2XManager#start() again.") V2XLogger.e(TAG, "sn is null or blank, please ensure sn exists and then invoke V2XManager#start() again.")
cbs.forEach { cbs.forEach {
it.onFail("sn is null or blank, please ensure sn exists and then invoke V2XManager#start() again.") it.onFail("sn is null or blank, please ensure sn exists and then invoke V2XManager#start() again.")
} }
return return
} }
if (config.aiCloudConfig.token?.isBlank() == true) { if (config.aiCloudConfig.token?.isBlank() == true) {
Logger.e(TAG, "token is null or blank, please ensure token exists and then invoke V2Manager#start() again.") V2XLogger.e(TAG, "token is null or blank, please ensure token exists and then invoke V2Manager#start() again.")
cbs.forEach { cbs.forEach {
it.onFail("token is null or blank, please ensure token exists and then invoke V2Manager#start() again.") it.onFail("token is null or blank, please ensure token exists and then invoke V2Manager#start() again.")
} }
return return
} }
if (started.compareAndSet(false, true)) { if (started.compareAndSet(false, true)) {
Logger.d(TAG, "-- start real --") V2XLogger.d(TAG, "-- start real --")
SocketManager.getInstance().init(config.context,0.0,0.0) SocketManager.getInstance().init(config.context,0.0,0.0)
SocketManager.getInstance().registerOnMessageListener(401012, V2XMessageListener_401012(cbs)) SocketManager.getInstance().registerOnMessageListener(401012, V2XMessageListener_401012(cbs))
SocketManager.getInstance().registerOnMessageListener(401018, V2XMessageListener_401018(cbs)) SocketManager.getInstance().registerOnMessageListener(401018, V2XMessageListener_401018(cbs))
@@ -160,12 +160,12 @@ object V2XManager {
* 3. 取消短链定时轮循任务 * 3. 取消短链定时轮循任务
*/ */
fun stop() { fun stop() {
Logger.d(TAG, "-- stop --") V2XLogger.d(TAG, "-- stop --")
if (config.get() == null) { if (config.get() == null) {
throw IllegalStateException("V2XManager has not been initialized, please invoke V2XManager#init(config: X2XConfig) firstly.") throw IllegalStateException("V2XManager has not been initialized, please invoke V2XManager#init(config: X2XConfig) firstly.")
} }
if (started.compareAndSet(true, false)) { if (started.compareAndSet(true, false)) {
Logger.d(TAG, "-- stop real --") V2XLogger.d(TAG, "-- stop real --")
SocketManager.getInstance().release() SocketManager.getInstance().release()
handler.removeCallbacks(refreshTask) handler.removeCallbacks(refreshTask)
lastLatitude.set(0.0) lastLatitude.set(0.0)
@@ -178,7 +178,7 @@ object V2XManager {
* @param cb 要添加的回调接口 * @param cb 要添加的回调接口
*/ */
fun addCallback(cb: IV2XCallback) { fun addCallback(cb: IV2XCallback) {
Logger.d(TAG, "-- addCallback --") V2XLogger.d(TAG, "-- addCallback --")
if (cbs.contains(cb)) { if (cbs.contains(cb)) {
return return
} }
@@ -190,7 +190,7 @@ object V2XManager {
* @param cb 要移除的回调接口 * @param cb 要移除的回调接口
*/ */
fun removeCallback(cb: IV2XCallback) { fun removeCallback(cb: IV2XCallback) {
Logger.d(TAG, "-- removeCallback --") V2XLogger.d(TAG, "-- removeCallback --")
if (!cbs.contains(cb)) { if (!cbs.contains(cb)) {
return return
} }
@@ -209,7 +209,7 @@ object V2XManager {
if (!started.get()) { if (!started.get()) {
return return
} }
Logger.d(TAG, "--- onLocationChanged --[longitude: $longitude, latitude: $latitude]") V2XLogger.d(TAG, "--- onLocationChanged --[longitude: $longitude, latitude: $latitude]")
realLongitude.set(longitude) realLongitude.set(longitude)
realLatitude.set(latitude) realLatitude.set(latitude)
val oldLon = lastLongitude.get() val oldLon = lastLongitude.get()
@@ -217,14 +217,14 @@ object V2XManager {
var update = false var update = false
try { try {
if (oldLon == 0.0 || oldLat == 0.0) { if (oldLon == 0.0 || oldLat == 0.0) {
Logger.d(TAG, "--- onLocationChanged -- first --[longitude: $longitude, latitude: $latitude]") V2XLogger.d(TAG, "--- onLocationChanged -- first --[longitude: $longitude, latitude: $latitude]")
handler.removeCallbacks(refreshTask) handler.removeCallbacks(refreshTask)
handler.post(refreshTask) handler.post(refreshTask)
update = true update = true
return return
} }
if (DistanceUtils.calculateLineDistance(oldLon, oldLat, longitude, latitude) >= config.get().distanceForTriggerRefresh) { if (DistanceUtils.calculateLineDistance(oldLon, oldLat, longitude, latitude) >= config.get().distanceForTriggerRefresh) {
Logger.d(TAG, "--- onLocationChanged -- trigger --[longitude: $longitude, latitude: $latitude]") V2XLogger.d(TAG, "--- onLocationChanged -- trigger --[longitude: $longitude, latitude: $latitude]")
handler.removeCallbacks(refreshTask) handler.removeCallbacks(refreshTask)
handler.post(refreshTask) handler.post(refreshTask)
update = true update = true

View File

@@ -436,6 +436,17 @@ class V2XMarkerExploreWay: Serializable {
var coordinateType: Int? = null var coordinateType: Int? = null
/**
* polygon字段用来表示事件围栏
*/
var polygon: List<V2XLocation>? = null
/**
* 事件的高精坐标
*/
var gpsLocation: V2XLocation? = null
override fun toString(): String { override fun toString(): String {
return "V2XMarkerExploreWay(infoId=$infoId, type=$type, poiType=$poiType, sn=$sn, location=$location, direction=$direction, canLive=$canLive, fileType=$fileType, addr=$addr, generateTime=$generateTime, cityName=$cityName, distance=$distance, userInfo=$userInfo, items=$items, uploadType=$uploadType, isFabulous=$isFabulous, infoCheckNode=$infoCheckNode, coordinateType=$coordinateType)" return "V2XMarkerExploreWay(infoId=$infoId, type=$type, poiType=$poiType, sn=$sn, location=$location, direction=$direction, canLive=$canLive, fileType=$fileType, addr=$addr, generateTime=$generateTime, cityName=$cityName, distance=$distance, userInfo=$userInfo, items=$items, uploadType=$uploadType, isFabulous=$isFabulous, infoCheckNode=$infoCheckNode, coordinateType=$coordinateType)"
} }

View File

@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.v2x.internal.logger
import android.util.Log import android.util.Log
internal object Logger { internal object V2XLogger {
var loggable: Boolean = false var loggable: Boolean = false

View File

@@ -5,7 +5,7 @@ import com.mogo.eagle.core.function.v2x.internal.V2XManager
import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback
import com.mogo.eagle.core.function.v2x.internal.data.V2XMarkerCardResult import com.mogo.eagle.core.function.v2x.internal.data.V2XMarkerCardResult
import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent
import com.mogo.eagle.core.function.v2x.internal.logger.Logger import com.mogo.eagle.core.function.v2x.internal.logger.V2XLogger
internal class V2XMessageListener_401012(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<V2XMarkerCardResult> { internal class V2XMessageListener_401012(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<V2XMarkerCardResult> {
@@ -16,10 +16,10 @@ internal class V2XMessageListener_401012(val cbs: Iterable<IV2XCallback>?): IMog
return return
} }
if (data == null) { if (data == null) {
Logger.i(V2XManager.TAG, "V2XMessageListener_401012message is null!") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_401012message is null!")
return return
} }
Logger.i(V2XManager.TAG, "V2XMessageListener_401012:$data") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_401012:$data")
cbs?.forEach { cbs?.forEach {
it.onAck(V2XEvent.Road(data = data)) it.onAck(V2XEvent.Road(data = data))
} }

View File

@@ -5,7 +5,7 @@ import com.mogo.eagle.core.function.v2x.internal.V2XManager
import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback
import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent
import com.mogo.eagle.core.function.v2x.internal.data.V2XWarningTarget import com.mogo.eagle.core.function.v2x.internal.data.V2XWarningTarget
import com.mogo.eagle.core.function.v2x.internal.logger.Logger import com.mogo.eagle.core.function.v2x.internal.logger.V2XLogger
internal class V2XMessageListener_401018(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<V2XWarningTarget> { internal class V2XMessageListener_401018(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<V2XWarningTarget> {
@@ -16,10 +16,10 @@ internal class V2XMessageListener_401018(val cbs: Iterable<IV2XCallback>?): IMog
return return
} }
if (data == null) { if (data == null) {
Logger.i(V2XManager.TAG, "V2XMessageListener_401018message is null!") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_401018message is null!")
return return
} }
Logger.i(V2XManager.TAG, "V2XMessageListener_401018:$data") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_401018:$data")
cbs?.forEach { cbs?.forEach {
it.onAck(V2XEvent.Warning(data = data)) it.onAck(V2XEvent.Warning(data = data))
} }

View File

@@ -5,7 +5,7 @@ import com.mogo.eagle.core.function.v2x.internal.V2XManager
import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback
import com.mogo.eagle.core.function.v2x.internal.data.V2XOptimalRoute import com.mogo.eagle.core.function.v2x.internal.data.V2XOptimalRoute
import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent
import com.mogo.eagle.core.function.v2x.internal.logger.Logger import com.mogo.eagle.core.function.v2x.internal.logger.V2XLogger
internal class V2XMessageListener_402000(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<V2XOptimalRoute> { internal class V2XMessageListener_402000(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<V2XOptimalRoute> {
@@ -16,10 +16,10 @@ internal class V2XMessageListener_402000(val cbs: Iterable<IV2XCallback>?): IMog
return return
} }
if (data == null) { if (data == null) {
Logger.i(V2XManager.TAG, "V2XMessageListener_402000message is null!") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_402000message is null!")
return return
} }
Logger.i(V2XManager.TAG, "V2XMessageListener_402000:$data") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_402000:$data")
cbs?.forEach { cbs?.forEach {
it.onAck(V2XEvent.OptimalRoute(data = data)) it.onAck(V2XEvent.OptimalRoute(data = data))
} }

View File

@@ -5,7 +5,7 @@ import com.mogo.eagle.core.function.v2x.internal.V2XManager
import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback
import com.mogo.eagle.core.function.v2x.internal.data.V2XAdvanceWarning import com.mogo.eagle.core.function.v2x.internal.data.V2XAdvanceWarning
import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent
import com.mogo.eagle.core.function.v2x.internal.logger.Logger import com.mogo.eagle.core.function.v2x.internal.logger.V2XLogger
internal class V2XMessageListener_404000(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<V2XAdvanceWarning> { internal class V2XMessageListener_404000(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<V2XAdvanceWarning> {
@@ -16,10 +16,10 @@ internal class V2XMessageListener_404000(val cbs: Iterable<IV2XCallback>?): IMog
return return
} }
if (data == null) { if (data == null) {
Logger.i(V2XManager.TAG, "V2XMessageListener_404000message is null!") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_404000message is null!")
return return
} }
Logger.i(V2XManager.TAG, "V2XMessageListener_404000:$data") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_404000:$data")
cbs?.forEach { cbs?.forEach {
it.onAck(V2XEvent.ForwardsWarning(data = data)) it.onAck(V2XEvent.ForwardsWarning(data = data))
} }

View File

@@ -4,7 +4,7 @@ import com.mogo.cloud.socket.IMogoCloudSocketOnMessageListener
import com.mogo.eagle.core.function.v2x.internal.V2XManager import com.mogo.eagle.core.function.v2x.internal.V2XManager
import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback import com.mogo.eagle.core.function.v2x.internal.callback.IV2XCallback
import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent.RoadAI import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent.RoadAI
import com.mogo.eagle.core.function.v2x.internal.logger.Logger import com.mogo.eagle.core.function.v2x.internal.logger.V2XLogger
import roadwork.Road.RW_PB import roadwork.Road.RW_PB
internal class V2XMessageListener_503000(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<RW_PB> { internal class V2XMessageListener_503000(val cbs: Iterable<IV2XCallback>?): IMogoCloudSocketOnMessageListener<RW_PB> {
@@ -16,10 +16,10 @@ internal class V2XMessageListener_503000(val cbs: Iterable<IV2XCallback>?): IMog
return return
} }
if (data == null) { if (data == null) {
Logger.i(V2XManager.TAG, "V2XMessageListener_503000message is null!") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_503000message is null!")
return return
} }
Logger.i(V2XManager.TAG, "V2XMessageListener_503000:$data") V2XLogger.i(V2XManager.TAG, "V2XMessageListener_503000:$data")
cbs?.forEach { cbs?.forEach {
it.onAck(RoadAI(data = data)) it.onAck(RoadAI(data = data))
} }

Some files were not shown because too many files have changed in this diff Show More