Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into dev_arch_opt_3.0

This commit is contained in:
donghongyu
2022-12-26 14:29:43 +08:00
36 changed files with 360 additions and 327 deletions

View File

@@ -13,6 +13,5 @@ import mogo.telematics.pad.MessagePad;
public interface IBusPassengerAutopilotPlanningCallback {
void routeResult(List<LatLng> models,int haveArrivedIndex);
void routePlanningToNextStationChanged(long meters, long timeInSecond);
void setLineMarker(List<LatLng> models);
void updateTotalDistance();
}

View File

@@ -49,7 +49,6 @@ import com.mogo.och.bus.passenger.network.BusPassengerServiceManager;
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager;
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
import com.mogo.och.common.module.utils.ToastUtilsOch;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
@@ -410,7 +409,6 @@ public class BusPassengerModel {
List<MessagePad.Location> routePoints = routeList.getWayPointsList();
if (null != routePoints && routePoints.size() > 0){
updateRoutePoints(routePoints);
setRouteLineMarker();
startToRouteAndWipe();
}
}
@@ -441,10 +439,10 @@ public class BusPassengerModel {
int nextRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndexNew(currentRouteIndex
,mRoutePoints
,stationNext.getGcjLon(),stationNext.getGcjLat());
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "currentRouteIndex = " + currentRouteIndex
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "轨迹排查==currentRouteIndex = " + currentRouteIndex
+ " nextRouteIndex = " + nextRouteIndex);
if (currentRouteIndex < nextRouteIndex){ //如果找到的next在起点的轨迹前面直接舍弃这个轨迹不显示
mTwoStationsRouts.addAll(mRoutePoints.subList(currentRouteIndex,nextRouteIndex));
mTwoStationsRouts.addAll(mRoutePoints.subList(currentRouteIndex,nextRouteIndex + 1));
}
}
}else { //只有两个站点的时候整个路线就是两个站点之间的轨迹
@@ -476,16 +474,25 @@ public class BusPassengerModel {
}
for (List<MogoLocation> lastPoints: lastPointsMap.values()){
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "轨迹排查==lastPoints.size() = " + lastPoints.size());
float lastSumLength = 0;
if (lastPoints.size() == 1){ //只是最后一个点,计算当前位置和最后一个点的距离
lastSumLength = CoordinateUtils.calculateLineDistance(
lastPoints.get(0).getLongitude(), lastPoints.get(0).getLatitude(),
mLocation.getLongitude(), mLocation.getLatitude());
if (mNextStationIndex <= mStations.size()-1 && mNextStationIndex >= 0){
BusPassengerStation stationNext = mStations.get(mNextStationIndex);
lastSumLength = CoordinateUtils.calculateLineDistance(
stationNext.getGcjLon(), stationNext.getGcjLat(),
mLocation.getLongitude(), mLocation.getLatitude());
}else {
lastSumLength = CoordinateUtils.calculateLineDistance(
lastPoints.get(0).getLongitude(), lastPoints.get(0).getLatitude(),
mLocation.getLongitude(), mLocation.getLatitude());
}
}else {
lastSumLength = CoordinateCalculateRouteUtil.calculateRouteSumLength(lastPoints);
}
double lastTime = lastSumLength / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 ; //秒
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "lastSumLength = " + lastSumLength);
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "轨迹排查==lastSumLength = " + lastSumLength);
if (mAutopilotPlanningCallback != null){
mAutopilotPlanningCallback.routePlanningToNextStationChanged((long)lastSumLength,(long) lastTime);
}
@@ -533,17 +540,6 @@ public class BusPassengerModel {
}
}
/**
* 设置小地图路径的起终点marker
*/
public void setRouteLineMarker(){
if (mAutopilotPlanningCallback != null && mRoutePoints != null){
List<LatLng> routePoints = CoordinateCalculateRouteUtil
.coordinateConverterLocationToLatLng(mContext,mRoutePoints);
mAutopilotPlanningCallback.setLineMarker(routePoints);
}
}
/**
* 开始轮询计算剩余里程和时间
* @param isStart

View File

@@ -158,11 +158,6 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
runOnUIThread(() -> mView.updateRoutePlanningToNextStation(meters, timeInSecond));
}
@Override
public void setLineMarker(List<LatLng> models) {
runOnUIThread(() -> mView.setLineMarker(models));
}
@Override
public void updateTotalDistance() {
runOnUIThread(() -> mView.setProgressBarMax());

View File

@@ -51,10 +51,6 @@ public class BusPassengerMapDirectionView
private TextureMapView mAMapNaviView;
private AMap mAMap;
private Marker mCarMarker;
private Marker mStartMarker;
private Marker mEndMarker;
private int mCurrentIndex = -1;
private List<LatLng> mCoordinatesLatLng = new ArrayList<>(); //轨迹坐标数据
private List<LatLng> mLineStationLatLng = new ArrayList<>();//站点坐标数据
@@ -128,10 +124,6 @@ public class BusPassengerMapDirectionView
mCarMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_car))
.anchor(0.5f, 0.5f));
mStartMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point)));
mEndMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_end_point)));
mArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_arrow_arrived);
mUnArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_arrow_un_arrive);
@@ -199,20 +191,16 @@ public class BusPassengerMapDirectionView
//圈定地图显示范围
LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder();
// if (mLineStationLatLng.size() > 0){
// //存放经纬度
// for (int i = 0; i < mLineStationLatLng.size(); i++) {
// boundsBuilder.include(mLineStationLatLng.get(i));
// }
// //第二个参数为四周留空宽度
// }
if (mCoordinatesLatLng.size() > 0){
//存放经纬度
for (int i = 0; i < mCoordinatesLatLng.size(); i++) {
boundsBuilder.include(mCoordinatesLatLng.get(i));
}
//第二个参数为四周留空宽度
}else if (mLineStationLatLng.size() > 0){
for (int i = 0; i< mLineStationLatLng.size();i++){
boundsBuilder.include(mLineStationLatLng.get(i));
}
}
boundsBuilder.include(currentLatLng);
@@ -271,33 +259,11 @@ public class BusPassengerMapDirectionView
if (mPolyline != null) {
mPolyline.remove();
}
if (mStartMarker != null) {
mStartMarker.setVisible(false);
}
if (mEndMarker != null) {
mEndMarker.setVisible(false);
}
}
@Override
public void setLineMarker() {
if (mStartMarker != null) {
mStartMarker.setVisible(false);
}
if (mEndMarker != null) {
mEndMarker.setVisible(false);
}
if (mCoordinatesLatLng.size() > 2) {
// 设置开始结束Marker位置
LatLng startLatLng = mCoordinatesLatLng.get(0);
LatLng endLatLng = mCoordinatesLatLng.get(mCoordinatesLatLng.size() - 1);
mStartMarker.setPosition(startLatLng);
mEndMarker.setPosition(endLatLng);
mStartMarker.setVisible(true);
mEndMarker.setVisible(true);
}
}
public void clearCoordinatesLatLng(){
@@ -324,19 +290,12 @@ public class BusPassengerMapDirectionView
if (mAMapNaviView != null) {
mAMapNaviView.onPause();
}
mCurrentIndex = -1;
}
public void onDestroy() {
if (mAMapNaviView != null) {
mAMapNaviView.onDestroy();
}
mCurrentIndex = -1;
}
public void setCoordinatesLatLng(List<LatLng> latLngs) {
mCoordinatesLatLng.clear();
mCoordinatesLatLng.addAll(latLngs);
}
public void setCoordinatesLatLng(List<LatLng> latLngs,int haveArrivedIndex) {
@@ -348,40 +307,28 @@ public class BusPassengerMapDirectionView
public void clearLineMarkers(){
for (int i =0; i< mLineMarkers.size();i++){
mLineMarkers.get(i).setVisible(false);
mLineMarkers.get(i).remove();
}
mLineMarkers.clear();
}
public void setLineMarkersAndDraw(List<LatLng> stationLatLngs){
public void setLinePointMarkerAndDraw(List<LatLng> mLineStationsList, int currentIndex) {
clearLineMarkers();
for (int i = 0; i < stationLatLngs.size(); i++) {
Marker mWayPointMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point)));
mLineMarkers.add(mWayPointMarker);
}
if (mCoordinatesLatLng.size() == 0) {
for (int i = 0; i < mLineMarkers.size(); i++) {
mLineMarkers.get(i).setPosition(stationLatLngs.get(i));
mLineMarkers.get(i).setVisible(true);
}
mCurrentIndex = -1;
}
}
public void setLinePointMarkerAndDraw(List<LatLng> routeLineLatLngs, int currentIndex) {
mLineStationLatLng.clear();
mLineStationLatLng.addAll(routeLineLatLngs);
mLineStationLatLng.addAll(mLineStationsList);
if (mLineStationLatLng.size() > 0 && mCurrentIndex != currentIndex) {
if (mAMap != null && mLineMarkers.size() > 0) {
mCurrentIndex = currentIndex;
for (int i = 0; i < mLineMarkers.size(); i++) {
if (i != currentIndex && i + 1 != currentIndex) {
mLineMarkers.get(i).setPosition(mLineStationLatLng.get(i));
mLineMarkers.get(i).setVisible(true);
} else {
mLineMarkers.get(i).setVisible(false);
}
if (mLineStationsList.size() > 0){
for (int i = 0; i < mLineStationsList.size(); i++) {
if (currentIndex == i){
Marker mEndMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_end_point)));
mEndMarker.setPosition(mLineStationsList.get(i));
mLineMarkers.add(i,mEndMarker);
}else {
Marker mStartMarker = mAMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point)));
mStartMarker.setPosition(mLineStationsList.get(i));
mLineMarkers.add(i,mStartMarker);
}
}
}

View File

@@ -26,7 +26,6 @@ import com.mogo.och.bus.passenger.constant.BusPassengerConst;
import com.mogo.och.bus.passenger.presenter.BaseBusPassengerPresenter;
import com.mogo.och.bus.passenger.ui.layoutmanager.CenterLayoutManager;
import com.mogo.och.bus.passenger.utils.BPRouteDataTestUtils;
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
import com.mogo.och.common.module.wigets.MarqueeTextView;
import java.util.ArrayList;
@@ -46,7 +45,6 @@ public class BusPassengerRouteFragment extends
private BusPassengerTrafficLightView mTrafficLightView;
private List<BusPassengerStation> mStationsList = new ArrayList<>();
private List<LatLng> mLineStationsList = new ArrayList<>();
private TextView mSpeedTv;
private ConstraintLayout mNoLineInfoView;
@@ -104,12 +102,6 @@ public class BusPassengerRouteFragment extends
@Override
public boolean onLongClick(View v) {
BPRouteDataTestUtils.converToRouteData();
UiThreadHandler.postDelayed(new Runnable() {
@Override
public void run() {
updateWayPointList(mStationsList,1);
}
},1000);
return false;
}
});
@@ -156,22 +148,6 @@ public class BusPassengerRouteFragment extends
}
}
public void setLineMarker(List<LatLng> latLngList){
if (latLngList.size() > 0) {
if (mMapDirectionView != null) {
mMapDirectionView.setCoordinatesLatLng(latLngList);
UiThreadHandler.post(new Runnable() {
@Override
public void run() {
mMapDirectionView.setLineMarker();
}
});
}
} else {
clearMapView();
}
}
/**
* 绘制
*
@@ -213,18 +189,6 @@ public class BusPassengerRouteFragment extends
}
}
public void setLineMarkers(List<LatLng> list) {
if (mMapDirectionView != null) {
UiThreadHandler.post(new Runnable() {
@Override
public void run() {
mMapDirectionView.setLineMarkersAndDraw(list);
}
});
}
}
public void changeOperationStatus(boolean status) {
if (status) {
mNoLineInfoView.setVisibility(View.GONE);
@@ -298,13 +262,13 @@ public class BusPassengerRouteFragment extends
}
private void updateWayPointList(List<BusPassengerStation> stations,int currentStationIndex) {
mLineStationsList.clear();
List<LatLng> mLineStationsList = new ArrayList<>();
for (int i = 0; i< stations.size(); i++) {//站点集合
LatLng latLng = CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(getContext()
,stations.get(i).getLon(),stations.get(i).getLat());// lat,lon
// LatLng latLng = CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(getContext()
// ,stations.get(i).getLon(),stations.get(i).getLat());// lat,lon
LatLng latLng = new LatLng(stations.get(i).getGcjLat(),stations.get(i).getGcjLon());// lat,lon
mLineStationsList.add(latLng);
}
setLineMarkers(mLineStationsList);
if (mMapDirectionView != null) {
UiThreadHandler.post(new Runnable() {

View File

@@ -162,11 +162,11 @@ public class BusOrderModel {
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
OCHSocketMessageManager.INSTANCE.registerSocketMessageListener(//监听运营消息
OCHSocketMessageManager.INSTANCE.getMsgMonitorType(),
OCHSocketMessageManager.msgMonitorType,
mMogoOnMessageListener);
OCHSocketMessageManager.INSTANCE.registerSocketMessageListener(//监听核销乘客
OCHSocketMessageManager.INSTANCE.getMsgWriteOffPassengerType(),
OCHSocketMessageManager.msgWriteOffPassengerType,
mWriteOffPassengeOnMessageListener);
AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext);
@@ -345,9 +345,9 @@ public class BusOrderModel {
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(
OCHSocketMessageManager.INSTANCE.getMsgMonitorType());
OCHSocketMessageManager.msgMonitorType);
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(
OCHSocketMessageManager.INSTANCE.getMsgWriteOffPassengerType());
OCHSocketMessageManager.msgWriteOffPassengerType);
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
}

View File

@@ -151,7 +151,7 @@ public interface IBusApiService {
Observable<BaseData> endTask(@Header ("appId") String appId, @Header("ticket") String ticket, @Body BusCloseTaskRequest data);
/**
* 任务正常跑完结束
* 查询核销乘客,目前不再使用,改为后台下发核销的乘客
* @param appId
* @param ticket
* @param data

View File

@@ -2,7 +2,6 @@ package com.mogo.och.bus.presenter;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
import android.location.Location;
import android.os.Looper;
import androidx.annotation.NonNull;
@@ -19,7 +18,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.bus.R;
import com.mogo.och.bus.bean.BusStationBean;
import com.mogo.och.bus.bean.WriteOffPassenger;
import com.mogo.och.bus.callback.IBusADASStatusCallback;
@@ -32,10 +30,9 @@ import com.mogo.och.bus.model.BusOrderModel;
import com.mogo.och.bus.util.BusTrajectoryManager;
import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean;
import com.mogo.och.common.module.biz.callback.ILoginCallback;
import com.mogo.och.common.module.biz.constant.LoginStatusManager;
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
import com.mogo.och.common.module.utils.SoundPoolHelper;
import com.mogo.och.common.module.voice.VoiceNotice;
import com.zhidao.socket.utils.LoginStatusUtil;
import org.jetbrains.annotations.NotNull;
@@ -72,7 +69,6 @@ public class BusPresenter extends Presenter<BusFragment>
@Override
public void onCreate(@NonNull LifecycleOwner owner) {
super.onCreate(owner);
BusOrderModel.getInstance().queryBusRoutes();
initModelListener();
}
@@ -286,8 +282,10 @@ public class BusPresenter extends Presenter<BusFragment>
}
@Override
public void loginSuccess(DriverStatusQueryRespBean data) {
if(LoginStatusUtil.isLogin()){
CallerLogger.INSTANCE.d(M_BUS + TAG, " loginStatus =" + LoginStatusManager.isLogin());
if(LoginStatusManager.isLogin()){
BusOrderModel.getInstance().startOrStopOrderLoop(true);
BusOrderModel.getInstance().queryBusRoutes();
}else {
BusTrajectoryManager.getInstance().stopTrajReqLoop();
BusOrderModel.getInstance().startOrStopOrderLoop(false);
@@ -296,8 +294,6 @@ public class BusPresenter extends Presenter<BusFragment>
mView.hideSlidePanel();
BusOrderModel.getInstance().closeBeautificationMode();
}
BusOrderModel.getInstance().queryBusRoutes();
}
@Override

View File

@@ -50,17 +50,21 @@ public class BusAnalyticsManager {
if (mStartAutopilotParams.isEmpty()) return;
CallerLogger.INSTANCE.e( M_BUS + "triggerStartAutopilotFailureEvent", failMsg );
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() !=
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_CODE, failCode);
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_MSG, failMsg);
}
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_RESULT
, CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() ==
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING);
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_CODE, failCode);
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_MSG, failMsg);
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
clearStartAutopilotParams();//清空参数数据,防止误传
}
@SuppressLint("NewApi")
private void removeWaitingCallback() {
if (startAutopilotRunnable != null &&
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
@@ -102,6 +106,7 @@ public class BusAnalyticsManager {
mStartAutopilotParams.put(BusConst.EVENT_PARAM_LINE_ID, lineId);
if (send) {
if (mStartAutopilotParams.isEmpty()) return;
// 开启成功,上报埋点
clearStartAutopilotFailureMSG();
removeWaitingCallback();

View File

@@ -12,8 +12,8 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
* 统一管理业务长链消息推送
*/
object OCHSocketMessageManager {
public val msgMonitorType:Int = 6295553
public val msgWriteOffPassengerType:Int = 6295554
const val msgMonitorType:Int = 6295553
const val msgWriteOffPassengerType:Int = 6295554
fun <T> registerSocketMessageListener(msgType:Int,
mogoOnMessageListener :IMogoOnMessageListener<T>){

View File

@@ -6,6 +6,7 @@ import com.mogo.commons.debug.DebugConfig
import com.mogo.commons.module.status.IMogoStatusChangedListener
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.commons.module.status.StatusDescriptor
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
import com.mogo.eagle.core.utilcode.util.NetworkUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
@@ -72,7 +73,7 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
i(TAG, "abnormal_factors_Str = $toastStr")
if (toastStr !== ""){
if (!FunctionBuildConfig.isDemoMode && toastStr !== ""){
ToastUtils.showLong(toastStr + "请开启相应权限或者查看网络")
}
}

View File

@@ -27,7 +27,7 @@ public class CoordinateCalculateRouteUtil {
float sumLength = 0;
if (points.get(1) instanceof MogoLocation){
if (points.get(0) instanceof MogoLocation){
//计算全路径总距离
for (int i = 0;i + 1< points.size();i++){
MogoLocation locationPre = (MogoLocation) points.get(i);
@@ -40,7 +40,7 @@ public class CoordinateCalculateRouteUtil {
float length = CoordinateUtils.calculateLineDistance(laLon,laLat,preLon,preLat);
sumLength += length;
}
}else if (points.get(1) instanceof Location){
}else if (points.get(0) instanceof Location){
//计算全路径总距离
for (int i = 0;i + 1< points.size();i++){
Location locationPre = (Location) points.get(i);
@@ -53,7 +53,7 @@ public class CoordinateCalculateRouteUtil {
float length = CoordinateUtils.calculateLineDistance(laLon,laLat,preLon,preLat);
sumLength += length;
}
}else if (points.get(1) instanceof LatLng){
}else if (points.get(0) instanceof LatLng){
for (int i = 0;i + 1< points.size();i++){
LatLng locationPre = (LatLng) points.get(i);
LatLng location = (LatLng) points.get(i+1);
@@ -126,7 +126,7 @@ public class CoordinateCalculateRouteUtil {
if (currentIndex == mRoutePoints.size()-1){
latePoints.add(mRoutePoints.get(currentIndex));
}else if(currentIndex < mRoutePoints.size()-1){
latePoints.addAll(mRoutePoints.subList(currentIndex,mRoutePoints.size()-1));
latePoints.addAll(mRoutePoints.subList(currentIndex,mRoutePoints.size()));
}
return latePoints;
}
@@ -263,7 +263,7 @@ public class CoordinateCalculateRouteUtil {
// LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
latePoints.add(location);
}else {
List<MogoLocation> locations = mRoutePoints.subList(currentIndex,mRoutePoints.size()-1);
List<MogoLocation> locations = mRoutePoints.subList(currentIndex,mRoutePoints.size());
for (MogoLocation location: locations) {
// LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
latePoints.add(location);

View File

@@ -56,6 +56,7 @@ class TaxiPassengerConst {
const val EVENT_PARAM_END_NAME = "end_name"
const val EVENT_PARAM_ORDER_NUMBER = "order_num"
const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
const val EVENT_PARAM_START_FAILURE_CODE = "start_autopilot_failure_code" // 启动自驾失败code
const val EVENT_PARAM_START_FAILURE_MSG = "start_autopilot_failure_msg" // 启动自驾失败原因
const val EVENT_PARAM_PLATE_NUM = "plate_number" // 车牌号
const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境true/false

View File

@@ -38,6 +38,7 @@ import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
import com.mogo.eagle.core.utilcode.util.ToastUtils;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager;
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
import com.mogo.och.common.module.map.AmapNaviToDestinationModel;
@@ -244,6 +245,9 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
CallLimitingVelocityListenerManager.INSTANCE.addListener(TAG,limitingVelocityListener);
AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext);
//开启自驾后 异常信息返回
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
}
private void releaseListeners() {
@@ -260,6 +264,8 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
CallLimitingVelocityListenerManager.INSTANCE.removeListener(limitingVelocityListener);
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
}
/**
@@ -588,6 +594,13 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
};
private final OchAdasStartFailureCallback mAdasStartFailureListener = new OchAdasStartFailureCallback() {
@Override
public void onStartAutopilotFailure(@NotNull String startFailedCode, @NonNull String startFailedMessage) {
TaxiPassengerAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage);
}
};
public void startToRouteAndWipe(List<MessagePad.Location> models) {
List<MogoLocation> locationsModels = CoordinateCalculateRouteUtil
.coordinateConverterWgsToGcjLocations(mContext,models);

View File

@@ -1,11 +1,16 @@
package com.mogo.och.taxi.passenger.utils;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
import android.text.TextUtils;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.data.app.AppConfigInfo;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.taxi.passenger.constant.TaxiPassengerConst;
@@ -34,16 +39,51 @@ public class TaxiPassengerAnalyticsManager {
private Runnable startAutopilotRunnable = () -> {
// 15s内未开启上报失败埋点
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_RESULT, false);
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_FAILURE_MSG,
"15s后app等待超时");
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
triggerStartAutopilotFailureEvent("", "15s后app等待超时");
};
public void triggerStartAutopilotFailureEventByAdas(String failCode, String failMsg){
removeWaitingCallback();
triggerStartAutopilotFailureEvent(failCode, failMsg);
}
private void triggerStartAutopilotFailureEvent(String failCode, String failMsg){
if (mStartAutopilotParams.isEmpty()) return;
CallerLogger.INSTANCE.e( M_BUS + "triggerStartAutopilotFailureEvent", failMsg );
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() !=
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_FAILURE_CODE, failCode);
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_FAILURE_MSG,
failMsg);
}
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_RESULT
, CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() ==
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING);
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
clearStartAutopilotParams();//清空参数数据,防止误传
}
public void clearStartAutopilotFailureMSG(){
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_FAILURE_CODE, "");
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_FAILURE_MSG, "");
}
private void clearStartAutopilotParams(){
mStartAutopilotParams.clear();
}
private void removeWaitingCallback() {
if (startAutopilotRunnable != null &&
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
UiThreadHandler.removeCallbacks(startAutopilotRunnable);
}
}
/**
* 触发'开启自动驾驶'埋点流程
* 开启自动驾驶15s内成功则发送成功埋点否则发送失败埋点
@@ -69,14 +109,14 @@ public class TaxiPassengerAnalyticsManager {
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_ORDER_NUMBER, orderNo);
if (send) {
if (mStartAutopilotParams.isEmpty()) return;
// 开启成功,取消失败定时任务
clearStartAutopilotFailureMSG();
if (startAutopilotRunnable != null &&
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
UiThreadHandler.removeCallbacks(startAutopilotRunnable);
}
removeWaitingCallback();
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_START_RESULT, true);
// AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
clearStartAutopilotParams();
} else {
UiThreadHandler.postDelayed(startAutopilotRunnable, TaxiPassengerConst.LOOP_PERIOD_15S);
}

View File

@@ -232,7 +232,7 @@ public class TaxiModel {
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
OCHSocketMessageManager.INSTANCE.registerSocketMessageListener(
OCHSocketMessageManager.INSTANCE.getMsgMonitorType(),
OCHSocketMessageManager.msgMonitorType,
mMogoOnMessageListener);
AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext);
@@ -264,7 +264,7 @@ public class TaxiModel {
// 注销地图监听
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false);
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.INSTANCE.getMsgMonitorType());
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.msgMonitorType);
CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener);
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);

View File

@@ -57,12 +57,15 @@ public class TaxiAnalyticsManager {
if (mStartAutopilotParams.isEmpty()) return;
CallerLogger.INSTANCE.e(M_TAXI + "triggerStartAutopilotFailureEvent", failMsg);
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() !=
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_CODE, failCode);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_MSG,
failMsg);
}
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_RESULT,
CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() ==
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_CODE, failCode);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_MSG,
failMsg);
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
clearStartAutopilotParams();//清空参数数据,防止误传
@@ -104,6 +107,7 @@ public class TaxiAnalyticsManager {
// CallerLogger.INSTANCE.d(M_TAXI + "埋点==","restart = "+restart+", send= "+send);
if (send) {
if (mStartAutopilotParams.isEmpty()) return;
// 开启成功,上报埋点
clearStartAutopilotFailureMSG();
removeWaitingCallback();

View File

@@ -257,8 +257,8 @@ dependencies {
implementation rootProject.ext.dependencies.arouter
implementation rootProject.ext.dependencies.boostmultidex
debugImplementation rootProject.ext.dependencies.debugleakcanary
releaseImplementation rootProject.ext.dependencies.releaseleakcanary
// debugImplementation rootProject.ext.dependencies.debugleakcanary
// releaseImplementation rootProject.ext.dependencies.releaseleakcanary
implementation rootProject.ext.dependencies.android_start_up
implementation rootProject.ext.dependencies.lancetx_runtime
implementation rootProject.ext.dependencies.mogocustommap

View File

@@ -102,8 +102,8 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
HmiBuildConfig.isShowBrakeLightView = false
HmiBuildConfig.isShowTurnLightView = false
// HmiBuildConfig.isShowBrakeLightView = false
// HmiBuildConfig.isShowTurnLightView = false
}
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {

View File

@@ -1,5 +1,7 @@
package com.mogo.eagle.core.function.autopilot.adapter;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DEVA;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
@@ -20,6 +22,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateLi
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import org.jetbrains.annotations.NotNull;
@@ -96,9 +99,10 @@ public class MoGoHandAdasMsgManager implements
@Override
public void onAutopilotLightSwitchData(Chassis.LightSwitch lightSwitch) {
//can数据转发 转向灯状态 0是正常 1是左转 2是右转
if (!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //小巴不展示
// if (!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //小巴不展示
if (lightSwitch != null) {
int state = setTurnLightState(lightSwitch.getNumber());
CallerLogger.INSTANCE.d(M_DEVA + "TurnLight", "---onAutopilotLightSwitchData ---state = " + state + "---lightSwitch.getNumber() = " + lightSwitch.getNumber());
if (state == 1 || state == 2) {
isShowTurnLight = true;
CallerHmiManager.INSTANCE.showBrakeLight(0);
@@ -107,7 +111,7 @@ public class MoGoHandAdasMsgManager implements
}
CallerHmiManager.INSTANCE.showTurnLight(state);
}
}
// }
}
@@ -126,7 +130,7 @@ public class MoGoHandAdasMsgManager implements
@Override
public void onAutopilotCarStateData(@Nullable MessagePad.GnssInfo gnssInfo) {
//根据加速度判断 是否刹车
if (!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //小巴不展示
// if (!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //小巴不展示
if (gnssInfo != null) {
//设置刹车信息
if (gnssInfo.getAcceleration() < SharedPrefsMgr.getInstance(mContext).getFloat(MoGoConfig.BRAKE_ACCELERATION_THRESHOLD, -2.5F)) {
@@ -134,10 +138,11 @@ public class MoGoHandAdasMsgManager implements
} else {
brakeLight = 0;
}
CallerLogger.INSTANCE.d(M_DEVA + "BrakeLight", "---onAutopilotLightSwitchData ---Acceleration = " + gnssInfo.getAcceleration() + "-- brakeLight = " + brakeLight);
if (!isShowTurnLight) {
CallerHmiManager.INSTANCE.showBrakeLight(brakeLight);
}
}
// }
}
}

View File

@@ -89,7 +89,7 @@ class MoFangManager private constructor() {
private val bluetoothMonitorReceiver: BroadcastReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
when (intent.action) {
BluetoothAdapter.ACTION_STATE_CHANGED -> { //中间状态
BluetoothAdapter.ACTION_STATE_CHANGED -> { //中间状态 TODO
CallerLogger.d("$M_F${TAG}","bluetoothMonitorReceiver ACTION_STATE_CHANGED action = ${intent.action}")
}

View File

@@ -65,8 +65,8 @@ dependencies {
// implementation rootProject.ext.dependencies.crashSdk
implementation rootProject.ext.dependencies.boostmultidex
debugImplementation rootProject.ext.dependencies.debugleakcanary
releaseImplementation rootProject.ext.dependencies.releaseleakcanary
// debugImplementation rootProject.ext.dependencies.debugleakcanary
// releaseImplementation rootProject.ext.dependencies.releaseleakcanary
implementation rootProject.ext.dependencies.arouter
kapt rootProject.ext.dependencies.aroutercompiler

View File

@@ -89,6 +89,7 @@ import com.mogo.eagle.core.function.main.DisplayEffectsHelper
import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
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.Companion.M_HMI
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
@@ -1378,6 +1379,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
* 显示转向灯效果 if (HmiBuildConfig.isShowBadCaseView) {
*/
override fun showTurnLight(light: Int) {
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight = $light ---isLeftLight = $isLeftLight ---isRightLight = $isRightLight")
if (HmiBuildConfig.isShowTurnLightView) {
ThreadUtils.runOnUiThread {
if (light == 1 || light == 2) {
@@ -1391,26 +1393,28 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
CallerVisualAngleManager.changeVisualAngle(Turning(false))
}
}
if (light == 1) {
if (light == 1) { //左转灯
if (!isLeftLight) {
isLeftLight = true
isRightLight = false
isDisappare = false
//TODO
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light = 1")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500)
}
} else if (light == 2) {
} else if (light == 2) { //右转灯
if (!isRightLight) {
isRightLight = true
isLeftLight = false
isDisappare = false
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light = 2")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500)
}
} else {
if (!isDisappare) {
if (!isDisappare) { //默认 不亮灯
isDisappare = true
isLeftLight = false
isRightLight = false
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light other")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
}
}
@@ -1433,11 +1437,13 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
if (light == 1) { //刹车灯亮
if (!isBrake) {
isBrake = true
CallerLogger.d("${SceneConstant.M_DEVA}${"BrakeLight"}", " showBrakeLight light = 1 ")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
}
} else {
if (isBrake) {
if (isBrake) {//默认 不亮灯
isBrake = false
CallerLogger.d("${SceneConstant.M_DEVA}${"BrakeLight"}", " showBrakeLight light != 1 ")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
}
}

View File

@@ -201,8 +201,8 @@ class DriverMsgBoxListView @JvmOverloads constructor(
@Subscribe(threadMode = ThreadMode.MAIN)
fun notifyList(msgBoxList: MsgBoxBean){
badCaseList?.let {
it.remove(msgBoxList)
driverMsgBoxListAdapter?.notifyItemRemoved(it.indexOf(msgBoxList))
it.remove(msgBoxList)
}
}
}

View File

@@ -83,7 +83,6 @@ import com.zhidao.easysocket.utils.L
import com.zhjt.mogo_core_function_devatools.env.*
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import kotlinx.android.synthetic.main.view_debug_setting.view.tbRouteDynamicEffect
import kotlinx.android.synthetic.main.view_sop_setting.view.*
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
import java.text.SimpleDateFormat
@@ -583,15 +582,15 @@ class DebugSettingView @JvmOverloads constructor(
tbIsDemoMode.isChecked = FunctionBuildConfig.isDemoMode
// 演示模式
tbIsDemoMode.setOnCheckedChangeListener { _, isChecked ->
CallerHmiManager.updateStatusBarLeftView(isChecked, "demoMode", DemoModeView(context))
CallerAutoPilotManager.setDemoMode(isChecked)
if (!isChecked) {
tbIsDemoMode.setOnCheckedChangeListener { _, _ ->
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context))
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
if (!FunctionBuildConfig.isDemoMode) {
//关闭美化模式时,通知工控机
CallerAutoPilotManager.setIPCDemoMode(isChecked)
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
}
FunctionBuildConfig.isDemoMode = isChecked
tbIsDrawAutopilotTrajectoryData.isEnabled = !isChecked
tbIsDrawAutopilotTrajectoryData.isEnabled = !FunctionBuildConfig.isDemoMode
if (!FunctionBuildConfig.isDemoMode) {
tbIsDrawAutopilotTrajectoryData.isChecked = false
}
@@ -1833,6 +1832,13 @@ class DebugSettingView @JvmOverloads constructor(
mUnknownIdentifyDataSize = 0
mTrajectoryInfoSize = 0
mRouteInfoSize = 0
if(FunctionBuildConfig.isDemoMode){
tbIsDemoMode.text = "关闭美化模式"
}else{
tbIsDemoMode.text = "开启美化模式"
}
}
/**

View File

@@ -20,9 +20,11 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import kotlinx.android.synthetic.main.view_sop_setting.view.*
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
import java.util.*
/**
* SOP设置窗口
@@ -109,7 +111,6 @@ class SOPSettingView @JvmOverloads constructor(
tbObuV2vView.setOnCheckedChangeListener { _, isChecked ->
//默认关闭
HmiBuildConfig.isShowObuV2vView = isChecked
Log.d("liyz", "v2v isChecked = $isChecked")
}
/**
@@ -118,7 +119,15 @@ class SOPSettingView @JvmOverloads constructor(
tbObuV2iView.setOnCheckedChangeListener { _, isChecked ->
//默认关闭
HmiBuildConfig.isShowObuV2iView = isChecked
Log.d("liyz", "viv isChecked = $isChecked")
}
/**
* obu 数据通过dc 传输V2i事件 开关 TODO pm确定下开关功能 HmiBuildConfig.isShowObuToDcV2iView
*/
tbObuToDcView.setOnCheckedChangeListener { _, isChecked ->
//默认开启
HmiBuildConfig.isShowObuToDcV2iView = !isChecked
// Log.d("liyz", "HmiBuildConfig.isShowObuToDcV2iView = " + HmiBuildConfig.isShowObuToDcV2iView)
}
//红绿灯标识
@@ -146,14 +155,14 @@ class SOPSettingView @JvmOverloads constructor(
// 演示模式,上一次勾选的数据
tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
// 演示模式
tbDemoMode.setOnCheckedChangeListener { _, isChecked ->
CallerHmiManager.updateStatusBarLeftView(isChecked, "demoMode", DemoModeView(context))
CallerAutoPilotManager.setDemoMode(isChecked)
if (!isChecked) {
tbDemoMode.setOnCheckedChangeListener { _, _ ->
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context))
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
if (!FunctionBuildConfig.isDemoMode) {
//关闭美化模式时,通知工控机
CallerAutoPilotManager.setIPCDemoMode(isChecked)
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
}
FunctionBuildConfig.isDemoMode = isChecked
}
//只在司机端设置美化模式开关功能
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
@@ -239,12 +248,32 @@ class SOPSettingView @JvmOverloads constructor(
CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener(
FuncBizConfig.FOUNDATION, TAG, true, this
)
// 开启定时查询速度
Timer().schedule(timerTaskRefresh, Date(), 500)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
// 移除 业务配置监听
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(FuncBizConfig.FOUNDATION, TAG)
try {
timerTaskRefresh.cancel()
} catch (e: Exception) {
e.printStackTrace()
}
}
private val timerTaskRefresh = object : TimerTask(){
override fun run() {
UiThreadHandler.post{
if(FunctionBuildConfig.isDemoMode){
tbDemoMode.text = "关闭美化模式"
}else{
tbDemoMode.text = "开启美化模式"
}
}
}
}
override fun updateBizView(type: String, lock: Boolean) {

View File

@@ -230,22 +230,22 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
*/
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
String bluetoothName = SharedPrefsMgr.getInstance(getContext()).getString(MfConstants.BLUETOOTH_NAME);
if (!isPressEnd) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent bluetoothName = " + bluetoothName);
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---1--- bluetoothName = " + bluetoothName);
}
if (bluetoothName.equals("MINI_KEYBOARD")) {
if (!isPressEnd) {
isPressEnd = true;
startPressTime = System.currentTimeMillis();
}
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---2--- bluetoothName = " + bluetoothName + "--- code = " + event.getKeyCode() + "--action = " + event.getAction());
if (event.getKeyCode() == KeyEvent.KEYCODE_A) { //单击 -1长按无操作AB组合-2
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressADownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
if ((pressADownTime - startPressTime) > 320 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
if (isShowToast) {
ToastUtils.showShort("方块 A 按AB组合 -2 ");
}
@@ -264,7 +264,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressAUpTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime);
if ((pressAUpTime - startPressTime) < 300 && isCombinationKey != 3) {
if ((pressAUpTime - startPressTime) < 350 && isCombinationKey != 3) {
isCombinationKey = 1;
if (isShowToast) {
ToastUtils.showShort("方块 单击A -1 ");
@@ -285,7 +285,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressBDownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
if ((pressBDownTime - startPressTime) > 320 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
if (isShowToast) {
ToastUtils.showShort("方块 B 按AB组合 ");
}
@@ -304,7 +304,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressBUpTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime);
if ((pressBUpTime - startPressTime) < 300 && isCombinationKey != 3) {
if ((pressBUpTime - startPressTime) < 350 && isCombinationKey != 3) {
if (isShowToast) {
ToastUtils.showShort("方块 单击B 0 ");
}
@@ -325,8 +325,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getKeyCode() == KeyEvent.KEYCODE_C) { //单击左变道,长按无操作
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressCDownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 time dif = " + (pressCDownTime - startPressTime));
if ((pressCDownTime - startPressTime) > 1320) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 ");
if (isShowToast) {
ToastUtils.showShort("方块 长按C 无操作 ");
}
@@ -334,8 +334,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressCUpTime = System.currentTimeMillis();
isPressEnd = false;
if ((pressCUpTime - startPressTime) < 300) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 ");
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 time dif = " + (pressCUpTime - startPressTime));
if ((pressCUpTime - startPressTime) < 350) {
if (isShowToast) {
ToastUtils.showShort("方块 单击C ← 向左变道 ");
}
@@ -346,8 +346,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getKeyCode() == KeyEvent.KEYCODE_D) { //单击向右变道,双击无操作
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressDDownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 time dif = " + (pressDDownTime - startPressTime));
if ((pressDDownTime - startPressTime) > 1320) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 ");
if (isShowToast) {
ToastUtils.showShort("方块 长按D 无操作 ");
}
@@ -355,11 +355,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressDUpTime = System.currentTimeMillis();
isPressEnd = false;
if ((pressDUpTime - startPressTime) < 300) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 time dif = " + (pressDUpTime - startPressTime));
if ((pressDUpTime - startPressTime) < 350) {
if (isShowToast) {
ToastUtils.showShort("方块 单击D → 向右变道 ");
}
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 ");
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight();
}
}
@@ -367,11 +367,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getKeyCode() == KeyEvent.KEYCODE_E) { //单击启动自驾,长按鸣笛
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressEDownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 time dif = " + (pressEDownTime - startPressTime));
if ((pressEDownTime - startPressTime) > 1320) {
if (isShowToast) {
ToastUtils.showShort("方块 长按E 鸣笛 ");
}
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 ");
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1);
if (timerHorn == null) {
timerHorn = new Timer();
@@ -387,11 +387,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressEUpTime = System.currentTimeMillis();
isPressEnd = false;
if ((pressEUpTime - startPressTime) < 300) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "方块 单击E 开启自动驾驶 time dif = " + (pressEUpTime - startPressTime));
if ((pressEUpTime - startPressTime) < 350) {
if (isShowToast) {
ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
}
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击E 开启自动驾驶 ");
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
}
}

View File

@@ -154,13 +154,25 @@
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbObuWeaknessTrafficSop"
android:id="@+id/tbObuToDcView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:padding="@dimen/dp_20"
android:background="@drawable/radio_button_normal_background_right"
app:layout_constraintTop_toBottomOf="@id/tbObuV2iView"
android:textOff="关闭OBU到工控机V2I显示"
android:textOn="打开OBU到工控机V2I显示"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbObuWeaknessTrafficSop"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:padding="@dimen/dp_20"
android:background="@drawable/radio_button_normal_background_right"
app:layout_constraintTop_toBottomOf="@id/tbObuToDcView"
android:textOff="关闭路侧弱势群体预警"
android:textOn="打开路侧弱势群体预警"
android:textSize="@dimen/dp_24" />

View File

@@ -168,9 +168,6 @@ object TrafficMarkerDrawer {
TAG,
"drawObuRecognizedDataMarker trafficData.type = " + trafficData.type + "---trafficData.threatLevel = " + trafficData.threatLevel
)
// Log.d("liyz",
// "drawObuRecognizedDataMarker trafficData.type = " + trafficData.type + "---trafficData.threatLevel = " + trafficData.threatLevel
// )
if (trafficData.type != null) {
val resId: Int = trafficData.type.traffic3DIconId

View File

@@ -114,5 +114,12 @@ object HmiBuildConfig {
@Volatile
var isShowObuV2iView = false
/**
* 是否展示obu通过工控机展示的v2i
*/
@JvmField
@Volatile
var isShowObuToDcV2iView = true
}

View File

@@ -50,6 +50,8 @@ dependencies {
// MoGo 数据埋点工具
implementation rootProject.ext.dependencies.analytics
compileOnly rootProject.ext.dependencies.mogocustommap
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_utils

View File

@@ -9,7 +9,6 @@ import androidx.lifecycle.Lifecycle.Event
import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.LifecycleOwner
import com.mogo.cloud.commons.utils.CoordinateUtils
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
@@ -20,6 +19,7 @@ import com.mogo.eagle.core.utilcode.kotlin.safeCancel
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
import com.mogo.map.uicontroller.VisualAngleMode
import com.zhidaoauto.map.sdk.open.tools.MapTools
import kotlinx.coroutines.*
import kotlinx.coroutines.android.asCoroutineDispatcher
import kotlinx.coroutines.internal.synchronized
@@ -63,42 +63,43 @@ object CallerVisualAngleManager {
val displayThreshold: Long //最大展示时长 > 0; 表示最长展示多长时间, -1 表示,一直展示,直到触发默认视角, 0: 默认视角专用值,
}
private val beginLocation = AtomicReference<MogoLocation>()
private val triggerLocation = AtomicReference<MogoLocation>()
private val distanceOfCarToStopLine = AtomicReference<Double>()
private val distanceOfCarToStopLine = AtomicReference(0.0)
private val travelled by lazy { AtomicReference(0.0) }
private val listener = object : OnRoadListener {
private var roadId = ""
private val roadId = AtomicReference<String>()
private val triggerRoadId = AtomicReference<String>()
override fun onRoadIdInfo(roadId: String) {
val oldRoadId = this.roadId
Log.d(TAG, "-- onRoadIdInfo --: prev: ${this.roadId} -> curr: $roadId")
val startLoc = beginLocation.get()
val currLoc = CallerMapLocationListenerManager.getCurrentLocation()
this.roadId.set(roadId)
Log.d(TAG, "-- onRoadIdInfo --: prev: ${this.triggerRoadId.get()} -> curr: $roadId")
val loc = CallerMapLocationListenerManager.getCurrentLocation()
var triggerClose = false
val distance = distanceOfCarToStopLine.get()
if (hasCrossRoad && distance > 0 && oldRoadId != roadId && startLoc != null && currLoc != null && CoordinateUtils.calculateLineDistance(startLoc.longitude, startLoc.latitude, currLoc.longitude, currLoc.latitude).also {
Log.d(TAG, "d1: $it, d2: $distance")
} >= distance) {
distanceOfCarToStopLine.set(0.0)
hasCrossRoad = false
Log.d(TAG, "-- onRoadIdInfo --: trigger close --")
triggerClose = true
}
if (!triggerClose && hasCrossRoad && oldRoadId == roadId) {
val beginLoc = beginLocation.get()
val endLoc = CallerMapLocationListenerManager.getCurrentLocation()
if (beginLoc != null && endLoc != null && abs(beginLoc.bearing - endLoc.bearing) >= 170) {
Log.d(TAG, "-- onRoadIdInfo --: trigger close 2 --")
triggerClose = true
val distance = distanceOfCarToStopLine.get() + 5
if (hasCrossRoad && distance > 0) {
val prev = triggerLocation.get()
if (prev != null && loc != null) {
travelled.set(MapTools.distance(loc.longitude, loc.latitude, prev.longitude, prev.latitude) + travelled.get())
triggerLocation.set(loc)
}
val oldRoadId = triggerRoadId.get()
Log.d(TAG, "-- onRoadIdInfo --: travelled --: ${travelled.get()}")
if ((travelled.get() > distance) && oldRoadId != null && oldRoadId != roadId) {
distanceOfCarToStopLine.set(0.0)
hasCrossRoad = false
beginLocation.set(null)
triggerRoadId.set(null)
travelled.set(0.0)
triggerLocation.set(null)
Log.d(TAG, "-- onRoadIdInfo --: trigger close --")
triggerClose = true
}
}
if (triggerClose) {
changeVisualAngle(CrossRoad(false))
}
this.roadId = roadId
}
@@ -106,8 +107,9 @@ object CallerVisualAngleManager {
Log.d(TAG, "-- onStopLineInfo --: ${info.distanceOfCarToStopLine}")
if (!hasCrossRoad && info.distanceOfCarToStopLine <= 30.0) {
hasCrossRoad = true
triggerRoadId.set(this.roadId.get())
distanceOfCarToStopLine.set(info.distanceOfCarToStopLine)
beginLocation.set(CallerMapLocationListenerManager.getCurrentLocation())
triggerLocation.set(CallerMapLocationListenerManager.getCurrentLocation())
changeVisualAngle(CrossRoad(true))
}
}
@@ -236,12 +238,11 @@ object CallerVisualAngleManager {
}
}
private val heap by lazy {
private val queue by lazy {
PriorityQueue<Record>()
}
@OptIn(InternalCoroutinesApi::class)
fun changeVisualAngle(scene: Scene) {
fun changeVisualAngle(current: Scene) {
val appIdentityMode = FunctionBuildConfig.appIdentityMode
if (AppIdentityModeUtils.isBus(appIdentityMode) && AppIdentityModeUtils.isPassenger(appIdentityMode)) {
return
@@ -252,87 +253,87 @@ object CallerVisualAngleManager {
val displayed = getDisplayed()
if (displayed == null) {
Log.d("${M_DEVA}${TAG}", "--- 2 ---")
val top = getTop() //堆顶
if (top != null) {
if (top.target.priority >= scene.priority) {
Log.d("${M_DEVA}${TAG}", "--- 3 ---")
top.triggerTime = triggerTime
doChangeAngle(top)
synchronized(heap){
heap += Record(scene, triggerTime = -1)
}
} else {
Log.d("${M_DEVA}${TAG}", "--- 4 ---")
doChangeAngle(Record(scene, triggerTime = triggerTime))
if (current is Turning) {
if (!current.open) {
changeVisualAngle(Default())
return@launch
}
} else {
Log.d("${M_DEVA}${TAG}", "--- 5 ---")
doChangeAngle(Record(scene, triggerTime = triggerTime))
}
if (current is CrossRoad) {
if (!current.open) {
changeVisualAngle(Default())
return@launch
}
}
doRealVisualAngleChange(triggerTime, current, null)
} else {
val prev = displayed.target
Log.d("${M_DEVA}${TAG}", "--- 6 --- old: $prev -> cur: $scene")
Log.d("${M_DEVA}${TAG}", "--- 3 --- old: $prev -> cur: $current")
val prevTriggerTime = displayed.triggerTime
if (scene !is Default && prev.priority >= scene.priority && (prev is RoadEvent || prev is TooClose)) {
if (current !is Default && prev.priority > current.priority && (prev is RoadEvent || prev is TooClose)) {
val displayDuration = triggerTime - prevTriggerTime
Log.d("${M_DEVA}${TAG}", "--- 7 ---:duration: $displayDuration")
Log.d("${M_DEVA}${TAG}", "--- 4 ---:场景[$prev], 已展示时长: duration: $displayDuration")
if (displayDuration < prev.displayThreshold) {
Log.d("${M_DEVA}${TAG}", "--- 8 --- old: $prev -> cur: $scene")
Log.d("${M_DEVA}${TAG}", "--- 5 --- 场景[$prev]:仍在保护展示时长内直接return")
return@launch
}
}
if (prev.priority > scene.priority) {
Log.d("${M_DEVA}${TAG}", "--- 9 --- old: $prev -> cur: $scene")
if (prev.displayThreshold < 0) {
return@launch
}
}
if (scene is Turning) {
val isOpen = scene.open
if (prev is Turning && current is Turning) {
val isOpen = current.open
if (!isOpen) {
Log.d("${M_DEVA}${TAG}", "--- 10 --- old: $prev -> cur: $scene")
Log.d("${M_DEVA}${TAG}", "--- 7 --- 场景[$current], 收到关闭通知")
queue -= displayed
changeVisualAngle(Default())
heap -= displayed
return@launch
}
}
if (scene is CrossRoad) {
val isOpen = scene.open
if (prev is CrossRoad && current is CrossRoad) {
val isOpen = current.open
if (!isOpen) {
Log.d("${M_DEVA}${TAG}", "--- 11 --- old: $prev -> cur: $scene")
Log.d("${M_DEVA}${TAG}", "--- 8 --- old: $prev -> cur: $current")
queue -= displayed
changeVisualAngle(Default())
heap -= displayed
return@launch
}
}
if (scene is Default) {
Log.d("${M_DEVA}${TAG}", "--- 12 ---")
defaultDelayJob?.safeCancel()
launch {
val delay = scene.unit.toMillis(scene.delay)
Log.d("${M_DEVA}${TAG}", "--- 13 ---")
delay(delay)
Log.d("${M_DEVA}${TAG}", "--- 14 ---")
doChangeAngle(Record(scene, triggerTime = triggerTime))
heap -= displayed
}.also { itx ->
itx.invokeOnCompletion {
if (it is CancellationException) {
Log.d("${M_DEVA}${TAG}", "--- 15 ---")
}
}
defaultDelayJob = itx
}
} else {
Log.d("${M_DEVA}${TAG}", "--- 16 ---")
defaultDelayJob?.safeCancel()
if (displayed.target.priority < scene.priority) {
Log.d("${M_DEVA}${TAG}", "--- 17 ---")
doChangeAngle(Record(scene, triggerTime = triggerTime))
if (prev.priority > current.priority && prev.displayThreshold < 0) {
Log.d("${M_DEVA}${TAG}", "--- 6 --- 场景[$prev]正在展示尚未收到关闭场景依然展示当前场景直接return")
return@launch
}
doRealVisualAngleChange(triggerTime, current, displayed)
}
}
}
private fun CoroutineScope.doRealVisualAngleChange(triggerTime: Long, target: Scene, displayed: Record? = null) {
if (target is Default) {
Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 1 ---")
defaultDelayJob?.safeCancel()
launch {
val delay = target.unit.toMillis(target.delay)
Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 2 ---")
delay(delay)
displayed?.also {
queue -= it
}
Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 3 ---")
doChangeAngle(Record(target, triggerTime = triggerTime))
}.also { itx ->
itx.invokeOnCompletion {
if (it is CancellationException) {
Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 4 ---")
}
}
defaultDelayJob = itx
}
} else {
Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 5 ---")
defaultDelayJob?.safeCancel()
if (displayed == null || displayed.target.priority < target.priority) {
Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 6 ---")
queue -= displayed
doChangeAngle(Record(target, triggerTime = triggerTime))
}
}
}
@@ -344,8 +345,8 @@ object CallerVisualAngleManager {
Log.d("${M_DEVA}${TAG}", "--- doChangeAngle --- ${record.target}")
if (record.target !is Default) {
record.isDisplay = true
synchronized(heap) {
heap += record
synchronized(queue) {
queue += record
}
}
it.changeMapVisualAngle(angle, null)
@@ -356,8 +357,6 @@ object CallerVisualAngleManager {
* 是否有正在展示的
*/
@Synchronized
private fun getDisplayed() = heap.find { it.isDisplay }
private fun getDisplayed() = queue.firstOrNull()
@Synchronized
private fun getTop() = heap.firstOrNull()
}

View File

@@ -649,8 +649,8 @@ public class AMapViewWrapper implements IMogoMapView,
/**
* 设置转向灯和刹车灯
*
* @param type :车尾灯类型 time: 闪烁时间 最小500ms 小于500ms 默认为500ms
* @param time
* @param type :车尾灯类型
* @param time 闪烁时间 最小500ms 小于500ms 默认为500ms
*/
@Override
public void setCarLightsType(int type, int time) {

View File

@@ -68,7 +68,7 @@ public class ApmCrashReportProvider implements ITestCrashReportProvider {
mCityCode = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.LOCATION_CITY_CODE);
mLat = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.LOCATION_LATITUDE);
mLogt = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.LOCATION_LONGITUDE);
// Log.d("liyz", "cityCode = " + mCityCode + " --lat = " +mLat + " --logt = " + mLogt);
// Log.d(TAG, "cityCode = " + mCityCode + " --lat = " +mLat + " --logt = " + mLogt);
//地图版本
String mapSDKVersion = DebugConfig.getMapVersion();
map.put("MAP_SDK_VERSION", mapSDKVersion);