Merge branch 'test_robotaxi-d-app-module_2130_221116_2.13.0.1' into 'release_robotaxi-d-app-module_2130_221116_2.13.0.1'
Test robotaxi d app module 2130 221116 2.13.0.1 See merge request zhjt/AndroidApp/MoGoEagleEye!501
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class BusPassengerConst {
|
||||
// 未到站(未到站)
|
||||
const val STATION_STATUS_ARRIVING = 3
|
||||
|
||||
//bus平均速度
|
||||
//bus平均速度 bus的平均里程:25km/h
|
||||
const val BUS_AVERAGE_SPEED = 25
|
||||
|
||||
// 订单总里程
|
||||
|
||||
@@ -32,6 +32,8 @@ 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 com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.och.bus.passenger.R;
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerOperationStatusResponse;
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerRoutesResponse;
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerRoutesResult;
|
||||
@@ -45,8 +47,8 @@ import com.mogo.och.bus.passenger.constant.BusPassengerConst;
|
||||
import com.mogo.och.bus.passenger.network.BusPassengerModelLoopManager;
|
||||
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 org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -134,21 +136,31 @@ public class BusPassengerModel {
|
||||
private void queryDriverOperationStatus() {
|
||||
BusPassengerServiceManager.queryDriverOperationStatus(mContext
|
||||
, new OchCommonServiceCallback<BusPassengerOperationStatusResponse>() {
|
||||
@Override
|
||||
public void onSuccess(BusPassengerOperationStatusResponse data) {
|
||||
if (data == null || data.data == null) return;
|
||||
if(mDriverStatusCallback != null){
|
||||
mDriverStatusCallback.changeOperationStatus(data.data.driverStatus == 1);
|
||||
mDriverStatusCallback.updatePlateNumber(data.data.plateNumber);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onSuccess(BusPassengerOperationStatusResponse data) {
|
||||
if (data == null || data.data == null) return;
|
||||
if (mDriverStatusCallback != null) {
|
||||
mDriverStatusCallback.changeOperationStatus(data.data.driverStatus == 1);
|
||||
mDriverStatusCallback.updatePlateNumber(data.data.plateNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
//延迟3s再次查询
|
||||
queryDriverOperationDelay();
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort(mContext.getString(R.string.network_error_tip));
|
||||
} else {
|
||||
ToastUtils.showShort(mContext.getString(R.string.request_error_tip));
|
||||
}
|
||||
queryDriverOperationDelay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
//延迟3s再次查询
|
||||
queryDriverOperationDelay();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void queryDriverSiteByCoordinate(){
|
||||
@@ -160,6 +172,7 @@ public class BusPassengerModel {
|
||||
|| data.getResult() == null
|
||||
|| data.getResult().getSites() == null) {
|
||||
routesResult = null;
|
||||
mNextStationIndex = 0;
|
||||
startOrStopCalculateRouteInfo(false);
|
||||
if (mRouteLineInfoCallback != null){
|
||||
mRouteLineInfoCallback.showNoTaskView();
|
||||
@@ -173,14 +186,20 @@ public class BusPassengerModel {
|
||||
updatePassengerRouteInfo(data.getResult());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
//code = 1003; message = bus车辆已收车或未出车;bus driver shadow,not exists
|
||||
if (code == 1003){
|
||||
routesResult = null;
|
||||
startOrStopCalculateRouteInfo(false);
|
||||
queryDriverOperationDelay();
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = %s", msg );
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -256,6 +275,8 @@ public class BusPassengerModel {
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext);
|
||||
}
|
||||
|
||||
private void releaseListeners() {
|
||||
@@ -269,6 +290,8 @@ public class BusPassengerModel {
|
||||
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener);
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
|
||||
}
|
||||
|
||||
//监听网络变化,避免启动机器时无网导致无法更新订单信息
|
||||
@@ -386,7 +409,6 @@ public class BusPassengerModel {
|
||||
List<MessagePad.Location> routePoints = routeList.getWayPointsList();
|
||||
if (null != routePoints && routePoints.size() > 0){
|
||||
updateRoutePoints(routePoints);
|
||||
setRouteLineMarker();
|
||||
startToRouteAndWipe();
|
||||
}
|
||||
}
|
||||
@@ -417,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 { //只有两个站点的时候整个路线就是两个站点之间的轨迹
|
||||
@@ -452,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);
|
||||
}
|
||||
@@ -509,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
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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,21 +191,18 @@ public class BusPassengerMapDirectionView
|
||||
//圈定地图显示范围
|
||||
LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder();
|
||||
|
||||
if (mLineStationLatLng.size() > 0){
|
||||
if (mCoordinatesLatLng.size() > 0){
|
||||
//存放经纬度
|
||||
for (int i = 0; i < mLineStationLatLng.size(); i++) {
|
||||
boundsBuilder.include(mLineStationLatLng.get(i));
|
||||
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));
|
||||
}
|
||||
}
|
||||
// else {
|
||||
//第二个参数为四周留空宽度
|
||||
//设置希望展示的地图缩放级别
|
||||
// CameraPosition cameraPosition = new CameraPosition.Builder()
|
||||
// .target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build();
|
||||
// mAMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
|
||||
// }
|
||||
|
||||
boundsBuilder.include(currentLatLng);
|
||||
mAMap.moveCamera(CameraUpdateFactory.newLatLngBoundsRect(boundsBuilder.build(),100,100,100,100));
|
||||
}
|
||||
@@ -270,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(){
|
||||
@@ -323,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) {
|
||||
@@ -347,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -60,7 +60,9 @@ public class BusProvider implements IMogoOCH {
|
||||
} else {
|
||||
busFragment = new BusFragment();
|
||||
}
|
||||
supportFragmentManager.beginTransaction().add(containerId, busFragment, BusFragment.TAG).commitAllowingStateLoss();
|
||||
if(!busFragment.isAdded()) {
|
||||
supportFragmentManager.beginTransaction().add(containerId, busFragment, BusFragment.TAG).commitAllowingStateLoss();
|
||||
}
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(TAG, "准备show fragment");
|
||||
|
||||
@@ -63,6 +63,7 @@ class BusConst {
|
||||
const val EVENT_PARAM_END_NAME = "end_name"
|
||||
const val EVENT_PARAM_LINE_ID = "line_id"
|
||||
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
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.och.bus.bean.BusQueryLineTaskResponse;
|
||||
import com.mogo.och.bus.bean.BusQueryLinesResponse;
|
||||
import com.mogo.och.bus.bean.BusRoutesResponse;
|
||||
@@ -56,6 +57,15 @@ public class BusLineModel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort(mContext.getString(R.string.network_error_tip));
|
||||
} else {
|
||||
ToastUtils.showShort(mContext.getString(R.string.request_error_tip));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String failMsg) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
@@ -86,6 +96,15 @@ public class BusLineModel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort(mContext.getString(R.string.network_error_tip));
|
||||
} else {
|
||||
ToastUtils.showShort(mContext.getString(R.string.request_error_tip));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String failMsg) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
@@ -107,6 +126,15 @@ public class BusLineModel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort(mContext.getString(R.string.network_error_tip));
|
||||
} else {
|
||||
ToastUtils.showShort(mContext.getString(R.string.request_error_tip));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String failMsg) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
|
||||
@@ -68,6 +68,8 @@ import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.mogo.och.common.module.utils.ToastUtilsOch;
|
||||
import com.mogo.och.common.module.voice.VoiceNotice;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -118,7 +120,7 @@ public class BusOrderModel {
|
||||
private volatile int firstStartAutopilot = 0;
|
||||
|
||||
private LoginService loginService;
|
||||
|
||||
|
||||
private final Handler handler = new Handler(new Handler.Callback() {
|
||||
@Override
|
||||
public boolean handleMessage(Message msg) {
|
||||
@@ -160,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);
|
||||
@@ -343,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();
|
||||
}
|
||||
@@ -369,8 +371,8 @@ public class BusOrderModel {
|
||||
|
||||
private final OchAdasStartFailureCallback mAdasStartFailureListener = new OchAdasStartFailureCallback() {
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NonNull String startFailedMessage) {
|
||||
BusAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedMessage);
|
||||
public void onStartAutopilotFailure(@NotNull String startFailedCode, @NonNull String startFailedMessage) {
|
||||
BusAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage);
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode){
|
||||
CallerLogger.INSTANCE.e( M_BUS + TAG, "mAdasStartFailureListener = "+startFailedMessage );
|
||||
mADASStatusCallback.onStartAdasFailure();
|
||||
@@ -439,17 +441,30 @@ public class BusOrderModel {
|
||||
clearAutopilotControlParameters();
|
||||
closeBeautificationMode();
|
||||
clearStartAutopilotTag();
|
||||
removeTipRunnables();
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "获取到小巴路线数据: " + data);
|
||||
updateBusStatus(data.getResult());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort(mContext.getString(R.string.network_error_tip));
|
||||
} else {
|
||||
ToastUtils.showShort(mContext.getString(R.string.request_error_tip));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String failMsg) {
|
||||
// 重复请求小巴路线,直至成功
|
||||
//改为任务,为空不再去一直取
|
||||
// queryBusStationDelay();
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
}else {
|
||||
ToastUtils.showShort(failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -527,9 +542,22 @@ public class BusOrderModel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort(mContext.getString(R.string.network_error_tip));
|
||||
} else {
|
||||
ToastUtils.showShort(mContext.getString(R.string.request_error_tip));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String failMsg) {
|
||||
ToastUtils.showShort(failMsg);
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
}else {
|
||||
ToastUtils.showShort(failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -644,22 +672,32 @@ public class BusOrderModel {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-arriveSiteStation success");
|
||||
queryBusRoutes();
|
||||
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName, arriveStation);
|
||||
|
||||
if (o != null && o.code == 0){
|
||||
queryBusRoutes();
|
||||
isArrivedStation = true;
|
||||
isGoingToNextStation = false;
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName, arriveStation);
|
||||
}
|
||||
//5s轮询核销乘客
|
||||
// startOrStopQueryPassengerWriteOff(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort(mContext.getString(R.string.network_error_tip));
|
||||
} else {
|
||||
ToastUtils.showShort(mContext.getString(R.string.request_error_tip));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String failMsg) {
|
||||
isArrivedStation = false;
|
||||
isGoingToNextStation = true;
|
||||
if (ToastUtilsOch.isCustomFastClick(5000)) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
} else {
|
||||
if (isArrivedStation) return;
|
||||
ToastUtils.showShort(failMsg);
|
||||
}
|
||||
}
|
||||
@@ -712,6 +750,16 @@ public class BusOrderModel {
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName, finalNextStationName);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort(mContext.getString(R.string.network_error_tip));
|
||||
} else {
|
||||
ToastUtils.showShort(mContext.getString(R.string.request_error_tip));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String failMsg) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
@@ -975,9 +1023,22 @@ public class BusOrderModel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort(mContext.getString(R.string.network_error_tip));
|
||||
} else {
|
||||
ToastUtils.showShort(mContext.getString(R.string.request_error_tip));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String failMsg) {
|
||||
ToastUtils.showShort(failMsg);
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
}else {
|
||||
ToastUtils.showShort(failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1012,13 +1073,10 @@ public class BusOrderModel {
|
||||
}
|
||||
|
||||
if (isArrivedStation) return;
|
||||
isArrivedStation = true;
|
||||
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-当前==backgroundCurrentStationIndex="
|
||||
+ backgroundCurrentStationIndex);
|
||||
|
||||
isGoingToNextStation = false;
|
||||
|
||||
arriveSiteStation();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -38,25 +38,33 @@ public class BusAnalyticsManager {
|
||||
|
||||
private Runnable startAutopilotRunnable = () -> {
|
||||
// 15s内未开启,上报失败埋点
|
||||
triggerStartAutopilotFailureEvent("15s后app等待超时");
|
||||
triggerStartAutopilotFailureEvent("", "15s后app等待超时");
|
||||
};
|
||||
|
||||
public void triggerStartAutopilotFailureEventByAdas(String failMsg){
|
||||
public void triggerStartAutopilotFailureEventByAdas(String failCode, String failMsg){
|
||||
removeWaitingCallback();
|
||||
triggerStartAutopilotFailureEvent(failMsg);
|
||||
triggerStartAutopilotFailureEvent(failCode, failMsg);
|
||||
}
|
||||
|
||||
private void triggerStartAutopilotFailureEvent(String 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(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_MSG,
|
||||
failMsg);
|
||||
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
|
||||
clearStartAutopilotParams();//清空参数数据,防止误传
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void removeWaitingCallback() {
|
||||
if (startAutopilotRunnable != null &&
|
||||
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
|
||||
@@ -64,6 +72,15 @@ public class BusAnalyticsManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void clearStartAutopilotFailureMSG(){
|
||||
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_CODE, "");
|
||||
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_MSG, "");
|
||||
}
|
||||
|
||||
private void clearStartAutopilotParams(){
|
||||
mStartAutopilotParams.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发'开启自动驾驶'埋点流程
|
||||
* 开启自动驾驶,15s内成功则发送成功埋点,否则发送失败埋点
|
||||
@@ -89,10 +106,14 @@ public class BusAnalyticsManager {
|
||||
mStartAutopilotParams.put(BusConst.EVENT_PARAM_LINE_ID, lineId);
|
||||
|
||||
if (send) {
|
||||
if (mStartAutopilotParams.isEmpty()) return;
|
||||
// 开启成功,上报埋点
|
||||
clearStartAutopilotFailureMSG();
|
||||
removeWaitingCallback();
|
||||
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_RESULT, true);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
|
||||
clearStartAutopilotParams();//清空参数数据,防止误传
|
||||
} else {
|
||||
UiThreadHandler.postDelayed(startAutopilotRunnable, BusConst.LOOP_PERIOD_15S);
|
||||
}
|
||||
|
||||
@@ -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>){
|
||||
|
||||
@@ -5,5 +5,5 @@ package com.mogo.och.common.module.callback
|
||||
* @date: 2022/11/9
|
||||
*/
|
||||
interface OchAdasStartFailureCallback {
|
||||
fun onStartAutopilotFailure(startFailedMessage : String)
|
||||
fun onStartAutopilotFailure(startFailedCode : String, startFailedMessage : String)
|
||||
}
|
||||
@@ -2,9 +2,11 @@ package com.mogo.och.common.module.manager
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
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
|
||||
@@ -66,11 +68,12 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
|
||||
var toastStr = ""
|
||||
if (!locationStatusPermsStatus) toastStr += "定位服务异常 "
|
||||
if (!networkStatus) toastStr += " 网络异常 "
|
||||
if (!socketStatus) toastStr += " 长链接异常 "
|
||||
|
||||
if (!socketStatus && !DebugConfig.getProductFlavor().contains("Passenger")) toastStr += " 长链接异常 "
|
||||
|
||||
i(TAG, "abnormal_factors_Str = $toastStr")
|
||||
|
||||
if (toastStr !== ""){
|
||||
if (!FunctionBuildConfig.isDemoMode && toastStr !== ""){
|
||||
ToastUtils.showLong(toastStr + "请开启相应权限或者查看网络")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
|
||||
private boolean isAutopilotAbility = true;
|
||||
private String autopilotAbilityReason = "";
|
||||
private String startFailedCode = "";
|
||||
private String startFailedMessage = "";
|
||||
|
||||
private OchAdasStartFailureCallback failureCallback = null;
|
||||
@@ -56,6 +57,10 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
return autopilotAbilityReason;
|
||||
}
|
||||
|
||||
public String getStartFailedCode() {
|
||||
return startFailedCode;
|
||||
}
|
||||
|
||||
public String getStartFailedMessage() {
|
||||
return startFailedMessage;
|
||||
}
|
||||
@@ -111,9 +116,11 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
if (statistics == null) return;
|
||||
Logger.d(TAG, "AutopilotStatistics= " + statistics.status);
|
||||
if (failureCallback != null && 1 == statistics.status){
|
||||
startFailedCode = statistics.failedMessage.getCode();
|
||||
startFailedMessage = statistics.failedMessage.getMsg();
|
||||
failureCallback.onStartAutopilotFailure(startFailedMessage);
|
||||
Logger.d(TAG, "statistics-startFailedMessage= " + startFailedMessage);
|
||||
failureCallback.onStartAutopilotFailure(startFailedCode, startFailedMessage);
|
||||
Logger.d(TAG, String.format("statistics-startFailedCode = s%; startFailedMessage = s%",
|
||||
startFailedCode, startFailedMessage));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -38,6 +38,8 @@ 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;
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
|
||||
@@ -241,6 +243,11 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
|
||||
//增加限速监听
|
||||
CallLimitingVelocityListenerManager.INSTANCE.addListener(TAG,limitingVelocityListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext);
|
||||
|
||||
//开启自驾后 异常信息返回
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
|
||||
}
|
||||
|
||||
private void releaseListeners() {
|
||||
@@ -255,6 +262,10 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener);
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
CallLimitingVelocityListenerManager.INSTANCE.removeListener(limitingVelocityListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
|
||||
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -324,9 +335,14 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
public void onError() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
CallerLogger.INSTANCE.e(M_TAXI_P + TAG,"queryInAndWaitOrders"+code+msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -396,6 +412,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
//清除订单信息
|
||||
public void clearCurrentOCHOrder() {
|
||||
mCurrentOCHOrder = null;
|
||||
clearAutopilotControlParameters();
|
||||
SharedPrefsMgr.getInstance(mContext).remove(TaxiPassengerConst.SP_KEY_OCH_TAXI_ORDER);
|
||||
}
|
||||
|
||||
@@ -578,6 +595,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);
|
||||
@@ -907,12 +931,36 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
return;
|
||||
}
|
||||
|
||||
AutopilotControlParameters parameters = initAutopilotControlParameters();
|
||||
if (parameters == null){
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "AutopilotControlParameters is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters);
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "start autopilot with parameter: %s"
|
||||
, GsonUtil.jsonFromObject(parameters)
|
||||
+ " ,startSiteName=" + mCurrentOCHOrder.startSiteAddr
|
||||
+ " ,endSiteName=" + mCurrentOCHOrder.endSiteAddr);
|
||||
|
||||
|
||||
TaxiPassengerAnalyticsManager.getInstance().triggerStartAutopilotEvent(false, false,
|
||||
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.orderNo);
|
||||
}
|
||||
|
||||
private AutopilotControlParameters initAutopilotControlParameters() {
|
||||
if (!checkCurrentOCHOrder()) {
|
||||
CallerLogger.INSTANCE.e(M_TAXI_P + TAG, "no order or order is empty.");
|
||||
ToastUtils.showShort("当前订单不存在或异常!");
|
||||
return null;
|
||||
}
|
||||
|
||||
AutopilotControlParameters parameters = new AutopilotControlParameters();
|
||||
double startWgsLon = mCurrentOCHOrder.startSitePoint.get(0);
|
||||
double startWgsLat = mCurrentOCHOrder.startSitePoint.get(1);
|
||||
double endWgsLon = mCurrentOCHOrder.endSitePoint.get(0);
|
||||
double endWgsLat = mCurrentOCHOrder.endSitePoint.get(1);
|
||||
|
||||
AutopilotControlParameters parameters = new AutopilotControlParameters();
|
||||
parameters.vehicleType = mCurrentOCHOrder.businessType;
|
||||
parameters.startName = PinYinUtil.getPinYinHeadChar(mCurrentOCHOrder.startSiteAddr); // 起点名称拼音首字母大写:科学城B区2号门(KXCBQ2HM)
|
||||
parameters.endName = PinYinUtil.getPinYinHeadChar(mCurrentOCHOrder.endSiteAddr); // 终点名称拼音首字母大写:科学城C区三号门(KXCCQSHM)
|
||||
@@ -930,15 +978,26 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
mCurrentOCHOrder.contrailSaveTimeDPQP);
|
||||
}
|
||||
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters);
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "start autopilot with parameter: %s"
|
||||
, GsonUtil.jsonFromObject(parameters)
|
||||
+ " ,startSiteName=" + mCurrentOCHOrder.startSiteAddr
|
||||
+ " ,endSiteName=" + mCurrentOCHOrder.endSiteAddr);
|
||||
return parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将业务订单信息保存,鹰眼可取用
|
||||
*/
|
||||
public void updateAutopilotControlParameters() {
|
||||
|
||||
TaxiPassengerAnalyticsManager.getInstance().triggerStartAutopilotEvent(false, false,
|
||||
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.orderNo);
|
||||
AutopilotControlParameters parameters = initAutopilotControlParameters();
|
||||
if (null == parameters){
|
||||
CallerLogger.INSTANCE.e(M_TAXI_P + TAG, "AutopilotControlParameters is empty.");
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "AutopilotControlParameters is update.");
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.updateAutopilotControlParameters(parameters);
|
||||
}
|
||||
|
||||
public void clearAutopilotControlParameters(){
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "AutopilotControlParameters is clear.");
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.updateAutopilotControlParameters(null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -92,27 +92,26 @@ public class TaxiPassengerServingOrderPresenter extends Presenter<TaxiPassengerS
|
||||
public void onCurrentOrderStatusChanged(TaxiPassengerOrderQueryRespBean.Result order) {
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, GsonUtil.jsonFromObject(order));
|
||||
|
||||
if (mCurrentPassengerOrder == null){
|
||||
mCurrentPassengerOrder = order; //当前无订单
|
||||
if (mCurrentPassengerOrder == null || mCurrentPassengerOrder.orderStatus != order.orderStatus){
|
||||
if (TaxiPassengerOrderStatusEnum.OnTheWayToEnd.getCode() == order.orderStatus){
|
||||
TaxiPassengerModel.getInstance().startOrStopQueryOrderRemaining(true);
|
||||
TaxiPassengerModel.getInstance().queryOrderRouteList();
|
||||
if (mCurrentPassengerOrder == null){
|
||||
TaxiPassengerModel.getInstance().queryOrderRouteList();
|
||||
}
|
||||
TaxiPassengerModel.getInstance().updateAutopilotControlParameters();
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "OnTheWayToEnd");
|
||||
}
|
||||
|
||||
runOnUIThread(() ->mView.updateOrderStatusView(order));
|
||||
}else if (mCurrentPassengerOrder.orderStatus != order.orderStatus) {
|
||||
runOnUIThread(() ->mView.updateOrderStatusView(order));
|
||||
|
||||
if (TaxiPassengerOrderStatusEnum.OnTheWayToEnd.getCode() == order.orderStatus){
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "-----OnTheWayToEndStation----");
|
||||
TaxiPassengerModel.getInstance().startOrStopQueryOrderRemaining(true);
|
||||
}
|
||||
|
||||
if (TaxiPassengerOrderStatusEnum.Cancel.getCode() == mCurrentPassengerOrder.orderStatus
|
||||
|| TaxiPassengerOrderStatusEnum.ArriveAtEnd.getCode() == mCurrentPassengerOrder.orderStatus){
|
||||
if (TaxiPassengerOrderStatusEnum.Cancel.getCode() == order.orderStatus
|
||||
|| TaxiPassengerOrderStatusEnum.ArriveAtEnd.getCode() == order.orderStatus
|
||||
|| TaxiPassengerOrderStatusEnum.JourneyCompleted.getCode() == order.orderStatus){
|
||||
TaxiPassengerModel.getInstance().startOrStopQueryOrderRemaining(false);
|
||||
TaxiPassengerModel.getInstance().clearAutopilotControlParameters();
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "Cancel or ArriveAtEnd or JourneyCompleted");
|
||||
}
|
||||
mCurrentPassengerOrder = order;
|
||||
|
||||
mCurrentPassengerOrder = order; //当前无订单
|
||||
runOnUIThread(() ->mView.updateOrderStatusView(order));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mogo.och.taxi.passenger.ui.leftmenu
|
||||
import android.annotation.SuppressLint
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
|
||||
class ItemViewTouchListener :
|
||||
View.OnTouchListener {
|
||||
@@ -10,25 +12,34 @@ class ItemViewTouchListener :
|
||||
private var dragTime = 0L
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun onTouch(view: View, motionEvent: MotionEvent): Boolean {
|
||||
when (motionEvent.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action)
|
||||
dragTime = System.currentTimeMillis()
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
if (LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action)) {
|
||||
return false
|
||||
try {
|
||||
when (motionEvent.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action)
|
||||
dragTime = System.currentTimeMillis()
|
||||
}
|
||||
}
|
||||
MotionEvent.ACTION_UP -> {
|
||||
LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action)
|
||||
if (System.currentTimeMillis() - dragTime > 500) {
|
||||
dragTime = 0
|
||||
return true
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
if (LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
MotionEvent.ACTION_UP -> {
|
||||
LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action)
|
||||
if (System.currentTimeMillis() - dragTime > 500) {
|
||||
dragTime = 0
|
||||
return true
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
else -> {}
|
||||
} catch (e: Exception) {
|
||||
CallerLogger.e(SceneConstant.M_TAXI_P + TAG, e.message)
|
||||
e.printStackTrace()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "ItemViewTouchListener"
|
||||
}
|
||||
}
|
||||
@@ -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,12 +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内成功则发送成功埋点,否则发送失败埋点
|
||||
@@ -65,13 +109,14 @@ public class TaxiPassengerAnalyticsManager {
|
||||
mStartAutopilotParams.put(TaxiPassengerConst.EVENT_PARAM_ORDER_NUMBER, orderNo);
|
||||
|
||||
if (send) {
|
||||
if (mStartAutopilotParams.isEmpty()) return;
|
||||
// 开启成功,取消失败定时任务
|
||||
if (startAutopilotRunnable != null &&
|
||||
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
|
||||
UiThreadHandler.removeCallbacks(startAutopilotRunnable);
|
||||
}
|
||||
clearStartAutopilotFailureMSG();
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ class TaxiConst {
|
||||
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
|
||||
|
||||
@@ -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);
|
||||
@@ -1030,8 +1030,8 @@ public class TaxiModel {
|
||||
|
||||
private final OchAdasStartFailureCallback mAdasStartFailureListener = new OchAdasStartFailureCallback() {
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NonNull String startFailedMessage) {
|
||||
TaxiAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedMessage);
|
||||
public void onStartAutopilotFailure(@NotNull String startFailedCode, @NonNull String startFailedMessage) {
|
||||
TaxiAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage);
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode){
|
||||
CallerLogger.INSTANCE.e(M_TAXI + TAG, "mAdasStartFailureListener = "+startFailedMessage);
|
||||
mADASStatusCallback.onStartAdasFailure();
|
||||
|
||||
@@ -9,10 +9,13 @@ import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Display;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.GridView;
|
||||
@@ -109,11 +112,22 @@ public class TaxiOrderCancelDialog extends AlertDialog implements View.OnClickLi
|
||||
setCancelable(false);
|
||||
setCanceledOnTouchOutside(false);
|
||||
|
||||
initWindowView();
|
||||
}
|
||||
|
||||
private void initWindowView() {
|
||||
Window window = getWindow();
|
||||
//dialog padding 去掉
|
||||
window.getDecorView().setPadding(0,0,0,0);
|
||||
window.setDimAmount(0.5f);
|
||||
window.getDecorView().setBackgroundColor(Color.parseColor("#00FFFFFF"));//设置背景, 不然显示不全
|
||||
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
window.setGravity(Gravity.CENTER);
|
||||
WindowManager m = window.getWindowManager();
|
||||
Display d = m.getDefaultDisplay();
|
||||
params.height = d.getHeight() - 500;
|
||||
window.setAttributes(params);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
|
||||
@@ -6,7 +6,9 @@ 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;
|
||||
@@ -36,12 +38,12 @@ public class TaxiAnalyticsManager {
|
||||
|
||||
private Runnable startAutopilotRunnable = () -> {
|
||||
// 15s内未开启,上报失败埋点
|
||||
triggerStartAutopilotFailureEvent("15s后app等待超时");
|
||||
triggerStartAutopilotFailureEvent("", "15s后app等待超时");
|
||||
};
|
||||
|
||||
public void triggerStartAutopilotFailureEventByAdas(String failMsg){
|
||||
public void triggerStartAutopilotFailureEventByAdas(String failCode, String failMsg){
|
||||
removeWaitingCallback();
|
||||
triggerStartAutopilotFailureEvent(failMsg);
|
||||
triggerStartAutopilotFailureEvent(failCode, failMsg);
|
||||
}
|
||||
|
||||
private void removeWaitingCallback() {
|
||||
@@ -51,12 +53,31 @@ public class TaxiAnalyticsManager {
|
||||
}
|
||||
}
|
||||
|
||||
private void triggerStartAutopilotFailureEvent(String failMsg){
|
||||
private void triggerStartAutopilotFailureEvent(String failCode, String failMsg){
|
||||
if (mStartAutopilotParams.isEmpty()) return;
|
||||
|
||||
CallerLogger.INSTANCE.e(M_TAXI + "triggerStartAutopilotFailureEvent", failMsg);
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_RESULT, false);
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_MSG,
|
||||
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);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
|
||||
clearStartAutopilotParams();//清空参数数据,防止误传
|
||||
}
|
||||
|
||||
private void clearStartAutopilotParams(){
|
||||
mStartAutopilotParams.clear();
|
||||
}
|
||||
|
||||
public void clearStartAutopilotFailureMSG(){
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_CODE, "");
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_MSG, "");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,10 +107,14 @@ public class TaxiAnalyticsManager {
|
||||
// CallerLogger.INSTANCE.d(M_TAXI + "埋点==","restart = "+restart+", send= "+send);
|
||||
|
||||
if (send) {
|
||||
if (mStartAutopilotParams.isEmpty()) return;
|
||||
// 开启成功,上报埋点
|
||||
clearStartAutopilotFailureMSG();
|
||||
removeWaitingCallback();
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_RESULT, true);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
|
||||
clearStartAutopilotParams();//清空参数数据,防止误传
|
||||
} else {
|
||||
UiThreadHandler.postDelayed(startAutopilotRunnable, TaxiConst.LOOP_PERIOD_15S);
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
android:lineSpacingExtra="10dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_46"
|
||||
android:layout_marginRight="@dimen/dp_60"
|
||||
app:layout_constraintRight_toLeftOf="@+id/module_och_taxi_navi_end_iv"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_och_taxi_order_station_title_2"
|
||||
|
||||
@@ -55,6 +55,10 @@ if (!isAndroidTestBuild()) {
|
||||
leak_canary_crash_fix {
|
||||
enable !isReleaseBuild
|
||||
}
|
||||
|
||||
anr_fix {
|
||||
enable true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,6 +205,8 @@ android {
|
||||
buildConfigField 'String', 'WORKING_BRANCH_NAME', getWorkingBranchName()
|
||||
buildConfigField 'String', 'WORKING_BRANCH_HASH', getWorkingBranchHash()
|
||||
buildConfigField 'String', 'APP_BUILD_TIME', getBuildTime()
|
||||
buildConfigField 'String', 'MAP_SDK_VERSION', "\"${MAP_SDK_VERSION}\""
|
||||
buildConfigField 'String', 'MAP_SDK_OPT_VERSION', "\"${MAP_SDK_OPERATION_VERSION}\""
|
||||
}
|
||||
// 配置网络环境,QA、线上、演示
|
||||
qa {
|
||||
@@ -253,8 +259,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
|
||||
|
||||
|
||||
71
app/src/main/java/com/mogo/launcher/lancet/ANRFix.kt
Normal file
71
app/src/main/java/com/mogo/launcher/lancet/ANRFix.kt
Normal file
@@ -0,0 +1,71 @@
|
||||
package com.mogo.launcher.lancet
|
||||
|
||||
import androidx.annotation.*
|
||||
import com.knightboost.lancet.api.*
|
||||
import com.knightboost.lancet.api.annotations.*
|
||||
import com.knightboost.lancet.api.annotations.Weaver
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import kotlinx.coroutines.Runnable
|
||||
|
||||
@Keep
|
||||
@Weaver
|
||||
@Group("anr_fix")
|
||||
class ANRFix {
|
||||
|
||||
@Insert
|
||||
@TargetClass("com.zhidao.cosupload.service.UploadService")
|
||||
@TargetMethod(methodName = "addUploadPaths")
|
||||
private fun fixAddUploadPathsANR() {
|
||||
ThreadUtils.getIoPool().execute(ANRFixTask(This.get(), "addUploadPaths"))
|
||||
}
|
||||
|
||||
@Insert
|
||||
@TargetClass("com.zhidao.cosupload.service.UploadService")
|
||||
@TargetMethod(methodName = "upload")
|
||||
private fun fixUploadANR(@ClassOf("com.zhidao.cosupload.model.CacheUploadIdData") data: Any?) {
|
||||
ThreadUtils.getIoPool().execute(ANRFixTask2(This.get(), "upload", data))
|
||||
}
|
||||
|
||||
@Insert
|
||||
@TargetClass("com.zhidao.cosupload.manager.CosUploadManagerImpl")
|
||||
@TargetMethod(methodName = "upload")
|
||||
private fun fixCosUploadManagerImplANR(productLine: String?, paths: List<String>?, eventId: String?, @ClassOf("com.zhidao.cosupload.DbPriorityConfig") config: Any?) {
|
||||
ThreadUtils.getIoPool().execute(ANRFixTask3(This.get(), "upload", productLine, paths, eventId, config))
|
||||
}
|
||||
}
|
||||
|
||||
class ANRFixTask(private val delegate: Any, private val methodName: String): Runnable {
|
||||
|
||||
override fun run() {
|
||||
delegate.javaClass.declaredMethods.find {
|
||||
it.name != methodName && it.name.contains(methodName)
|
||||
}?.also {
|
||||
it.isAccessible = true
|
||||
it.invoke(delegate)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ANRFixTask2(private val delegate: Any, private val methodName: String, private val p: Any?): Runnable {
|
||||
|
||||
override fun run() {
|
||||
delegate.javaClass.declaredMethods.find {
|
||||
it.name != methodName && it.name.contains(methodName)
|
||||
}?.also {
|
||||
it.isAccessible = true
|
||||
it.invoke(delegate, p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ANRFixTask3(private val delegate: Any, private val methodName: String,private val productLine: String?, private val paths: List<String>?, private val eventId: String?, private val config: Any?): Runnable {
|
||||
|
||||
override fun run() {
|
||||
delegate.javaClass.declaredMethods.find {
|
||||
it.name != methodName && it.name.contains(methodName)
|
||||
}?.also {
|
||||
it.isAccessible = true
|
||||
it.invoke(delegate, productLine, paths, eventId, config)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,8 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
|
||||
DebugConfig.setCarMachineType(BuildConfig.CAR_MACHINE_TYPE)
|
||||
DebugConfig.setProductFlavor(BuildConfig.FLAVOR_product)
|
||||
DebugConfig.setSocketAppId(BuildConfig.SOCKET_APP_ID)
|
||||
DebugConfig.setMapVersion(BuildConfig.MAP_SDK_VERSION)
|
||||
DebugConfig.setMapOptVersion(BuildConfig.MAP_SDK_OPT_VERSION)
|
||||
DebugConfig.setNeedUploadCoordinatesInTime(BuildConfig.IS_NEED_UPLOAD_COORDINATES_IN_TIME)
|
||||
}
|
||||
|
||||
@@ -80,8 +82,8 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
|
||||
} else if (DebugConfig.getProductFlavor() == "fPadLenovoOchBus" || DebugConfig.getProductFlavor() == "fPadLenovoOchBusPassenger"
|
||||
|| DebugConfig.getProductFlavor() == "fPadLenovoOchSweeper") {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
HmiBuildConfig.isShowBrakeLightView = false
|
||||
HmiBuildConfig.isShowTurnLightView = false
|
||||
// HmiBuildConfig.isShowBrakeLightView = false
|
||||
// HmiBuildConfig.isShowTurnLightView = false
|
||||
}
|
||||
|
||||
if (DebugConfig.getProductFlavor() == "fPadLenovoOchTaxiPassenger") {
|
||||
|
||||
@@ -134,7 +134,7 @@ public class CrashHandler implements UncaughtExceptionHandler {
|
||||
// 获取设备参数信息
|
||||
getDeviceInfo(mContext);
|
||||
// mLogInfo.put("versionName", String.valueOf(BuildConfig.VERSION_CODE));
|
||||
// mLogInfo.put("versionCode", BuildConfig.VERSION_NAME);
|
||||
// mLogInfo.put("versionCode", BuildConfig.`VERSION_NAME`);
|
||||
// 保存日志文件
|
||||
String result = saveCrashLogToFile(paramThrowable);
|
||||
mDefaultHandler.uncaughtException(paramThread, paramThrowable);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.mogo.eagle.core.function.bindingcar;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.eagle.core.function.api.bindingcar.BindingcarCallBack;
|
||||
import com.mogo.eagle.core.function.bindingcar.network.BindingcarNetWorkManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since: 10/27/21
|
||||
*/
|
||||
public class BindingcarManager {
|
||||
private String TAG = "BindingcarManager";
|
||||
private static BindingcarManager mBindingcarManager;
|
||||
private Context mContext;
|
||||
|
||||
public static synchronized BindingcarManager getInstance() {
|
||||
synchronized (BindingcarManager.class) {
|
||||
if (mBindingcarManager == null) {
|
||||
mBindingcarManager = new BindingcarManager();
|
||||
}
|
||||
}
|
||||
return mBindingcarManager;
|
||||
}
|
||||
|
||||
protected void getBindingcarInfo() {
|
||||
}
|
||||
|
||||
protected void modifyCarInfo(BindingcarCallBack callBack) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
@@ -12,9 +13,11 @@ import com.mogo.eagle.core.function.api.bindingcar.IMoGoBindingcarProvider;
|
||||
import com.mogo.eagle.core.function.appupgrade.network.UpgradeAppNetWorkManager;
|
||||
import com.mogo.eagle.core.function.bindingcar.network.BindingcarNetWorkManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager;
|
||||
import com.mogo.eagle.core.function.ipcupgrade.IPCUpgradeManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public interface BindingcarApiService {
|
||||
* @return {@link ModifyBindingcarInfo}
|
||||
*/
|
||||
@Headers("Content-Type:application/json;charset=UTF-8")
|
||||
@POST("eagleEye-mis/cmdbapi/pad/updatePadByMac")
|
||||
@POST("eagleEye-mis/cmdbapi/pad/v2/updatePadByMac")
|
||||
Observable<ModifyBindingcarInfo> modifyBindingcarInfo(/*@Header("access_token") String access_token,*/ @Body RequestBody requestBody);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.eagle.core.function.bindingcar.network;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BINDING;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -7,8 +9,11 @@ import com.mogo.commons.constants.HostConst;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingcarInfo;
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.bindingcar.BindingcarCallBack;
|
||||
import com.mogo.eagle.core.function.bindingcar.R;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerHDMapManager;
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -57,9 +62,8 @@ public class BindingcarNetWorkManager {
|
||||
* @param macAddress mac地址
|
||||
*/
|
||||
public void getBindingcarInfo(Context context, String macAddress, String widevineIDWithMd5, int screenType) {
|
||||
// String macAddress1 = "48:b0:2d:3a:bc:78";
|
||||
// String macAddress1 = "48:b0:2d:4d:b9:63";
|
||||
// String sn = "X20202203105S688HZ";
|
||||
// String macAddress1 = "48:b0:2d:4d:33:40";
|
||||
// String sn = "X2020220417KA94QIN";
|
||||
|
||||
BindingcarRequest request = new BindingcarRequest(macAddress, widevineIDWithMd5, screenType);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request));
|
||||
@@ -74,36 +78,27 @@ public class BindingcarNetWorkManager {
|
||||
@Override
|
||||
public void onNext(@NonNull BindingcarInfo info) {
|
||||
if (info != null && info.getData() != null) {
|
||||
CallerLogger.INSTANCE.d(TAG, "getBindingcarInfo onNext info.getData() =" + info.getData().toString());
|
||||
Log.d(TAG, "getBindingcarInfo onNext info.getData() =" + info.getData().toString());
|
||||
if (info.getData().getCompare().equals("0")) {
|
||||
CallerHmiManager.INSTANCE.showBindingcarDialog();
|
||||
} else if (info.getData().getCompare().equals("3")) {
|
||||
CallerHmiManager.INSTANCE.showModifyBindingcarDialog();
|
||||
} else if (info.getData().getCompare().equals("null")) {
|
||||
TipToast.shortTip("当前工控机没有入库");
|
||||
}
|
||||
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG, "getBindingcarInfo onNext info.getData() =" + info.getData().toString());
|
||||
//根据车辆类型切换不同的车辆模型,只针对红旗做处理
|
||||
// if (info.getData().getVendor().equals("一汽红旗")) { //TODO
|
||||
// CallerHDMapManager.INSTANCE.changeCurrentIcon(R.raw.hq_h9);
|
||||
// }
|
||||
|
||||
// else if (info.getData().getVendor().equals("东风汽车集团")) {
|
||||
// CallerHDMapManager.INSTANCE.changeCurrentIcon(R.raw.chuzuche);
|
||||
// } else if (info.getData().getVendor().equals("金旅星辰")) {
|
||||
// CallerHDMapManager.INSTANCE.changeCurrentIcon(R.raw.xiaobache);
|
||||
// } else {
|
||||
// CallerHDMapManager.INSTANCE.changeCurrentIcon(R.raw.chuzuche);
|
||||
// }
|
||||
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
switch (info.getData().getCompare()) {
|
||||
case "0":
|
||||
CallerHmiManager.INSTANCE.showBindingcarDialog();
|
||||
break;
|
||||
case "3":
|
||||
CallerHmiManager.INSTANCE.showModifyBindingcarDialog();
|
||||
break;
|
||||
case "null":
|
||||
TipToast.shortTip("当前工控机没有入库");
|
||||
break;
|
||||
}
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, GsonUtils.toJson(info.getData()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
CallerLogger.INSTANCE.e(TAG, "getBindingcarInfo onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
CallerLogger.INSTANCE.e(M_BINDING + TAG, "getBindingcarInfo onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -118,6 +113,8 @@ public class BindingcarNetWorkManager {
|
||||
* mac: 48:b0:2d:3a:9c:19
|
||||
*/
|
||||
public void modifyBindingcar(String macAddress, String widevineIDWithMd5, BindingcarCallBack callBack, int screenType) {
|
||||
// String macAddress1 = "48:b0:2d:4d:33:40";
|
||||
// String sn = "X2020220417KA94QIN";
|
||||
BindingcarRequest request = new BindingcarRequest(macAddress, widevineIDWithMd5, screenType);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request));
|
||||
mBindingcarApiService.modifyBindingcarInfo(requestBody)
|
||||
@@ -132,14 +129,14 @@ public class BindingcarNetWorkManager {
|
||||
public void onNext(@NonNull ModifyBindingcarInfo info) {
|
||||
if (info != null) {
|
||||
callBack.callBackResult(info);
|
||||
Log.d(TAG, "modifyBindingcar onNext code = " + info.code + "---msg = " + info.msg + "--info.toString() = " + info.toString());
|
||||
CallerLogger.INSTANCE.d(TAG, "modifyBindingcar onNext code = " + info.code + "---msg = " + info.msg + "--info.toString() = " + info.toString());
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG, "modifyBindingcar onNext code = " + info.code + "---msg = " + info.msg + "--info.toString() = " + info.toString());
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
CallerLogger.INSTANCE.e(TAG, "modifyBindingcar onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
CallerLogger.INSTANCE.e(M_BINDING + TAG, "modifyBindingcar onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -149,4 +146,30 @@ public class BindingcarNetWorkManager {
|
||||
|
||||
}
|
||||
|
||||
private void updateCarVrIconRes(String brandId){
|
||||
if(brandId == null || brandId.isEmpty()){
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG,"updateCarVrIconRes : " + brandId);
|
||||
switch (brandId){
|
||||
case "1":
|
||||
CallerHDMapManager.INSTANCE.changeCurrentIcon(R.raw.chuzuche);
|
||||
HdMapBuildConfig.currentCarVrIconRes =R.raw.chuzuche;
|
||||
break;
|
||||
case "2":
|
||||
CallerHDMapManager.INSTANCE.changeCurrentIcon(R.raw.hq_h9);
|
||||
HdMapBuildConfig.currentCarVrIconRes =R.raw.hq_h9;
|
||||
break;
|
||||
case "3":
|
||||
CallerHDMapManager.INSTANCE.changeCurrentIcon(R.raw.xiaobache);
|
||||
HdMapBuildConfig.currentCarVrIconRes =R.raw.xiaobache;
|
||||
break;
|
||||
default:
|
||||
CallerHDMapManager.INSTANCE.changeCurrentIcon(R.raw.chuzuche);
|
||||
HdMapBuildConfig.currentCarVrIconRes =R.raw.chuzuche;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,5 +5,7 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
</manifest>
|
||||
@@ -15,6 +15,7 @@ import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigCenter.Companion.bizConfigCenter
|
||||
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigImpl
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
|
||||
import com.zhjt.mogo_core_function_devatools.mofang.MoFangManager
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.MonitorManager
|
||||
import com.zhjt.mogo_core_function_devatools.scene.SceneManager.Companion.sceneManager
|
||||
import com.zhjt.mogo_core_function_devatools.status.*
|
||||
@@ -42,6 +43,7 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
bizConfigCenter.init(mContext!!)
|
||||
FuncConfigImpl.init()
|
||||
MogoLogCatchManager.init(mContext!!)
|
||||
MoFangManager.INSTANCE.init(mContext!!)
|
||||
}
|
||||
|
||||
override fun startLogCatch() {
|
||||
|
||||
@@ -186,6 +186,7 @@ internal object BadCaseManager : LifecycleEventObserver {
|
||||
|
||||
override fun onFinish() {
|
||||
passiveBadCaseWindow.hideFloatWindow()
|
||||
BadCaseConfig.windowNum--
|
||||
}
|
||||
}
|
||||
countDownTimer.start()
|
||||
|
||||
@@ -174,26 +174,28 @@ internal class BadCaseConfigView @JvmOverloads constructor(
|
||||
override fun onAutopilotRecordConfig(config: MessagePad.RecordDataConfig) {
|
||||
super.onAutopilotRecordConfig(config)
|
||||
ThreadUtils.runOnUiThread {
|
||||
if(BadCaseConfig.dockerVersion!!.contains("2.3.0")
|
||||
|| BadCaseConfig.dockerVersion!!.contains("2.4.0")
|
||||
|| BadCaseConfig.dockerVersion!!.contains("2.5.0")
|
||||
|| BadCaseConfig.dockerVersion!!.contains("2.6.0")
|
||||
|| BadCaseConfig.dockerVersion!!.contains("2.8.0")){
|
||||
rvTemplate.visibility = View.GONE
|
||||
}else{
|
||||
config.recordTypesList.iterator().forEach {
|
||||
if (it.id != 99){
|
||||
val topicList = ArrayList<TopicEntity>()
|
||||
it.topicsList.iterator().forEach {
|
||||
topicList.add(TopicEntity(it,true,false))
|
||||
if(BadCaseConfig.dockerVersion!=null){
|
||||
if(BadCaseConfig.dockerVersion!!.contains("2.3.0")
|
||||
|| BadCaseConfig.dockerVersion!!.contains("2.4.0")
|
||||
|| BadCaseConfig.dockerVersion!!.contains("2.5.0")
|
||||
|| BadCaseConfig.dockerVersion!!.contains("2.6.0")
|
||||
|| BadCaseConfig.dockerVersion!!.contains("2.8.0")){
|
||||
rvTemplate.visibility = View.GONE
|
||||
}else{
|
||||
config.recordTypesList.iterator().forEach {
|
||||
if (it.id != 99){
|
||||
val topicList = ArrayList<TopicEntity>()
|
||||
it.topicsList.iterator().forEach {
|
||||
topicList.add(TopicEntity(it,true,false))
|
||||
}
|
||||
recordTypesList.add(RecordTypeEntity(it.id,it.desc,topicList))
|
||||
}
|
||||
recordTypesList.add(RecordTypeEntity(it.id,it.desc,topicList))
|
||||
}
|
||||
}
|
||||
if(recordTypesList.size>1){
|
||||
rvTemplate.visibility = View.VISIBLE
|
||||
recordTemplateAdapter?.setData(recordTypesList)
|
||||
recordTemplateAdapter?.notifyDataSetChanged()
|
||||
if(recordTypesList.size>1){
|
||||
rvTemplate.visibility = View.VISIBLE
|
||||
recordTemplateAdapter?.setData(recordTypesList)
|
||||
recordTemplateAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@ import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -62,6 +60,10 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.dialog_case_topic_list);
|
||||
WindowManager.LayoutParams params = getWindow().getAttributes();
|
||||
params.height = 959;
|
||||
params.width = 1270;
|
||||
getWindow().setAttributes(params);//向WindowManager设置属性
|
||||
setCanceledOnTouchOutside(false);
|
||||
CallerAutopilotRecordListenerManager.INSTANCE.addListener(TAG, this);
|
||||
init();
|
||||
@@ -185,13 +187,11 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
|
||||
@Override
|
||||
public void onAutopilotRecordConfig(MessagePad.RecordDataConfig config) {
|
||||
ThreadUtils.runOnUiThread(() -> {
|
||||
Log.i("houyanli","AllTopicsCount="+config.getAllTopicsCount());
|
||||
if(config.getAllTopicsCount()>0){
|
||||
for(int index=0;index<config.getAllTopicsCount();index++){
|
||||
if(!recordType.getTopicsList().contains(config.getAllTopics(index))){
|
||||
allTopicList.add(new TopicEntity(config.getAllTopics(index),false,true));
|
||||
}
|
||||
Log.i("houyanli","topic="+config.getAllTopics(index));
|
||||
}
|
||||
recordType.getTopicsList().addAll(allTopicList);
|
||||
topicListAdapter.setData(recordType.getTopicsList());
|
||||
|
||||
@@ -37,6 +37,7 @@ import kotlinx.coroutines.launch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import com.zhidao.loglib.upload.UploadManager
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import java.io.File
|
||||
import java.lang.reflect.Field
|
||||
|
||||
@@ -139,6 +140,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
}
|
||||
//删除记录
|
||||
CallerMsgBoxManager.removeRecordInfo(mActivity, boxBean!!, recordKey!!)
|
||||
EventBus.getDefault().post(boxBean)
|
||||
}
|
||||
|
||||
tvPassiveCancel.setOnClickListener {
|
||||
@@ -146,6 +148,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
clickListener?.closeWindow()
|
||||
//删除记录
|
||||
CallerMsgBoxManager.removeRecordInfo(mActivity, boxBean!!, recordKey!!)
|
||||
EventBus.getDefault().post(boxBean)
|
||||
}
|
||||
|
||||
mWindowParams = WindowManager.LayoutParams()
|
||||
@@ -335,8 +338,6 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
}
|
||||
|
||||
override fun onCheckedChanged(buttonView: CompoundButton?, isChecked: Boolean) {
|
||||
Log.i("onCheckedChanged","buttonView"+buttonView)
|
||||
Log.i("onCheckedChanged","isChecked"+isChecked)
|
||||
buttonView?.text?.let {
|
||||
if(isChecked){
|
||||
if(!uploadReason.contains(it)){
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.zhjt.mogo_core_function_devatools.mofang
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.bluetooth.BluetoothAdapter
|
||||
import android.bluetooth.BluetoothDevice
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import com.mogo.eagle.core.data.mofang.MfConstants
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.updateMfStatusView
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_F
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
|
||||
|
||||
/**
|
||||
* 魔方连接状态和设备管理
|
||||
*/
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
class MoFangManager private constructor() {
|
||||
|
||||
companion object {
|
||||
val INSTANCE: MoFangManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
MoFangManager()
|
||||
}
|
||||
}
|
||||
|
||||
private var mContext: Context? = null
|
||||
private val TAG = "MoFangManager"
|
||||
private lateinit var mBluetoothAdapter: BluetoothAdapter
|
||||
private var isMfConnect: Boolean = false //添加状态判断
|
||||
|
||||
|
||||
fun init(context: Context) {
|
||||
mContext = context
|
||||
initBluetooth(context)
|
||||
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter()
|
||||
if (!mBluetoothAdapter.isEnabled) {
|
||||
mBluetoothAdapter.enable()
|
||||
}
|
||||
mBluetoothAdapter.startDiscovery()
|
||||
showBondedDevice(mBluetoothAdapter)
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化蓝牙广播
|
||||
*/
|
||||
private fun initBluetooth(context: Context) {
|
||||
val intentFilter = IntentFilter();
|
||||
// 监视蓝牙关闭和打开的状态
|
||||
intentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED)
|
||||
// 监视蓝牙设备与APP连接的状态
|
||||
intentFilter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED)
|
||||
intentFilter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED)
|
||||
// 注册广播
|
||||
context.registerReceiver(bluetoothMonitorReceiver, intentFilter)
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找蓝牙连接过的蓝牙设备
|
||||
*/
|
||||
private fun showBondedDevice(bluetoothAdapter: BluetoothAdapter) {
|
||||
if (bluetoothAdapter != null) {
|
||||
val deviceList = bluetoothAdapter.bondedDevices
|
||||
for (device in deviceList) {
|
||||
try {
|
||||
//使用反射调用获取设备连接状态方
|
||||
val isConnectedMethod = BluetoothDevice::class.java.getDeclaredMethod("isConnected")
|
||||
isConnectedMethod.isAccessible = true
|
||||
val isConnected = isConnectedMethod.invoke(device) as Boolean
|
||||
CallerLogger.d("$M_F${TAG}"," showBondedDevice name = ${device.name} ---address = ${device.address}----isMfConnect = $isMfConnect ---isConnected = $isConnected")
|
||||
if (device.name == "MINI_KEYBOARD") { //并且连接
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putString(MfConstants.BLUETOOTH_NAME, device.name) }
|
||||
}
|
||||
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean(MfConstants.BLUETOOTH_STATUS, isConnected) }
|
||||
if (isConnected) {
|
||||
isMfConnect = true
|
||||
}
|
||||
} catch (e: NoSuchMethodException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private val bluetoothMonitorReceiver: BroadcastReceiver = object : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
when (intent.action) {
|
||||
BluetoothAdapter.ACTION_STATE_CHANGED -> { //中间状态 TODO
|
||||
CallerLogger.d("$M_F${TAG}","bluetoothMonitorReceiver ACTION_STATE_CHANGED action = ${intent.action}")
|
||||
}
|
||||
|
||||
BluetoothDevice.ACTION_ACL_CONNECTED -> { //蓝牙设备已连接
|
||||
if (!isMfConnect) {
|
||||
// showBondedDevice(mBluetoothAdapter)
|
||||
updateMfStatusView(TAG, true)
|
||||
isMfConnect = true
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean(MfConstants.BLUETOOTH_STATUS, true) }
|
||||
}
|
||||
CallerLogger.d("$M_F${TAG}","bluetoothMonitorReceiver ACTION_ACL_CONNECTED ----- isMfConnect = $isMfConnect")
|
||||
}
|
||||
|
||||
BluetoothDevice.ACTION_ACL_DISCONNECTED -> { //蓝牙设备已断开 主动更新
|
||||
CallerLogger.d("$M_F${TAG}","bluetoothMonitorReceiver ACTION_ACL_DISCONNECTED ----- isMfConnect = $isMfConnect ")
|
||||
if (isMfConnect) {
|
||||
updateMfStatusView(TAG, false)
|
||||
isMfConnect = false
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean(MfConstants.BLUETOOTH_STATUS, false) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ 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.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.map.MogoMap
|
||||
import com.zhjt.mogo_core_function_devatools.trace.network.StartUpTraceNetWorkModel
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants
|
||||
@@ -35,9 +34,8 @@ object SyncConfig {
|
||||
AppConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
|
||||
}
|
||||
AppConfigInfo.netMode = DebugConfig.getNetMode()
|
||||
if (MogoMap.getInstance().mogoMap != null) {
|
||||
AppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion
|
||||
}
|
||||
AppConfigInfo.mapSdkVersion = DebugConfig.getMapVersion()
|
||||
AppConfigInfo.mapSdkOptVersion = DebugConfig.getMapOptVersion()
|
||||
AppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
|
||||
AppConfigInfo.isConnectSocket = MogoStatusManager.getInstance().isSocketOnLine
|
||||
when {
|
||||
@@ -69,7 +67,7 @@ object SyncConfig {
|
||||
startUpTraceModel.report(traceId, {
|
||||
traceId = it
|
||||
}, {
|
||||
CallerLogger.e("$M_DEVA${"SyncConfig"}","error : $it")
|
||||
CallerLogger.e("$M_DEVA${"SyncConfig"}", "error : $it")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="1270dp"
|
||||
android:layout_height="959dp"
|
||||
android:layout_width="1270px"
|
||||
android:layout_height="959px"
|
||||
>
|
||||
|
||||
<TextView
|
||||
@@ -11,17 +11,17 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="56dp"
|
||||
android:textSize="56px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginTop="50px"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewVerticalLine"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="160dp"
|
||||
android:layout_width="2px"
|
||||
android:layout_height="160px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -31,7 +31,7 @@
|
||||
<View
|
||||
android:id="@+id/viewHorizontalLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_height="2px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -48,7 +48,7 @@
|
||||
app:layout_constraintRight_toLeftOf="@id/viewVerticalLine"
|
||||
android:text="保存"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52dp"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
@@ -62,18 +62,18 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:text="取消"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52dp"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clSearchLayout"
|
||||
android:layout_width="1030dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_width="1030px"
|
||||
android:layout_height="96px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCaseName"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginTop="50px"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:background="@drawable/bad_case_search_bg"
|
||||
@@ -81,13 +81,13 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSearch"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_width="38px"
|
||||
android:layout_height="42px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:src="@drawable/icon_bad_case_search"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginEnd="40px"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
@@ -99,11 +99,11 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/ivSearch"
|
||||
android:hint="topic搜索"
|
||||
android:textSize="38dp"
|
||||
android:textSize="38px"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textColorHint="#B3FFFFFF"
|
||||
android:background="@null"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginStart="40px"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -116,7 +116,7 @@
|
||||
app:layout_constraintRight_toRightOf="@id/clSearchLayout"
|
||||
app:layout_constraintTop_toBottomOf="@id/clSearchLayout"
|
||||
app:layout_constraintBottom_toTopOf="@id/viewHorizontalLine"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginTop="50px"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:scrollbars="vertical"
|
||||
android:fadeScrollbars="false"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.receiver
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -77,6 +78,9 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
|
||||
if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) {
|
||||
CallerHmiManager.showLimitingVelocity(1)
|
||||
}
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-V2XWarningBR", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.os.Build.VERSION_CODES
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.transition.*
|
||||
import android.util.*
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@@ -20,6 +21,7 @@ import androidx.core.view.*
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.commons.context.ContextHolderUtil
|
||||
import com.mogo.commons.mvp.BaseFragment
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.voice.*
|
||||
@@ -59,11 +61,10 @@ import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.call.check.CallerCheckManager
|
||||
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.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Turning
|
||||
import com.mogo.eagle.core.function.call.monitor.CallerMonitorManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
||||
@@ -72,7 +73,6 @@ import com.mogo.eagle.core.function.hmi.ui.bindingcar.ToBindingCarDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.bindingcar.UpgradeAppDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView
|
||||
import com.mogo.eagle.core.function.hmi.ui.camera.RoadVideoDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeCheckDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeTrafficDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
|
||||
@@ -89,6 +89,7 @@ import com.mogo.eagle.core.function.main.utils.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
|
||||
@@ -97,8 +98,8 @@ import com.mogo.eagle.core.utilcode.reminder.api.*
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.IReminder.IStateChangeListener
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.impl.*
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.millis2String
|
||||
import com.mogo.map.MogoMap
|
||||
import com.zhidao.support.adas.high.common.MogoReport.Code.Error.EMAP.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
@@ -237,7 +238,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
if (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().autopilotControlParameters == null) {
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
context?.let {
|
||||
CallerHmiManager.updateStatusBarRightView(
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(it)
|
||||
@@ -455,10 +456,18 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
statusBarView?.updateRightView(insert, tag, viewGroup)
|
||||
}
|
||||
|
||||
override fun updateStatusBarLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
statusBarView?.updateLeftView(insert, tag, viewGroup)
|
||||
}
|
||||
|
||||
override fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
|
||||
statusBarView?.updateProgressView(insert, tag, progress)
|
||||
}
|
||||
|
||||
override fun updateMfStatus(tag: String, status: Boolean) {
|
||||
statusBarView?.updateMfStatus(tag, status)
|
||||
}
|
||||
|
||||
override fun updateDriverMsgBoxTipView(show: Boolean) {
|
||||
if(show){
|
||||
MsgBoxTipView.visibility = View.VISIBLE
|
||||
@@ -1363,32 +1372,49 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
private var isRightLight: Boolean = false
|
||||
private var isDisappare: Boolean = false
|
||||
|
||||
@Volatile
|
||||
private var isVisualAngleChanged = false
|
||||
|
||||
/**
|
||||
* 显示转向灯效果 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) {
|
||||
if (light == 1 || light == 2) {
|
||||
if (!isVisualAngleChanged) {
|
||||
isVisualAngleChanged = true
|
||||
CallerVisualAngleManager.changeVisualAngle(Turning(true))
|
||||
}
|
||||
} else {
|
||||
if (isVisualAngleChanged) {
|
||||
isVisualAngleChanged = false
|
||||
CallerVisualAngleManager.changeVisualAngle(Turning(false))
|
||||
}
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
@@ -1411,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)
|
||||
}
|
||||
}
|
||||
@@ -1455,11 +1483,13 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
content: String,
|
||||
installType: String
|
||||
) {
|
||||
if (upgradeAppDialog == null) {
|
||||
upgradeAppDialog = context?.let { UpgradeAppDialog(it) }
|
||||
if (ContextHolderUtil.getContext() != null) {
|
||||
if (upgradeAppDialog == null) {
|
||||
upgradeAppDialog = UpgradeAppDialog(ContextHolderUtil.getContext())
|
||||
}
|
||||
upgradeAppDialog!!.setCanceledOnTouchOutside(false)
|
||||
upgradeAppDialog!!.showUpgradeAppDialog(name, url, title, content, installType)
|
||||
}
|
||||
upgradeAppDialog!!.setCanceledOnTouchOutside(false)
|
||||
upgradeAppDialog!!.showUpgradeAppDialog(name, url, title, content, installType)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,18 +3,13 @@ package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.marginTop
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.data.msgbox.OperationMsg
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
@@ -57,7 +52,7 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
driverMsgBoxBubbleAdapter?.setChangeListener(object : DriverMsgBoxBubbleAdapter.ChangeViewListener{
|
||||
override fun notifyView() {
|
||||
if(dataList.isEmpty()){
|
||||
rvBubbleList.visibility = View.GONE
|
||||
clMsgBubbleLayout.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +88,7 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
}else{
|
||||
rvBubbleList.visibility = View.VISIBLE
|
||||
clMsgBubbleLayout.visibility = View.VISIBLE
|
||||
dataList.add(msgBoxBean)
|
||||
driverMsgBoxBubbleAdapter?.setData(dataList)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -11,7 +10,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.data.msgbox.OperationMsg
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
@@ -19,9 +17,11 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxListAdapter
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.*
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -177,6 +177,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
}
|
||||
MsgCategory.RECORD_BAG -> {
|
||||
badCaseList?.add(0,msgBoxList)
|
||||
badCaseList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,6 +187,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
EventBus.getDefault().register(this)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,8 +195,15 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun notifyList(msgBoxList: MsgBoxBean){
|
||||
badCaseList?.let {
|
||||
driverMsgBoxListAdapter?.notifyItemRemoved(it.indexOf(msgBoxList))
|
||||
it.remove(msgBoxList)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
@@ -53,10 +54,10 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_report,parent,false)
|
||||
return BubbleReportHolder(view)
|
||||
}else if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_notice,parent,false)
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_v2x,parent,false)
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
@@ -81,7 +82,8 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
}
|
||||
}else if(holder is BubbleNoticeHolder){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
val msgBoxBean = it[position].bean
|
||||
val noticeFrCloudMsg = msgBoxBean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
@@ -118,10 +120,17 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
}
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
val v2XMsg = it[position].bean as V2XMsg
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
@@ -12,8 +10,8 @@ import android.widget.TextView
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
@@ -24,7 +22,6 @@ import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTran
|
||||
import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
import com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -79,7 +76,6 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
holder.tvBagReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBagRecordTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val msgBoxBean = it[position]
|
||||
// val recordBagMsg = (it[position].bean as RecordBagMsg)
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,activity,false)
|
||||
@@ -214,10 +210,17 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
}else if(holder is MsgBoxV2X){
|
||||
data?.let {
|
||||
val v2XMsg = it[position].bean as V2XMsg
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.NoticeFrCloudMsg
|
||||
@@ -91,11 +92,17 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
}
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
val v2XMsg = it[position].bean as V2XMsg
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
}
|
||||
val msgBoxBean: MsgBoxBean = data!![position]
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.NoticeFrCloudMsg
|
||||
@@ -83,11 +84,17 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
}
|
||||
}else if(holder is ListV2XHolder){
|
||||
data?.let {
|
||||
val v2XMsg = it[position].bean as V2XMsg
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,19 +73,16 @@ 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.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.*
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.v2x.vip.VipCarManager
|
||||
import com.zhidao.easysocket.utils.L
|
||||
import com.zhidao.support.adas.high.other.permission.BackgrounderPermission
|
||||
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
|
||||
@@ -585,15 +582,15 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
|
||||
// 演示模式
|
||||
tbIsDemoMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerHmiManager.updateStatusBarRightView(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
|
||||
}
|
||||
@@ -1145,7 +1142,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
* 限速数据,优先使用obu,默认打开
|
||||
*/
|
||||
tbRoadLimitSpeed.setOnCheckedChangeListener { _, isChecked ->
|
||||
HmiBuildConfig.isShowObuLimitSpeedView = !isChecked
|
||||
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1691,8 +1688,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
tvIpcVersionInfo.text = "MAP:${mAutoPilotStatusInfo?.dockVersion}"
|
||||
tvIpcVersionInfoKey.text = "MAP:${mAutoPilotStatusInfo?.dockVersion}"
|
||||
tvMoGoMapVersion.text = "HD-Map版本:${MogoMap.getInstance().mogoMap.mapVersion}"
|
||||
tvMoGoMapVersionKey.text = "HD-Map版本:${MogoMap.getInstance().mogoMap.mapVersion}"
|
||||
tvMoGoMapVersion.text = "HD-Map版本:${DebugConfig.getMapVersion()}"
|
||||
tvMoGoMapVersionKey.text = "HD-Map版本:${DebugConfig.getMapVersion()}"
|
||||
tvGitBranchInfo.text = "Git分支:${AppConfigInfo.workingBranchName}"
|
||||
tvAppBuildTimeInfo.text = "版本构建时间:${AppConfigInfo.appBuildTime}"
|
||||
|
||||
@@ -1835,6 +1832,13 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
mUnknownIdentifyDataSize = 0
|
||||
mTrajectoryInfoSize = 0
|
||||
mRouteInfoSize = 0
|
||||
|
||||
if(FunctionBuildConfig.isDemoMode){
|
||||
tbIsDemoMode.text = "关闭美化模式"
|
||||
}else{
|
||||
tbIsDemoMode.text = "开启美化模式"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -19,8 +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设置窗口
|
||||
@@ -71,6 +75,61 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* obu弱势交通控制
|
||||
*/
|
||||
tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) { //默认开启
|
||||
CallerHmiManager.setObuWeaknessTraffic(true)
|
||||
} else {
|
||||
CallerHmiManager.setObuWeaknessTraffic(false)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 云端弱势交通控制
|
||||
*/
|
||||
tbCloudWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) { //默认关闭
|
||||
CallerHmiManager.setCloudWeaknessTraffic(true)
|
||||
} else {
|
||||
CallerHmiManager.setCloudWeaknessTraffic(false)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 限速数据来源开关
|
||||
*/
|
||||
tbRoadLimitSpeedSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
//默认关闭
|
||||
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* obu V2V开关
|
||||
*/
|
||||
tbObuV2vView.setOnCheckedChangeListener { _, isChecked ->
|
||||
//默认关闭
|
||||
HmiBuildConfig.isShowObuV2vView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* obu V2i开关
|
||||
*/
|
||||
tbObuV2iView.setOnCheckedChangeListener { _, isChecked ->
|
||||
//默认关闭
|
||||
HmiBuildConfig.isShowObuV2iView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* obu 数据通过dc 传输V2i事件 开关 TODO pm确定下开关功能 HmiBuildConfig.isShowObuToDcV2iView
|
||||
*/
|
||||
tbObuToDcView.setOnCheckedChangeListener { _, isChecked ->
|
||||
//默认开启
|
||||
HmiBuildConfig.isShowObuToDcV2iView = !isChecked
|
||||
// Log.d("liyz", "HmiBuildConfig.isShowObuToDcV2iView = " + HmiBuildConfig.isShowObuToDcV2iView)
|
||||
}
|
||||
|
||||
//红绿灯标识
|
||||
tbTrafficLight.isChecked = HmiBuildConfig.isShowTrafficLightView
|
||||
tbTrafficLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
@@ -96,14 +155,14 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
// 演示模式,上一次勾选的数据
|
||||
tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
// 演示模式
|
||||
tbDemoMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerHmiManager.updateStatusBarRightView(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)) {
|
||||
@@ -189,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) {
|
||||
|
||||
@@ -2,12 +2,15 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.*
|
||||
import android.widget.*
|
||||
import com.mogo.eagle.core.data.mofang.MfConstants
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.devatools.*
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ScreenUtils
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.*
|
||||
@@ -29,6 +32,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private val rightViewList = CopyOnWriteArrayList<String>()
|
||||
private val leftViewList = CopyOnWriteArrayList<String>()
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
@@ -39,6 +43,11 @@ class StatusBarView @JvmOverloads constructor(
|
||||
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
|
||||
var isBluetoothConnect = SharedPrefsMgr.getInstance(context).getBoolean(MfConstants.BLUETOOTH_STATUS, false)
|
||||
if (isBluetoothConnect) {
|
||||
updateMfStatus("MoFangManager", true)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
@@ -70,6 +79,20 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
if (insert) {
|
||||
leftViewList.add(0, tag)
|
||||
viewStatusBarLeft.addView(viewGroup, 0)
|
||||
} else {
|
||||
leftViewList.forEachIndexed { index, s ->
|
||||
if (s == tag) {
|
||||
leftViewList.removeAt(index)
|
||||
viewStatusBarLeft.removeViewAt(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun updateProgressView(insert: Boolean, tag: String, progress: Int) {
|
||||
if (insert) {
|
||||
viewProgressTv.visibility = VISIBLE
|
||||
@@ -81,9 +104,9 @@ class StatusBarView @JvmOverloads constructor(
|
||||
|
||||
fun updateMfStatus(tag: String, status: Boolean) {
|
||||
if (status) {
|
||||
// viewMofangStatus.setImageResource(R.drawable.icon_car_red)
|
||||
viewMofangStatus.setImageResource(R.drawable.icon_bluetooth_p)
|
||||
} else {
|
||||
// viewMofangStatus.setImageResource(R.drawable.icon_car_red)
|
||||
viewMofangStatus.setImageResource(R.drawable.blue_tooth)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,9 @@ package com.mogo.eagle.core.function.main;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_START_UP;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_INIT;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_F;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Process;
|
||||
@@ -17,17 +15,19 @@ import android.view.KeyEvent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.module.intent.IMogoIntentListener;
|
||||
import com.mogo.commons.module.intent.IntentManager;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.mofang.MfConstants;
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
|
||||
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.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.main.moujie.BluetoothMonitorReceiver;
|
||||
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;
|
||||
@@ -40,9 +40,7 @@ import com.zhjt.service.chain.TracingConstants;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
@@ -63,8 +61,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
private Timer timerHorn;
|
||||
private Timer timerAcc;
|
||||
|
||||
private BluetoothMonitorReceiver mBluetoothReceiver = null;
|
||||
private BluetoothAdapter mBluetoothAdapter;
|
||||
private boolean isShowToast = false; //toast 控制
|
||||
private long startPressTime = 0; //开始按减时间
|
||||
private boolean isPressEnd = false; //按键是否结束
|
||||
@@ -91,14 +87,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
initBluetooth();
|
||||
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
|
||||
if (!mBluetoothAdapter.isEnabled()) {
|
||||
mBluetoothAdapter.enable();
|
||||
}
|
||||
mBluetoothAdapter.startDiscovery();
|
||||
showBondedDevice(mBluetoothAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -126,7 +114,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
mIsHomeKeyDown = false;
|
||||
unregisterReceiver(this.mBluetoothReceiver);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -217,22 +204,22 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
*/
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
// Log.d(TAG, "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
|
||||
String bluetoothName = SharedPrefsMgr.getInstance(getContext()).getString("BLUETOOTH");
|
||||
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) {
|
||||
Log.e(TAG, "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();
|
||||
Log.d(TAG, "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressADownTime - startPressTime) > 320 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 A 按AB组合 -2 ");
|
||||
}
|
||||
@@ -250,8 +237,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressAUpTime = System.currentTimeMillis();
|
||||
Log.e(TAG, "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressAUpTime - startPressTime) < 300 && isCombinationKey != 3) {
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressAUpTime - startPressTime) < 350 && isCombinationKey != 3) {
|
||||
isCombinationKey = 1;
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击A -1 ");
|
||||
@@ -267,13 +254,12 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (event.getKeyCode() == KeyEvent.KEYCODE_B) {//单击复原,长按+1,AB组合-2
|
||||
} else if (event.getKeyCode() == KeyEvent.KEYCODE_B) { //单击复原,长按+1,AB组合-2
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressBDownTime = System.currentTimeMillis();
|
||||
Log.d(TAG, "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBDownTime - startPressTime) > 320 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 B 按AB组合 ");
|
||||
}
|
||||
@@ -291,8 +277,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressBUpTime = System.currentTimeMillis();
|
||||
Log.e(TAG, "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBUpTime - startPressTime) < 300 && isCombinationKey != 3) {
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBUpTime - startPressTime) < 350 && isCombinationKey != 3) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击B 0 ");
|
||||
}
|
||||
@@ -309,11 +295,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
return true;
|
||||
} 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) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按C 无操作 ");
|
||||
@@ -322,7 +308,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 ← 向左变道 time dif = " + (pressCUpTime - startPressTime));
|
||||
if ((pressCUpTime - startPressTime) < 350) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击C ← 向左变道 ");
|
||||
}
|
||||
@@ -333,6 +320,7 @@ 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) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按D 无操作 ");
|
||||
@@ -341,18 +329,19 @@ 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 → 向右变道 ");
|
||||
}
|
||||
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} 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 鸣笛 ");
|
||||
@@ -372,24 +361,22 @@ 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 开启自动驾驶 ");
|
||||
}
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return super.dispatchKeyEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSkinModeChange(int skinMode) {
|
||||
|
||||
}
|
||||
|
||||
private synchronized void sendAcc(boolean isSend, double acc) {
|
||||
@@ -413,42 +400,4 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化蓝牙广播
|
||||
*/
|
||||
private void initBluetooth() {
|
||||
this.mBluetoothReceiver = new BluetoothMonitorReceiver();
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
// 监视蓝牙关闭和打开的状态
|
||||
intentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
|
||||
|
||||
// 监视蓝牙设备与APP连接的状态
|
||||
intentFilter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
|
||||
intentFilter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
|
||||
|
||||
// 注册广播
|
||||
registerReceiver(this.mBluetoothReceiver, intentFilter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找蓝牙连接过的蓝牙设备
|
||||
*/
|
||||
private void showBondedDevice(BluetoothAdapter bluetoothAdapter) {
|
||||
Set<BluetoothDevice> deviceList = bluetoothAdapter.getBondedDevices();
|
||||
for (BluetoothDevice device : deviceList) {
|
||||
try {
|
||||
//使用反射调用获取设备连接状态方法
|
||||
Method isConnectedMethod = BluetoothDevice.class.getDeclaredMethod("isConnected", (Class[]) null);
|
||||
isConnectedMethod.setAccessible(true);
|
||||
// boolean isConnected = (boolean) isConnectedMethod.invoke(device, (Object[]) null);
|
||||
Log.d(TAG, "-- device.getName() = " + device.getName()); //device.getAddress()
|
||||
if (device.getName().equals("MINI_KEYBOARD")) {
|
||||
SharedPrefsMgr.getInstance(getContext()).putString("BLUETOOTH", device.getName());
|
||||
}
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ import com.zhjt.mogo_core_function_devatools.monitor.db.CpuInfo;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MemInfo;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@@ -101,15 +102,25 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
new Thread(() -> {
|
||||
String lastLaunchTimeStr = SPUtils.getInstance().getString("last_launch", "");
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date currDate = new Date(System.currentTimeMillis());
|
||||
String currTimeStr = format.format(currDate);
|
||||
if (lastLaunchTimeStr != null && !lastLaunchTimeStr.isEmpty()) {
|
||||
Date currDate = new Date(System.currentTimeMillis());
|
||||
String currTimeStr = format.format(currDate);
|
||||
boolean isSameDay = currTimeStr.equals(lastLaunchTimeStr);
|
||||
// 超过一天需要清除消息盒子中的数据,并把时间戳存入SP
|
||||
if (!isSameDay) {
|
||||
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
File file = this.getDatabasePath(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
if (file != null && file.exists()) {
|
||||
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
}
|
||||
SPUtils.getInstance().put("last_launch", currTimeStr);
|
||||
}
|
||||
} else {
|
||||
// 首次使用App或中途仅删除sp文件
|
||||
File file = this.getDatabasePath(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
if (file != null && file.exists()) {
|
||||
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
}
|
||||
SPUtils.getInstance().put("last_launch", currTimeStr);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 153 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 143 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -4,13 +4,13 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1A2344"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="5px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:clickable="true"
|
||||
>
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivBadCaseImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBadCaseImage"
|
||||
android:layout_marginBottom="5px"
|
||||
android:layout_marginStart="25px"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="30px"
|
||||
@@ -68,12 +67,10 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvBagRecordTime"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvBagRecordTime"
|
||||
android:paddingEnd="25px"
|
||||
android:paddingTop="10px"
|
||||
android:paddingBottom="10px"
|
||||
android:paddingStart="20px"
|
||||
android:text="查看"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="30px"
|
||||
/>
|
||||
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -3,13 +3,13 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1A2344"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="5px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
@@ -30,8 +30,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivReportImageNormal"
|
||||
android:layout_marginTop="20px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginStart="23px"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
/>
|
||||
@@ -45,6 +45,7 @@
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:layout_marginTop="5px"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -56,12 +57,13 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="10px"
|
||||
android:layout_marginBottom="25px"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:gravity="start"
|
||||
android:textSize="28px"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -94,6 +96,7 @@
|
||||
android:layout_marginEnd="20px"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
@@ -116,7 +119,7 @@
|
||||
app:layout_constraintLeft_toRightOf="@id/ivReportImageOpen"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginStart="10px"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -126,9 +129,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivReportImageOpen"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivReportImageOpen"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginTop="10px"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -138,9 +142,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportTimeOpen"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportTimeOpen"
|
||||
android:layout_marginTop="5px"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -152,9 +156,9 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportTypeOpen"
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
android:gravity="start"
|
||||
android:layout_marginTop="5px"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -166,10 +170,10 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportReasonOpen"
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="10px"
|
||||
android:layout_marginBottom="15px"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1A2344"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="5px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1A2344"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="5px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
@@ -35,7 +35,7 @@
|
||||
android:text="运营平台"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="23px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -51,6 +51,8 @@
|
||||
android:textSize="28px"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:paddingBottom="15px"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -107,7 +109,7 @@
|
||||
android:text="运营平台"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginStart="10px"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -122,6 +124,7 @@
|
||||
android:gravity="start"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginBottom="15px"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:visibility="gone"
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1A2344"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="5px">
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivV2XImage"
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:clickable="true"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNoticeImage"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="130px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15px"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNoticeTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
app:layout_constraintTop_toTopOf="@id/ivNoticeImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivNoticeImage"
|
||||
android:layout_marginStart="15px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNoticeTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNoticeCheck"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginBottom="20px"
|
||||
android:text="查看"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="30px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNoticeContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvNoticeCheck"
|
||||
app:layout_constraintTop_toTopOf="@id/tvNoticeCheck"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvNoticeCheck"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -3,13 +3,11 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1A2344"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="5px">
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBubbleOperationImage"
|
||||
@@ -27,8 +25,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvBubbleOperationContent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBubbleOperationImage"
|
||||
android:layout_marginTop="20px"
|
||||
android:layout_marginStart="25px"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
@@ -54,12 +52,13 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvBubbleOperationTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvBubbleOperationTime"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBubbleOperationTitle"
|
||||
android:layout_marginTop="10px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:gravity="start"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -3,13 +3,11 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1A2344"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="5px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
@@ -29,7 +27,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBubbleReportImage"
|
||||
android:layout_marginTop="20px"
|
||||
android:layout_marginTop="15px"
|
||||
android:layout_marginStart="25px"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
@@ -49,13 +47,17 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBubbleReportType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBubbleReportTime"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvBubbleReportTime"
|
||||
android:layout_marginTop="5px"
|
||||
app:layout_constraintRight_toRightOf="@id/tvBubbleReceiveTime"
|
||||
android:layout_marginTop="6px"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivV2XImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25px"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV2XTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV2XContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivV2XImage"
|
||||
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,18 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#2E3868"
|
||||
app:roundLayoutRadius="40px">
|
||||
android:background="@drawable/bg_msg_box_bubble"
|
||||
android:id="@+id/clMsgBubbleLayout"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvBubbleList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="15px"
|
||||
android:paddingBottom="15px"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1082,8 +1082,8 @@
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:textOff="关闭路侧限速"
|
||||
android:textOn="获取路侧限速"
|
||||
android:textOff="获取路侧限速提醒"
|
||||
android:textOn="关闭路侧限速提醒"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
</GridLayout>
|
||||
|
||||
@@ -129,6 +129,66 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tbRainMode"
|
||||
/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbObuV2vView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="展示v2v事件"
|
||||
android:textOn="不展示v2v事件"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbObu"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbObuV2iView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="展示v2i事件"
|
||||
android:textOn="不展示v2i事件"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbObuV2vView"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
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" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbCloudWeaknessTrafficSop"
|
||||
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/tbObuWeaknessTrafficSop"
|
||||
android:textOff="开启云端弱势群体预警"
|
||||
android:textOn="关闭云端弱势群体预警"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbIPCReport"
|
||||
android:layout_width="match_parent"
|
||||
@@ -140,15 +200,27 @@
|
||||
android:textOff="开启异常上报提示"
|
||||
android:textOn="关闭异常上报提示"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbObu"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbCloudWeaknessTrafficSop"
|
||||
/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbRoadLimitSpeedSop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="获取路侧限速提醒"
|
||||
android:textOn="关闭路侧限速提醒"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIPCReport"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSpeedThresholdTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIPCReport"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbRoadLimitSpeedSop"
|
||||
android:text="变道速度阈值:"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textColor="#1A1A1A"
|
||||
|
||||
@@ -40,8 +40,17 @@
|
||||
android:id="@+id/viewMofangStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/blue_tooth"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_27" />
|
||||
android:layout_marginStart="@dimen/dp_8" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/viewStatusBarLeft"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="end|center"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="@dimen/dp_8"/>
|
||||
|
||||
<!--app下载进度-->
|
||||
<TextView
|
||||
@@ -51,7 +60,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/app_download_bg"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:gravity="center"
|
||||
android:drawableLeft="@drawable/icon_download_guide"
|
||||
android:textColor="@color/background_debug"
|
||||
|
||||
@@ -20,21 +20,17 @@ import mogo.telematics.pad.MessagePad;
|
||||
public class TrackObj {
|
||||
|
||||
private final CircleQueue circleQueue = new CircleQueue(6);
|
||||
// private final KalmanFilter kalmanFilter; //卡尔曼结果
|
||||
private S2CellId s2CellId; //s2 id权重
|
||||
private S2LatLng s2LatLng; //s2 经纬度
|
||||
private double recentlyTime; //用于缓存帧数判断,暂定缓存1秒数据,中间如果有物体未出现,1秒后删除
|
||||
private double roadAngle; //道路航向
|
||||
// private double headingDelta; //航向角德尔塔
|
||||
private int[] typeArray = new int[3];
|
||||
private int typeWeight; //类型权重
|
||||
private double lat;
|
||||
private double lon;
|
||||
private double speedAverage;
|
||||
// private CenterLine centerLineInfo = null;
|
||||
|
||||
public TrackObj(MessagePad.TrackedObject data) {
|
||||
// kalmanFilter = new KalmanFilter(data.getLongitude(), data.getLatitude(), 0.0000005);
|
||||
circleQueue.addQueue(new ObjQueue(data.getHeading(), data.getSpeed(), data.getLatitude(), data.getLongitude(), data.getType()));
|
||||
recentlyTime = data.getSatelliteTime();
|
||||
lat = data.getLatitude();
|
||||
@@ -61,15 +57,13 @@ public class TrackObj {
|
||||
private void correct() {
|
||||
calAverageSpeedAndType();
|
||||
calLoc();
|
||||
calHeading();
|
||||
// calHeading();
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void calAverageSpeedAndType() {
|
||||
if (circleQueue.size() >= 3) {
|
||||
List<ObjQueue> objQueueList = circleQueue.getLastThreeFrame();
|
||||
// 计算平均速度
|
||||
// speedAverage = (objQueueList.get(0).getSpeed() + objQueueList.get(1).getSpeed() + objQueueList.get(2).getSpeed()) / 3;
|
||||
// 使用中值滤波
|
||||
objQueueList.sort(Comparator.comparing(ObjQueue::getSpeed));
|
||||
speedAverage = objQueueList.get(1).getSpeed();
|
||||
@@ -101,38 +95,13 @@ public class TrackObj {
|
||||
private void calLoc() {
|
||||
//距离计算,位置修正
|
||||
if (relativeStatic()) {
|
||||
// double angle = roadAngle != 0 ? roadAngle : cacheData.getHeading();
|
||||
// if (centerLineInfo == null && isFourWheelType()) {
|
||||
// try {
|
||||
// centerLineInfo = CallerHDMapManager.INSTANCE.getCenterLineInfo(lon, lat, (float) angle);
|
||||
// } catch (Exception e) {
|
||||
// Log.d("hy uuid : " + cacheData.getUuid(), "道路获取异常");
|
||||
// }
|
||||
// if (centerLineInfo != null && centerLineInfo.getPoints() != null && !centerLineInfo.getPoints().isEmpty()) {
|
||||
// double[] matchedPoint = PointInterpolatorUtil.mergeToRoad(cacheData.getLongitude(), cacheData.getLatitude(), centerLineInfo.getPoints());
|
||||
// if (matchedPoint[0] > 0 || matchedPoint[1] > 0) {
|
||||
// lon = matchedPoint[0];
|
||||
// lat = matchedPoint[1];
|
||||
// s2LatLng = S2LatLng.fromDegrees(cacheData.getLatitude(), cacheData.getLongitude());
|
||||
// s2CellId = S2CellId.fromLatLng(s2LatLng).parent(22);
|
||||
// } else {
|
||||
// centerLineInfo = null;
|
||||
// }
|
||||
// } else {
|
||||
// centerLineInfo = null;
|
||||
// }
|
||||
// }
|
||||
cacheData = cacheData.toBuilder().setLongitude(lon).setLatitude(lat).build();
|
||||
} else {
|
||||
// centerLineInfo = null;
|
||||
//不在阈值内则更新,代表物体移动,使用卡尔曼滤波经纬度数据
|
||||
//double[] lonLat = kalmanFilter.filter(cacheData.getLongitude(), cacheData.getLatitude());
|
||||
lat = cacheData.getLatitude();
|
||||
lon = cacheData.getLongitude();
|
||||
s2LatLng = S2LatLng.fromDegrees(cacheData.getLatitude(), cacheData.getLongitude());
|
||||
s2CellId = S2CellId.fromLatLng(s2LatLng).parent(22);
|
||||
// Log.d("hy uuid : " + cacheData.getUuid(), " 开始移动 lon : " + lon + " , lat : " + lat);
|
||||
// cacheData = cacheData.toBuilder().setLongitude(lonLat[0]).setLatitude(lonLat[1]).build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +144,6 @@ public class TrackObj {
|
||||
|
||||
public boolean relativeStatic() {
|
||||
if (speedAverage < LIMIT_SPEED) {
|
||||
// Log.d("emArrow-Track", "relativeStatic return" + " , uuid : " + cacheData.getUuid());
|
||||
return true;
|
||||
} else {
|
||||
return isInRange();
|
||||
@@ -192,7 +160,6 @@ public class TrackObj {
|
||||
return false;
|
||||
}
|
||||
double dis = CoordinateUtils.calculateLineDistance(center[0], center[1], cacheData.getLongitude(), cacheData.getLatitude());
|
||||
// Log.d("emArrow-Track", "uuid : " + cacheData.getUuid() + " , type : " + cacheData.getType() + " , list size : " + objQueueList.size() + " , dis : " + dis);
|
||||
if (cacheData.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_BUS.getType() || cacheData.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_TRUCK.getType()) {
|
||||
return dis <= 0.6;
|
||||
} else {
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.map.MogoGeoSearch;
|
||||
import com.mogo.map.MogoLocationClient;
|
||||
import com.mogo.map.MogoMap;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.MogoOverlayManager;
|
||||
@@ -79,15 +78,6 @@ public class MogoMapService implements IMogoMapService {
|
||||
return new MogoTrafficSearch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapVersion() {
|
||||
if (MogoMap.getInstance().getMogoMap() != null) {
|
||||
return MogoMap.getInstance().getMogoMap().getMapVersion();
|
||||
} else {
|
||||
return "0";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
CallerVisualAngleManager.INSTANCE.init(context);
|
||||
|
||||
@@ -101,7 +101,6 @@ object TrafficMarkerDrawer {
|
||||
fun updateITrafficThreatLevelInfo(trafficData: TrafficData) {
|
||||
CallerLogger.d(TAG,
|
||||
"trafficData.type = " + trafficData.type + "---trafficData.threatLevel = " + trafficData.threatLevel + "----FunctionBuildConfig.debugTrackerProvider = " + FunctionBuildConfig.debugTrackerProvider)
|
||||
// Log.e("liyz", "trafficData.type = " + trafficData.type + "---trafficData.threatLevel = " + trafficData.threatLevel + "----FunctionBuildConfig.debugTrackerProvider = " + FunctionBuildConfig.debugTrackerProvider)
|
||||
if (FunctionBuildConfig.debugTrackerProvider != 1) {
|
||||
return
|
||||
}
|
||||
@@ -169,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
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.overview.vm
|
||||
import androidx.lifecycle.*
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.eagle.core.data.map.Infrastructure
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
|
||||
import com.mogo.eagle.core.function.overview.OverviewDao
|
||||
import com.mogo.eagle.core.function.overview.remote.OverViewServiceApi
|
||||
import com.mogo.eagle.core.function.overview.remote.V2XEvent
|
||||
@@ -74,23 +75,29 @@ class OverViewModel(
|
||||
}
|
||||
}
|
||||
|
||||
fun getAllV2XEventsByLineId(lineId: String, sn: String) {
|
||||
fun getAllV2XEventsByLineId(sn: String) {
|
||||
if (disposable != null && !disposable!!.isDisposed) {
|
||||
disposable!!.dispose()
|
||||
}
|
||||
|
||||
// 1分钟查询一次
|
||||
disposable = Observable.interval(0, 60000, TimeUnit.MILLISECONDS)
|
||||
disposable = Observable.interval(2000, 60000, TimeUnit.MILLISECONDS)
|
||||
.flatMap {
|
||||
MoGoRetrofitFactory.getInstance(HostConst.getHost())
|
||||
.create(OverViewServiceApi::class.java)
|
||||
.queryAllV2XEventsByLineId(lineId, sn)
|
||||
.map {
|
||||
if (it.code == 200 || it.code == 0) {
|
||||
return@map it.result?.v2XEventList
|
||||
} else {
|
||||
return@map null
|
||||
val lineId = getLineId()
|
||||
if (lineId > 0) {
|
||||
MoGoRetrofitFactory.getInstance(HostConst.getHost())
|
||||
.create(OverViewServiceApi::class.java)
|
||||
.queryAllV2XEventsByLineId(lineId.toString(), sn)
|
||||
.map {
|
||||
if (it.code == 200 || it.code == 0) {
|
||||
return@map it.result?.v2XEventList
|
||||
} else {
|
||||
return@map ArrayList()
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Observable.just(ArrayList())
|
||||
}
|
||||
}
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -106,4 +113,16 @@ class OverViewModel(
|
||||
fun stopQueryV2XEvents() {
|
||||
disposable?.dispose()
|
||||
}
|
||||
|
||||
private fun getLineId(): Long {
|
||||
var lineId: Long = -1
|
||||
val parameter = getAutoPilotStatusInfo()
|
||||
.autopilotControlParameters
|
||||
if (parameter != null) {
|
||||
if (parameter.autoPilotLine != null) {
|
||||
lineId = parameter.autoPilotLine!!.lineId
|
||||
}
|
||||
}
|
||||
return lineId
|
||||
}
|
||||
}
|
||||
@@ -268,9 +268,9 @@ public class AMapCustomView
|
||||
if (center != null) {
|
||||
center.getLon();
|
||||
MarkerOptions markerOption = new MarkerOptions();
|
||||
LatLng latLng = new LatLng(center.getLat(),
|
||||
center.getLon());
|
||||
LatLng latLng = MarkerDrawerManager.INSTANCE.coordinateConverterWgsToGcj(mContext, center.getLat(), center.getLon());
|
||||
markerOption.position(latLng);
|
||||
markerOption.anchor(0.13f, 1f);
|
||||
markerOption.icon(BitmapDescriptorFactory.fromBitmap(getV2XBitmap()));
|
||||
markerOptionsList.add(markerOption);
|
||||
}
|
||||
@@ -282,15 +282,6 @@ public class AMapCustomView
|
||||
|
||||
public void drawV2XMarkers(ArrayList<MarkerOptions> markerOptionsList) {
|
||||
currMarkerList = mAMap.addMarkers(markerOptionsList, false);
|
||||
mAMap.setOnMarkerClickListener(marker -> {
|
||||
List<Infrastructure> infList = posInfMap.get(marker.getPosition());
|
||||
// 如果是摄像头
|
||||
if (infList != null) {
|
||||
CallerHmiManager.INSTANCE.showVideoDialog(infList);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
private Bitmap getV2XBitmap() {
|
||||
|
||||
@@ -161,4 +161,19 @@ object MarkerDrawerManager {
|
||||
mCoordinateConverter.coord(LatLng(mogoLatLng.latitude, mogoLatLng.longitude))
|
||||
return mCoordinateConverter.convert()
|
||||
}
|
||||
|
||||
/**
|
||||
* wgs84转高德坐标系
|
||||
*/
|
||||
fun coordinateConverterWgsToGcj(
|
||||
mContext: Context,
|
||||
lat: Double,
|
||||
lon: Double
|
||||
): LatLng {
|
||||
val mCoordinateConverter =
|
||||
CoordinateConverter(mContext)
|
||||
mCoordinateConverter.from(CoordinateConverter.CoordType.GPS)
|
||||
mCoordinateConverter.coord(LatLng(lat, lon))
|
||||
return mCoordinateConverter.convert()
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.smp;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -21,7 +20,6 @@ import com.mogo.eagle.core.function.map.R;
|
||||
import com.mogo.eagle.core.function.overview.InfStructureManager;
|
||||
import com.mogo.eagle.core.function.overview.ViewModelExtKt;
|
||||
import com.mogo.eagle.core.function.overview.vm.OverViewModel;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -81,9 +79,8 @@ public class OverviewMapFragment extends BaseFragment
|
||||
@Override
|
||||
public void startQueryV2XEvents() {
|
||||
if (isAdded()) {
|
||||
long lineId = getLineId();
|
||||
if (lineId > 0 && mViewModel != null) {
|
||||
mViewModel.getAllV2XEventsByLineId("" + lineId, MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
if (mViewModel != null) {
|
||||
mViewModel.getAllV2XEventsByLineId(MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,11 +127,7 @@ public class OverviewMapFragment extends BaseFragment
|
||||
mViewModel.getV2XEventLiveData().observe(this.getViewLifecycleOwner(), v2XEvents -> {
|
||||
mAMapCustomView.showV2XEventMarkers(v2XEvents);
|
||||
});
|
||||
|
||||
long lineId = getLineId();
|
||||
if (lineId > 0) {
|
||||
mViewModel.getAllV2XEventsByLineId("" + lineId, MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
}
|
||||
mViewModel.getAllV2XEventsByLineId(MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,8 @@ public class MogoObuConst {
|
||||
*/
|
||||
public static final String TAG_MOGO_OBU = "MogoObu";
|
||||
|
||||
public static final String TAG_MOGO_NEW_OBU = "MogoNewObu";
|
||||
|
||||
// OBU 场景测试
|
||||
// 场景类型
|
||||
public static String BROADCAST_OBU_TYPE_EXTRA_KEY = "obuType";
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
@@ -232,195 +233,203 @@ class MogoPrivateObuManager private constructor() {
|
||||
|
||||
// (3) 道路事件预警信息:CVX_RTI_THREAT_IND
|
||||
override fun onCvxRtiThreatIndInfo(info: CvxRtiThreatIndInfo?) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxRtiThreatIndInfo ------> $info"
|
||||
)
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxRtiThreatIndInfo ------> $info"
|
||||
)
|
||||
|
||||
if (info != null && info.threat_info != null && info.ext_info != null) {
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
var appId = info.threat_info.app_id.toString()
|
||||
val status = info.status
|
||||
val level = info.threat_info.threat_level
|
||||
val direction =
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.pos_classification else -1)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxRtiThreatIndInfo direction = $direction -- pos_classification = ${info.ext_info.pos_classification}"
|
||||
)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxRtiThreatIndInfo appId = $appId --status = $status --level = $level -- handleDirection = $direction --rtiType = ${info.ext_info.rti_type} --direction = $direction -- pos_classification = ${info.ext_info.pos_classification} "
|
||||
)
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
EventTypeEnum.TYPE_USECASE_ID_HLW.poiType,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVS.poiType
|
||||
-> {
|
||||
when (info.ext_info.rti_type) {
|
||||
//急转弯
|
||||
0x2 -> {
|
||||
// 特殊处理左、右方向的
|
||||
when (direction) {
|
||||
WarningDirectionEnum.ALERT_WARNING_LEFT,
|
||||
WarningDirectionEnum.ALERT_WARNING_TOP_LEFT,
|
||||
WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType
|
||||
}
|
||||
WarningDirectionEnum.ALERT_WARNING_RIGHT,
|
||||
WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT,
|
||||
WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType
|
||||
if (info != null && info.threat_info != null && info.ext_info != null) {
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
var appId = info.threat_info.app_id.toString()
|
||||
val status = info.status
|
||||
val level = info.threat_info.threat_level
|
||||
val direction =
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.pos_classification else -1)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxRtiThreatIndInfo direction = $direction -- pos_classification = ${info.ext_info.pos_classification}"
|
||||
)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxRtiThreatIndInfo appId = $appId --status = $status --level = $level -- handleDirection = $direction --rtiType = ${info.ext_info.rti_type} --direction = $direction -- pos_classification = ${info.ext_info.pos_classification} "
|
||||
)
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
EventTypeEnum.TYPE_USECASE_ID_HLW.poiType,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVS.poiType
|
||||
-> {
|
||||
when (info.ext_info.rti_type) {
|
||||
//急转弯
|
||||
0x2 -> {
|
||||
// 特殊处理左、右方向的
|
||||
when (direction) {
|
||||
WarningDirectionEnum.ALERT_WARNING_LEFT,
|
||||
WarningDirectionEnum.ALERT_WARNING_TOP_LEFT,
|
||||
WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType
|
||||
}
|
||||
WarningDirectionEnum.ALERT_WARNING_RIGHT,
|
||||
WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT,
|
||||
WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType
|
||||
}
|
||||
}
|
||||
}
|
||||
//施工
|
||||
0x7 -> {
|
||||
appId = EventTypeEnum.FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
//限速
|
||||
0xA -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
//事故
|
||||
0xC -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType
|
||||
}
|
||||
//拥堵
|
||||
0xD -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_TJW.poiType
|
||||
}
|
||||
//行人
|
||||
0xF -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType
|
||||
}
|
||||
//禁止停车
|
||||
0x13 -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
//学校
|
||||
0x14 -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
//桥梁
|
||||
0x17 -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType
|
||||
}
|
||||
//轻轨电车
|
||||
0x18 -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_TRAMCAR.poiType
|
||||
}
|
||||
//人行横道
|
||||
0x19 -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType
|
||||
}
|
||||
//减速慢行
|
||||
0x1A -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType
|
||||
}
|
||||
//事故易发路段
|
||||
0x1B -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType
|
||||
}
|
||||
//环岛行驶
|
||||
0x1C -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType
|
||||
}
|
||||
//环岛行驶
|
||||
0x1D -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType
|
||||
}
|
||||
//驼峰桥
|
||||
0x1E -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType
|
||||
}
|
||||
}
|
||||
//施工
|
||||
0x7 -> {
|
||||
appId = EventTypeEnum.FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
//限速
|
||||
0xA -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
//事故
|
||||
0xC -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType
|
||||
}
|
||||
//拥堵
|
||||
0xD -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_TJW.poiType
|
||||
}
|
||||
//行人
|
||||
0xF -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType
|
||||
}
|
||||
//禁止停车
|
||||
0x13 -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
//学校
|
||||
0x14 -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
//桥梁
|
||||
0x17 -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType
|
||||
}
|
||||
//轻轨电车
|
||||
0x18 -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_TRAMCAR.poiType
|
||||
}
|
||||
//人行横道
|
||||
0x19 -> {
|
||||
appId =
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType
|
||||
}
|
||||
//减速慢行
|
||||
0x1A -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType
|
||||
}
|
||||
//事故易发路段
|
||||
0x1B -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType
|
||||
}
|
||||
//环岛行驶
|
||||
0x1C -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType
|
||||
}
|
||||
//环岛行驶
|
||||
0x1D -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType
|
||||
}
|
||||
//驼峰桥
|
||||
0x1E -> {
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType
|
||||
}
|
||||
alertContent = EventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId)
|
||||
}
|
||||
alertContent = EventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId)
|
||||
}
|
||||
// 前方拥堵提醒
|
||||
EventTypeEnum.TYPE_USECASE_ID_TJW.poiType -> {
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId)
|
||||
if (info.threat_info != null) {
|
||||
// 前方拥堵提醒
|
||||
EventTypeEnum.TYPE_USECASE_ID_TJW.poiType -> {
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId)
|
||||
if (info.threat_info != null) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"ttsContent = $ttsContent --alertContent = $alertContent ---info.threat_info.distance = ${info.threat_info.distance} "
|
||||
)
|
||||
if (info.threat_info.distance.toInt() != 0) {
|
||||
alertContent = String.format(
|
||||
EventTypeEnum.getWarningContent(appId),
|
||||
info.threat_info.distance.toInt()
|
||||
)
|
||||
} else {
|
||||
alertContent = "前方拥堵,减速慢行"
|
||||
}
|
||||
}
|
||||
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"ttsContent = $ttsContent --alertContent = $alertContent ---info.threat_info.distance = ${info.threat_info.distance} "
|
||||
"ttsContent = $ttsContent --alertContent = $alertContent"
|
||||
)
|
||||
if (info.threat_info.distance.toInt() != 0) {
|
||||
alertContent = String.format(
|
||||
EventTypeEnum.getWarningContent(appId),
|
||||
info.threat_info.distance.toInt()
|
||||
}
|
||||
}
|
||||
|
||||
when (status) {
|
||||
// 添加
|
||||
ObuConstants.STATUS.ADD -> {
|
||||
//不显示弹框,其它保留
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "old onCvxRtiThreatIndInfo ------> appId = $appId --- alertContent = $alertContent --- ttsContent = $ttsContent ")
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuManager4", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(appId,
|
||||
alertContent,
|
||||
ttsContent)
|
||||
)
|
||||
} else {
|
||||
alertContent = "前方拥堵,减速慢行"
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
}
|
||||
|
||||
ObuConstants.STATUS.UPDATE -> {
|
||||
//显示警告红边 TODO 需要确定是什么值
|
||||
// CallerHmiManager.showWarning(direction)
|
||||
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.invokeTrackerWarningInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"ttsContent = $ttsContent --alertContent = $alertContent"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
when (status) {
|
||||
// 添加
|
||||
ObuConstants.STATUS.ADD,
|
||||
ObuConstants.STATUS.UPDATE// 更新
|
||||
-> {
|
||||
//显示警告红边 TODO 需要确定是什么值
|
||||
// CallerHmiManager.showWarning(direction)
|
||||
|
||||
//不显示弹框,其它保留
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(appId,
|
||||
alertContent,
|
||||
ttsContent)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.invokeTrackerWarningInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
ObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 移除顶部弹窗
|
||||
// 删除
|
||||
ObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 移除顶部弹窗
|
||||
// CallerHmiManager.disableWarningV2X((appId + direction.direction).toString())
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.removeTrackerWarningInfo(it)
|
||||
// 事件结束,还原车辆颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.removeTrackerWarningInfo(it)
|
||||
// 事件结束,还原车辆颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -439,37 +448,27 @@ class MogoPrivateObuManager private constructor() {
|
||||
&& info.ext_info.lights != null
|
||||
&& info.ext_info.lights.isNotEmpty()
|
||||
) {
|
||||
//v2i数据传输延迟
|
||||
// val hvMillTime = info.threat_info.hv_time.millisecond
|
||||
// val hvSecondMillTime = (info.threat_info.hv_time.second) * 1000
|
||||
// val hvTime = hvMillTime + hvSecondMillTime
|
||||
// val currentTime = TimeUtils.getNowMills() % 60000
|
||||
// val delayTime = currentTime - hvTime
|
||||
|
||||
// CallerObuListenerManager.invokeDelayTime(delayTime)
|
||||
// CallerLogger.e(
|
||||
// "$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
// "onCvxIvpThreatIndInfo red ---delayTime---> $delayTime"
|
||||
// )
|
||||
|
||||
handlerTrafficLight(
|
||||
info.threat_info.app_id,
|
||||
info.status,
|
||||
info.ext_info.lights,
|
||||
info.ext_info.index
|
||||
)
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
handlerTrafficLight(
|
||||
info.threat_info.app_id,
|
||||
info.status,
|
||||
info.ext_info.lights,
|
||||
info.ext_info.index
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// (2) 弱势交通参与者预警信息:CVX_PTC_THREAT_IND
|
||||
override fun onCvxPtcThreatIndInfo(info: CvxPtcThreatIndInfo?) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxPtcInfoIndInfo ------> $info"
|
||||
)
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 0x1:非机动车 NON_MOTOR | 0x2:行人 PEDESTRIAN 0x3:RSU
|
||||
if (info != null && (info.ptc_type == 1 || info.ptc_type == 2)) {
|
||||
//v2i数据传输延迟
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxPtcInfoIndInfo ------> $info"
|
||||
)
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 0x1:非机动车 NON_MOTOR | 0x2:行人 PEDESTRIAN 0x3:RSU
|
||||
if (info != null && (info.ptc_type == 1 || info.ptc_type == 2)) {
|
||||
//v2i数据传输延迟
|
||||
// val hvMillTime = info.threat_info.hv_time.millisecond
|
||||
// val hvSecondMillTime = (info.threat_info.hv_time.second) * 1000
|
||||
// val hvTime = hvMillTime + hvSecondMillTime
|
||||
@@ -482,78 +481,85 @@ class MogoPrivateObuManager private constructor() {
|
||||
// "onCvxPtcInfoIndInfo ---delayTime---> $delayTime"
|
||||
// )
|
||||
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxPtcInfoIndInfo ---status---> ${info.status}"
|
||||
)
|
||||
var v2xType = ""
|
||||
if (info.ptc_type == 1) { //摩托车
|
||||
v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType
|
||||
} else if (info.ptc_type == 2) { //行人
|
||||
v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
}
|
||||
val ttsContent = EventTypeEnum.getWarningTts(v2xType)
|
||||
val alertContent = EventTypeEnum.getWarningContent(v2xType)
|
||||
val direction =
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.target_classification else -1)
|
||||
val level = if (info.threat_info != null) info.threat_info.threat_level else -1
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxPtcInfoIndInfo ---status---> ${info.status}"
|
||||
)
|
||||
var v2xType = ""
|
||||
if (info.ptc_type == 1) { //摩托车
|
||||
v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType
|
||||
} else if (info.ptc_type == 2) { //行人
|
||||
v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
}
|
||||
val ttsContent = EventTypeEnum.getWarningTts(v2xType)
|
||||
val alertContent = EventTypeEnum.getWarningContent(v2xType)
|
||||
val direction =
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.target_classification else -1)
|
||||
val level = if (info.threat_info != null) info.threat_info.threat_level else -1
|
||||
|
||||
when (info.status) {
|
||||
// 添加
|
||||
ObuConstants.STATUS.ADD,
|
||||
ObuConstants.STATUS.UPDATE// 更新
|
||||
-> {
|
||||
// if (level == 2 || level == 3) { //不考虑level
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(v2xType,
|
||||
alertContent,
|
||||
ttsContent)
|
||||
when (info.status) {
|
||||
// 添加
|
||||
ObuConstants.STATUS.ADD -> {
|
||||
// if (level == 2 || level == 3) { //不考虑level
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "old onCvxPtcThreatIndInfo ------> v2xType = $v2xType --- alertContent = $alertContent --- ttsContent = $ttsContent ")
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuManager5", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(v2xType,
|
||||
alertContent,
|
||||
ttsContent)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(v2xType + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(v2xType + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
// }
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.invokeTrackerWarningInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.invokeTrackerWarningInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
ObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.removeTrackerWarningInfo(it)
|
||||
// 事件结束,还原交通参与者颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
|
||||
ObuConstants.STATUS.UPDATE -> {
|
||||
}
|
||||
|
||||
// 删除
|
||||
ObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.removeTrackerWarningInfo(it)
|
||||
// 事件结束,还原交通参与者颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
// CallerHmiManager.disableWarningV2X(ObuConstants.USE_CASE_ID.VRUCW.toString())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// (5) 限速预警信息:CVX_SLW_THREAT_IND
|
||||
@@ -586,30 +592,32 @@ class MogoPrivateObuManager private constructor() {
|
||||
|
||||
// (1) V2V预警信息:CVX_V2V_THREAT_IND
|
||||
override fun onCvxV2vThreatIndInfo(info: CvxV2vThreatIndInfo?) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxV2vThreatIndInfo ------> $info"
|
||||
)
|
||||
info?.let {
|
||||
//预警信息,预警类型 threat_level 2、3
|
||||
info.threat_info?.let {
|
||||
//预警方位
|
||||
val direction =
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.target_classification else -1)
|
||||
//处理预警类型
|
||||
val appId = info.threat_info.app_id
|
||||
val level = info.threat_info.threat_level
|
||||
val status = info.status
|
||||
if (info.ext_info != null) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxV2vThreatIndInfo target_classification = ${
|
||||
getMessageDirection(info.ext_info.target_classification)
|
||||
} --- direction = $direction --- appId = $appId ---level = $level -- status = $status"
|
||||
)
|
||||
}
|
||||
if (HmiBuildConfig.isShowObuV2vView) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxV2vThreatIndInfo ------> $info"
|
||||
)
|
||||
info?.let {
|
||||
//预警信息,预警类型 threat_level 2、3
|
||||
info.threat_info?.let {
|
||||
//预警方位
|
||||
val direction =
|
||||
getMessageDirection(if (info.ext_info != null) info.ext_info.target_classification else -1)
|
||||
//处理预警类型
|
||||
val appId = info.threat_info.app_id
|
||||
val level = info.threat_info.threat_level
|
||||
val status = info.status
|
||||
if (info.ext_info != null) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxV2vThreatIndInfo target_classification = ${
|
||||
getMessageDirection(info.ext_info.target_classification)
|
||||
} --- direction = $direction --- appId = $appId ---level = $level -- status = $status"
|
||||
)
|
||||
}
|
||||
|
||||
handleSdkObu(appId, direction, status, level, info)
|
||||
handleSdkObu(appId, direction, status, level, info)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -721,6 +729,10 @@ class MogoPrivateObuManager private constructor() {
|
||||
0x2 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "old changeTrafficLightStatus ------> appId.toString() = ${appId.toString()} --- alertContent = $alertContent --- ttsContent = $ttsContent ")
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuManager1", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
@@ -794,6 +806,10 @@ class MogoPrivateObuManager private constructor() {
|
||||
|
||||
val maxSpeed = currentLight.glosa_suggested_speed_max.toInt()
|
||||
if (maxSpeed > 0) {
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "old changeTrafficLightStatus ------> TYPE_USECASE_ID_IVP_GREEN --- alertContent = $alertContent --- ttsContent = $ttsContent ")
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuManager2", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
@@ -926,6 +942,12 @@ class MogoPrivateObuManager private constructor() {
|
||||
)
|
||||
if (level == 2 || level == 3) {
|
||||
//不显示顶部弹框,其它保留
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"old handleSdkObu appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
|
||||
)
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuManager3", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig.isShowObuLimitSpeedView
|
||||
@@ -17,7 +18,6 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Defa
|
||||
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.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.obu.mogo.MogoObuConst.TAG_MOGO_OBU
|
||||
import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtilsNew
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
@@ -93,7 +93,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
*/
|
||||
override fun onConnectStatus(connectStatus: Int) {
|
||||
if (connectStatus == 0) { //断开连接
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "onConnectFail ------> ")
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", "onConnectFail ------> ")
|
||||
mObuStatusInfo.obuStatus = false
|
||||
mObuStatusInfo.obuHvStatus = false
|
||||
mObuStatusInfo.obuRvStatus = false
|
||||
@@ -102,7 +102,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_HV", false) }
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_RV", false) }
|
||||
} else if (connectStatus == 1) { //连接成功
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "onConnected ------> ")
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", "onConnected ------> ")
|
||||
mObuStatusInfo.obuStatus = true
|
||||
CallerObuListenerManager.invokeListener(mObuStatusInfo)
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU", true) }
|
||||
@@ -125,7 +125,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
|
||||
if (p0 != null && p0.vehBasicsMsg != null) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuHvBasics lon = ${p0.vehBasicsMsg.longitude} --- lat = ${p0.vehBasicsMsg.latitude} ---speed = ${p0.vehBasicsMsg.speed} ---heading = ${p0.vehBasicsMsg.heading} --acceleration = ${p0.vehBasicsMsg.accFourAxes.accLat} --yawRate = ${p0.vehBasicsMsg.accFourAxes.accYaw}"
|
||||
)
|
||||
val data = JSONObject()
|
||||
@@ -170,46 +170,47 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
*/
|
||||
override fun onMogoObuRvWarning(data: MogoObuRvWarningData) {
|
||||
super.onMogoObuRvWarning(data)
|
||||
mObuStatusInfo.obuRvStatus = true
|
||||
CallerObuListenerManager.invokeListener(mObuStatusInfo)
|
||||
|
||||
if (!data.warningMsg.warningData.isNullOrEmpty()) {
|
||||
// 更新数据,远车数据,之前要匹配uuid
|
||||
TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(data)?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()?.updateITrafficLocationInfo(it)
|
||||
}
|
||||
if (HmiBuildConfig.isShowObuV2vView) {
|
||||
mObuStatusInfo.obuRvStatus = true
|
||||
CallerObuListenerManager.invokeListener(mObuStatusInfo)
|
||||
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", data.toString())
|
||||
data.let {
|
||||
//预警信息,预警类型 threat_level 2、3
|
||||
var status = data.status
|
||||
data.vehBasicsMsg?.let {
|
||||
//预警方位
|
||||
val direction = getMessageDirection(data.vehBasicsMsg.targetPosition)
|
||||
//处理预警类型
|
||||
var appId = ""
|
||||
var level = -1
|
||||
data.warningMsg?.let {
|
||||
if (data.warningMsg.warningData != null && data.warningMsg.warningData.size > 0) {
|
||||
level = data.warningMsg.warningData[0].warningLevel
|
||||
appId = data.warningMsg.warningData[0].warningType.toString()
|
||||
if (!data.warningMsg.warningData.isNullOrEmpty()) {
|
||||
// 更新数据,远车数据,之前要匹配uuid
|
||||
TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(data)?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()?.updateITrafficLocationInfo(it)
|
||||
}
|
||||
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", data.toString())
|
||||
data.let {
|
||||
//预警信息,预警类型 threat_level 2、3
|
||||
var status = data.status
|
||||
data.vehBasicsMsg?.let {
|
||||
//预警方位
|
||||
val direction = getMessageDirection(data.vehBasicsMsg.targetPosition)
|
||||
//处理预警类型
|
||||
var appId = ""
|
||||
var level = -1
|
||||
data.warningMsg?.let {
|
||||
if (data.warningMsg.warningData != null && data.warningMsg.warningData.size > 0) {
|
||||
level = data.warningMsg.warningData[0].warningLevel
|
||||
appId = data.warningMsg.warningData[0].warningType.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onMogoObuRvWarning target_classification = ${
|
||||
getMessageDirection(data.vehBasicsMsg.targetPosition)
|
||||
} --- direction = $direction --- appId = $appId ---level = $level -- status = $status"
|
||||
)
|
||||
//拼凑数据
|
||||
if (appId != null) {
|
||||
handleSdkObu(appId, direction, status, level, data)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRvWarning target_classification = ${
|
||||
getMessageDirection(data.vehBasicsMsg.targetPosition)
|
||||
} --- direction = $direction --- appId = $appId ---level = $level -- status = $status"
|
||||
)
|
||||
//拼凑数据
|
||||
if (appId != null) {
|
||||
handleSdkObu(appId, direction, status, level, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,11 +220,13 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
super.onMogoObuSpatWarning(data)
|
||||
if (data?.lights != null && data.lights.isNotEmpty()
|
||||
) {
|
||||
handlerTrafficLight(
|
||||
data.warningType,
|
||||
data.status,
|
||||
data.lights
|
||||
)
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
handlerTrafficLight(
|
||||
data.warningType,
|
||||
data.status,
|
||||
data.lights
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,233 +235,239 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
*/
|
||||
override fun onMogoObuRsiWarning(data: MogoObuRsiWarningData) {
|
||||
super.onMogoObuRsiWarning(data)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onMogoObuRsiWarning ------> $data"
|
||||
)
|
||||
if (data != null && data.warningMsg != null && data.warningMsg.size > 0) {
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
var appId = data.warningMsg[0].sceneType.toString()
|
||||
val status = data.status
|
||||
val level = data.warningMsg[0].warningLevel
|
||||
val direction = getMessageDirection(data.warningMsg[0].targetPosition)
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onCvxRtiThreatIndInfo appId = $appId --status = $status --level = $level -- eventSerialNum = ${data.warningMsg[0].eventSerialNum} ---signSerialNum = ${data.warningMsg[0].signSerialNum} --- direction = $direction -- targetPosition = ${data.warningMsg[0].targetPosition}"
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRsiWarning ------> $data"
|
||||
)
|
||||
if (data != null && data.warningMsg != null && data.warningMsg.size > 0) {
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
var appId = data.warningMsg[0].sceneType.toString()
|
||||
val status = data.status
|
||||
val level = data.warningMsg[0].warningLevel
|
||||
val direction = getMessageDirection(data.warningMsg[0].targetPosition)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onCvxRtiThreatIndInfo appId = $appId --status = $status --level = $level -- eventSerialNum = ${data.warningMsg[0].eventSerialNum} ---signSerialNum = ${data.warningMsg[0].signSerialNum} --- direction = $direction -- targetPosition = ${data.warningMsg[0].targetPosition}"
|
||||
)
|
||||
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
MogoObuConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
when (data.warningMsg[0].eventSerialNum) {
|
||||
MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
appId = V2iEventTypeEnum.FOURS_PONDING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
}
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
MogoObuConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
when (data.warningMsg[0].eventSerialNum) {
|
||||
MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
appId = EventTypeEnumNew.FOURS_PONDING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
}
|
||||
// MogoObuConstants.RTE.RTI_TYPE_CONSTRUCTION_RTE -> { //施工占道,和标牌重复
|
||||
// appId = V2iEventTypeEnum.FOURS_ROAD_WORK.poiType
|
||||
// appId = EventTypeEnumNew.FOURS_ROAD_WORK.poiType
|
||||
// }
|
||||
MogoObuConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
appId =
|
||||
V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
MogoObuConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
}
|
||||
}
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
Math.round(data.warningMsg[0].eventRadius).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
Math.round(data.warningMsg[0].eventRadius).toString()
|
||||
)
|
||||
}
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
Math.round(data.warningMsg[0].eventRadius).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
Math.round(data.warningMsg[0].eventRadius).toString()
|
||||
)
|
||||
}
|
||||
|
||||
//车内标牌
|
||||
MogoObuConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
when (data.warningMsg[0].signSerialNum) {
|
||||
//车内标牌
|
||||
MogoObuConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
when (data.warningMsg[0].signSerialNum) {
|
||||
// MogoObuConstants.RTS.RTI_TYPE_INTERSECTION -> { //十字路口
|
||||
// appId = V2iEventTypeEnum.TYPE_ID_NTERSECTION.poiType
|
||||
// appId = EventTypeEnumNew.TYPE_ID_NTERSECTION.poiType
|
||||
// }
|
||||
MogoObuConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
appId = V2iEventTypeEnum.TYPE_ID_SHAPR_TURNS.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
appId = V2iEventTypeEnum.TYPE_ID_BRIDGE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
appId = V2iEventTypeEnum.TYPE_ID_PEDESTRIAN.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
appId = V2iEventTypeEnum.TYPE_ID_SLIPPERY_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
appId = V2iEventTypeEnum.TYPE_ID_TUNNEL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
appId = V2iEventTypeEnum.TYPE_ID_FERRY.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
appId = V2iEventTypeEnum.TYPE_ID_UNEVEN_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
appId = V2iEventTypeEnum.TYPE_ID_NON_MOTOR_VEHICLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
appId = V2iEventTypeEnum.TYPE_ID_OBSTACLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
appId = V2iEventTypeEnum.TYPE_FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
appId = V2iEventTypeEnum.TYPE_VEHICLE_QUEUE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
appId = V2iEventTypeEnum.TYPE_NO_PASSING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
appId = V2iEventTypeEnum.TYPE_NO_TURNING_AROUND.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
appId = EventTypeEnumNew.TYPE_ID_SHAPR_TURNS.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
appId = EventTypeEnumNew.TYPE_ID_BRIDGE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
appId = EventTypeEnumNew.TYPE_ID_PEDESTRIAN.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
appId = EventTypeEnumNew.TYPE_ID_SLIPPERY_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
appId = EventTypeEnumNew.TYPE_ID_TUNNEL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
appId = EventTypeEnumNew.TYPE_ID_FERRY.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
appId = EventTypeEnumNew.TYPE_ID_UNEVEN_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
appId = EventTypeEnumNew.TYPE_ID_NON_MOTOR_VEHICLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
appId = EventTypeEnumNew.TYPE_ID_OBSTACLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
appId = EventTypeEnumNew.TYPE_FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
appId = EventTypeEnumNew.TYPE_VEHICLE_QUEUE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
appId = EventTypeEnumNew.TYPE_NO_PASSING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
appId = EventTypeEnumNew.TYPE_NO_TURNING_AROUND.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
}
|
||||
// MogoObuConstants.RTS.RTI_TYPE_GO_STRAIGHT_TURN_RIGHT -> { //直行或右转
|
||||
// appId =
|
||||
// V2iEventTypeEnum.TYPE_USECASE_ID_GO_STRAIGHT_TURN_RIGHT.poiType
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_GO_STRAIGHT_TURN_RIGHT.poiType
|
||||
// }
|
||||
MogoObuConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_BUS_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_NARROW_RIGHT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_GAS_STATION.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
appId =
|
||||
V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ACCIDENT.poiType
|
||||
MogoObuConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BUS_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_NARROW_RIGHT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_GAS_STATION.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ACCIDENT.poiType
|
||||
}
|
||||
}
|
||||
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //标牌是没有影响范围的
|
||||
alertContent,
|
||||
Math.round(data.warningMsg[0].distance).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsg[0].distance).toString()
|
||||
)
|
||||
}
|
||||
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
alertContent = String.format( //标牌是没有影响范围的
|
||||
alertContent,
|
||||
Math.round(data.warningMsg[0].distance).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsg[0].distance).toString()
|
||||
)
|
||||
}
|
||||
// 拥堵
|
||||
MogoObuConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_TJW.poiType
|
||||
|
||||
// 拥堵
|
||||
MogoObuConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_TJW.poiType
|
||||
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
Math.round(data.warningMsg[0].eventRadius).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
Math.round(data.warningMsg[0].eventRadius).toString()
|
||||
)
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
Math.round(data.warningMsg[0].eventRadius).toString()
|
||||
)
|
||||
}
|
||||
|
||||
//限速预警, ADD处理一次
|
||||
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
}
|
||||
}
|
||||
|
||||
//限速预警, ADD处理一次
|
||||
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
}
|
||||
}
|
||||
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"ttsContent = $ttsContent --alertContent = $alertContent --appId = $appId ---direction = ${direction.direction} --distance = ${Math.round(data.warningMsg[0].distance)} ---eventRadius = ${Math.round(data.warningMsg[0].eventRadius)} --speedMaxLimit = ${data.warningMsg[0].speedMaxLimit.toInt()}"
|
||||
)
|
||||
when (status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
//显示警告红边
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"new onMogoObuRsiWarning ttsContent = $ttsContent --alertContent = $alertContent --appId = $appId ---direction = ${direction.direction} --distance = ${Math.round(data.warningMsg[0].distance)} ---eventRadius = ${Math.round(data.warningMsg[0].eventRadius)} --speedMaxLimit = ${data.warningMsg[0].speedMaxLimit.toInt()}"
|
||||
)
|
||||
when (status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
//显示警告红边
|
||||
// CallerHmiManager.showWarning(direction)
|
||||
//不显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent
|
||||
//不显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuNewMana1", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
},
|
||||
true,
|
||||
3000L
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
},
|
||||
true,
|
||||
3000L
|
||||
)
|
||||
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)?.let {
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
// 关闭警告红边
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
// 关闭警告红边
|
||||
// CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 移除顶部弹窗
|
||||
// 移除顶部弹窗
|
||||
// CallerHmiManager.disableWarningV2X((appId + direction.direction))
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
// 事件结束,还原车辆颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficInfo(it)
|
||||
}
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
// 事件结束,还原车辆颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficInfo(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -474,96 +483,101 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
data: MogoObuRsmWarningData?
|
||||
) {
|
||||
super.onMogoObuRsmWarning(data)
|
||||
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"onMogoObuRsmWarning ------> ${data.toString()}"
|
||||
)
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
|
||||
if (data != null && data.participant != null) {
|
||||
var v2xType = ""
|
||||
if (data.participant.ptcType == 1) { //机动车
|
||||
v2xType =
|
||||
EventTypeEnumWeaknessTraffic.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
|
||||
} else if (data.participant.ptcType == 2) { //非机动车
|
||||
v2xType =
|
||||
EventTypeEnumWeaknessTraffic.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
|
||||
} else if (data.participant.ptcType == 3) { //行人
|
||||
v2xType =
|
||||
EventTypeEnumWeaknessTraffic.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
} else { //未知
|
||||
v2xType = EventTypeEnumWeaknessTraffic.TYPE_ERROR.poiType
|
||||
}
|
||||
val ttsContent = EventTypeEnumWeaknessTraffic.getWarningTts(v2xType)
|
||||
val alertContent =
|
||||
EventTypeEnumWeaknessTraffic.getWarningContent(v2xType)
|
||||
var level = -1
|
||||
val direction = getMessageDirection(data.participant.targetPosition)
|
||||
if (data.warningMsg != null && data.warningMsg.warningData != null && data.warningMsg.warningData.size > 0) {
|
||||
level = data.warningMsg.warningData[0].warningLevel //默认是1个
|
||||
CallerLogger.d("$M_OBU${TAG_MOGO_OBU}",
|
||||
"onMogoObuRsmWarning ---status---> ${data.status} ---data.warningMsg.warningData[0].status = ${data.warningMsg.warningData[0].status}"
|
||||
)
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRsmWarning ------> ${data.toString()}"
|
||||
)
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
|
||||
if (data != null && data.participant != null) {
|
||||
var v2xType = ""
|
||||
if (data.participant.ptcType == 1) { //机动车
|
||||
v2xType =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
|
||||
} else if (data.participant.ptcType == 2) { //非机动车
|
||||
v2xType =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
|
||||
} else if (data.participant.ptcType == 3) { //行人
|
||||
v2xType =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
} else { //未知
|
||||
v2xType = EventTypeEnumNew.TYPE_ERROR.poiType
|
||||
}
|
||||
val ttsContent = EventTypeEnumNew.getWarningTts(v2xType)
|
||||
val alertContent =
|
||||
EventTypeEnumNew.getWarningContent(v2xType)
|
||||
var level = -1
|
||||
val direction = getMessageDirection(data.participant.targetPosition)
|
||||
if (data.warningMsg != null && data.warningMsg.warningData != null && data.warningMsg.warningData.size > 0) {
|
||||
level = data.warningMsg.warningData[0].warningLevel //默认是1个
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"new onMogoObuRsmWarning ---status---> ${data.status} ---data.warningMsg.warningData[0].status = ${data.warningMsg.warningData[0].status} ---v2xType = $v2xType ---alertContent = $alertContent ---ttsContent = $ttsContent "
|
||||
)
|
||||
|
||||
when (data.warningMsg.warningData[0].status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
when (data.warningMsg.warningData[0].status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
// if (level == 2 || level == 3) { //不考虑level
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuNewMana2", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(v2xType + direction.direction),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(
|
||||
WarningDirectionEnum.ALERT_WARNING_NON
|
||||
)
|
||||
}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(v2xType + direction.direction),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(
|
||||
WarningDirectionEnum.ALERT_WARNING_NON
|
||||
)
|
||||
}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
// }
|
||||
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)?.let {
|
||||
CallerLogger.d("$M_OBU${TAG_MOGO_OBU}", "add cvxPtcThreatIndInfo2TrafficData ---it---> $it")
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> {// 更新
|
||||
}
|
||||
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 更新数据 TODO 删除原来的,改变颜色,删除marker。不影响别的模型添加
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
// 事件结束,还原交通参与者颜色
|
||||
it.threatLevel = 0x01
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)?.let {
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", "add cvxPtcThreatIndInfo2TrafficData ---it---> $it")
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
//删除弱势交通元素
|
||||
CallerMapUIServiceManager.getMarkerService()?.removeCvxRvInfoIndInfo(data.participant.ptcId.toString())
|
||||
MogoObuConstants.STATUS.UPDATE -> {// 更新
|
||||
}
|
||||
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 更新数据 TODO 删除原来的,改变颜色,删除marker。不影响别的模型添加
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
// 事件结束,还原交通参与者颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
|
||||
//删除弱势交通元素
|
||||
CallerMapUIServiceManager.getMarkerService()?.removeCvxRvInfoIndInfo(data.participant.ptcId.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -576,10 +590,10 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
*/
|
||||
override fun onMogoObuMapMath(data: MogoObuMapMathData?) {
|
||||
super.onMogoObuMapMath(data)
|
||||
if(isShowObuLimitSpeedView) { //默认显示obu的限速
|
||||
if(isShowObuLimitSpeedView) {
|
||||
if (data != null) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${TAG_MOGO_OBU}",
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuMapMathstatus = ${data.status} --speedMaxLimit = ${Math.round((data.speedMaxLimit*3.6))}")
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
@@ -610,7 +624,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
* 获取消息的方位 车辆相关
|
||||
*/
|
||||
private fun getMessageDirection(targetClassification: Int): WarningDirectionEnum {
|
||||
// CallerLogger.d("$M_OBU${TAG_MOGO_OBU}", "预警红边:预警方向->$targetClassification")
|
||||
// CallerLogger.d("$M_OBU${TAG_MOGO_NEW_OBU}", "预警红边:预警方向->$targetClassification")
|
||||
return when (targetClassification) {
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方
|
||||
@@ -656,7 +670,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
) {
|
||||
// 这里排除需要特殊定制的语音及文案外,其余的都可以使用 EventTypeEnumNew 提供的
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"handleSdkObu appId = $appId --- handleDirection = $direction ---level = $level ---status = $status"
|
||||
)
|
||||
|
||||
@@ -735,10 +749,13 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
MogoObuConstants.STATUS.ADD,
|
||||
MogoObuConstants.STATUS.UPDATE -> {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"new handleSdkObu appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
|
||||
)
|
||||
if (level == 2 || level == 3) {
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuNewManager2", "alertContent或ttsContent为空!")
|
||||
}
|
||||
//不显示弹框,其它保留
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
@@ -804,7 +821,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
*/
|
||||
private fun handlerTrafficLight(appId: Int, status: Int, lights: List<SpatLight>) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"handlerTrafficLight --- status = $status ---lights.size = ${lights.size} ---lights = $lights ---appId = $appId"
|
||||
)
|
||||
when (status) {
|
||||
@@ -819,12 +836,16 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
// 移除顶部弹窗
|
||||
CallerHmiManager.disableWarningTrafficLight()
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
isShowGreenWave = false
|
||||
isShowRunRedLight = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var isRedLight = false
|
||||
private var isGreenLight = false
|
||||
private var isShowGreenWave = false
|
||||
private var isShowRunRedLight = false
|
||||
|
||||
/**
|
||||
* 修改红绿灯
|
||||
@@ -839,7 +860,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
//这里需要根据真实数据确定 index 取值方式
|
||||
val currentLight = lights[0]
|
||||
CallerLogger.d(
|
||||
"$M_OBU${TAG_MOGO_OBU}",
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"currentLight = $currentLight ---currentLight.phase = ${currentLight.phaseId} ---appId = $appId"
|
||||
)
|
||||
// 闯红灯预警,绿波通行和闯红灯是互斥的
|
||||
@@ -847,60 +868,69 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
0x0 -> {//不可用 V2I_RLVW_VIOLATION_TYPE_UNAVAILABLE 无效
|
||||
|
||||
}
|
||||
0x1 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT TODO 需要约束一个红灯周期只显示一次
|
||||
// CallerHmiManager.disableWarningV2X(0x2.toString())
|
||||
// CallerLogger.d("$M_OBU${TAG_MOGO_OBU}","changeTrafficLightStatus 闯红灯 --------> ")
|
||||
// ttsContent = EventTypeEnumTrafficLight.getWarningTts(appId.toString())
|
||||
// alertContent = EventTypeEnumTrafficLight.getWarningContent(appId.toString())
|
||||
// CallerHmiManager.warningV2X(
|
||||
// appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
// appId.toString(), null, true, 5000L)
|
||||
0x1 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次
|
||||
if (!isShowRunRedLight) {
|
||||
isShowRunRedLight = true
|
||||
CallerHmiManager.disableWarningV2X(0x2.toString())
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}","changeTrafficLightStatus 闯红灯 --------> ")
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId.toString())
|
||||
CallerHmiManager.warningV2X(
|
||||
appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(), null, true, 5000L)
|
||||
}
|
||||
}
|
||||
|
||||
0x2 -> { //绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION TODO 需要约束一个绿灯周期只显示一次
|
||||
// CallerHmiManager.disableWarningV2X(0x1.toString())
|
||||
// CallerLogger.d(
|
||||
// "$M_OBU${TAG_MOGO_OBU}",
|
||||
// "speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}"
|
||||
// )
|
||||
// val adviceSpeed =
|
||||
// "${currentLight.suggestMinSpeed} - ${currentLight.suggestMaxSpeed}"
|
||||
// val adviceSpeedTts =
|
||||
// "${currentLight.suggestMinSpeed}到${currentLight.suggestMaxSpeed}"
|
||||
// ttsContent =
|
||||
// String.format(
|
||||
// EventTypeEnumTrafficLight.getWarningTts(appId.toString()),
|
||||
// adviceSpeedTts
|
||||
// )
|
||||
// alertContent =
|
||||
// String.format(
|
||||
// EventTypeEnumTrafficLight.getWarningContent(appId.toString()),
|
||||
// adviceSpeed
|
||||
// )
|
||||
//
|
||||
// val maxSpeed = currentLight.suggestMaxSpeed
|
||||
// if (maxSpeed > 0) {
|
||||
// CallerMsgBoxManager.saveMsgBox(
|
||||
// MsgBoxBean(
|
||||
// MsgBoxType.OBU,
|
||||
// V2XMsg(
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
// alertContent,
|
||||
// ttsContent
|
||||
// )
|
||||
// )
|
||||
// )
|
||||
//
|
||||
// CallerHmiManager.warningV2X(
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
// alertContent,
|
||||
// ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
// appId.toString(),
|
||||
// null,
|
||||
// true,
|
||||
// 5000L
|
||||
// )
|
||||
// }
|
||||
0x2 -> { //绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION 一个绿灯周期只显示一次 100m的时候
|
||||
if (!isShowGreenWave) {
|
||||
isShowGreenWave = true
|
||||
CallerHmiManager.disableWarningV2X(0x1.toString())
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"new changeTrafficLightStatus speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed} --TYPE_USECASE_ID_IVP_GREEN ---alertContent = $alertContent ---ttsContent = $ttsContent"
|
||||
)
|
||||
val adviceSpeed =
|
||||
"${currentLight.suggestMinSpeed} - ${currentLight.suggestMaxSpeed}"
|
||||
val adviceSpeedTts =
|
||||
"${currentLight.suggestMinSpeed}到${currentLight.suggestMaxSpeed}"
|
||||
ttsContent =
|
||||
String.format(
|
||||
EventTypeEnumNew.getWarningTts(appId.toString()),
|
||||
adviceSpeedTts
|
||||
)
|
||||
alertContent =
|
||||
String.format(
|
||||
EventTypeEnumNew.getWarningContent(appId.toString()),
|
||||
adviceSpeed
|
||||
)
|
||||
|
||||
val maxSpeed = currentLight.suggestMaxSpeed
|
||||
if (maxSpeed > 0) {
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuNewManager1", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(),
|
||||
null,
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -557,7 +557,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
tempContent = EventTypeEnum.TYPE_USECASE_ID_IVP.content
|
||||
}
|
||||
2001 -> {
|
||||
// 最优车道
|
||||
// 最优车道100061
|
||||
EventTypeHelper.getOptLine{ appId, tts, content ->
|
||||
tempAppId = appId
|
||||
tempTts = tts
|
||||
@@ -574,6 +574,9 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
}
|
||||
}
|
||||
// 不显示弹框,其它保留
|
||||
if (tempContent.isNullOrEmpty() || tempTts.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-V2XEventManager", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.road;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.commons.analytics.AnalyticsUtils;
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
|
||||
@@ -72,7 +74,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
boolean onlyShow = getV2XMessageEntity().isOnlyShow();
|
||||
if (!onlyShow) {
|
||||
// 设置TTS
|
||||
getV2XMessageEntity().getContent().getTts();
|
||||
getV2XMessageEntity().getContent().getTts(false);
|
||||
}
|
||||
showWindow();
|
||||
String poiType = getV2XMessageEntity().getContent().getPoiType();
|
||||
@@ -98,6 +100,10 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
V2XRoadEventEntity content = entity != null ? entity.getContent() : null;
|
||||
if (content != null) {
|
||||
// //显示警告红边
|
||||
if (content.getAlarmContent() == null || content.getAlarmContent().isEmpty()
|
||||
|| content.getTts() == null || content.getTts().isEmpty()) {
|
||||
Log.d("MsgBox-V2XRoadScenario", "alertContent或ttsContent为空!");
|
||||
}
|
||||
CallerMsgBoxManager.INSTANCE.saveMsgBox(
|
||||
new MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
|
||||
@@ -6,6 +6,8 @@ import android.graphics.Color;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
@@ -63,6 +65,11 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL
|
||||
int v2xType = getV2XTypeForFrontWarning(mMarkerEntity);
|
||||
V2XMessageEntity entity = getV2XMessageEntity();
|
||||
if (v2xType != 0) {
|
||||
if (getAlertContentForFrontWarning(mMarkerEntity).toString() == null
|
||||
|| getAlertContentForFrontWarning(mMarkerEntity).toString().isEmpty()
|
||||
|| mMarkerEntity.getTts() == null || mMarkerEntity.getTts().isEmpty()) {
|
||||
Log.d("MsgBox-FrontWarScenario", "alertContent或ttsContent为空!");
|
||||
}
|
||||
CallerMsgBoxManager.INSTANCE.saveMsgBox(
|
||||
new MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.v2x.redlightwarning
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP_GREEN
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
|
||||
@@ -239,6 +240,9 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
speed
|
||||
)
|
||||
if (content.isNullOrEmpty() || tts.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-RedLightWarManaG", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.core.function.v2x.trafficlight.network
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
@@ -9,6 +8,7 @@ import com.mogo.eagle.core.network.apiCall
|
||||
import com.mogo.eagle.core.network.cancel
|
||||
import com.mogo.eagle.core.network.request
|
||||
import com.mogo.commons.constants.HostConst.CITY_HOST
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
|
||||
class TrafficLightNetWorkModel {
|
||||
|
||||
@@ -30,7 +30,7 @@ class TrafficLightNetWorkModel {
|
||||
start {
|
||||
val roadIDRequestData = RoadIDRequestData(tileID, lat, lon, bearing)
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["data"] = Gson().toJson(roadIDRequestData)
|
||||
map["data"] = GsonUtils.toJson(roadIDRequestData)
|
||||
}
|
||||
loader {
|
||||
apiCall {
|
||||
@@ -76,7 +76,7 @@ class TrafficLightNetWorkModel {
|
||||
}
|
||||
val trafficLightRequestData = TrafficLightRequestData(lat, lon, bearing, roadId)
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["data"] = Gson().toJson(trafficLightRequestData)
|
||||
map["data"] = GsonUtils.toJson(trafficLightRequestData)
|
||||
}
|
||||
loader {
|
||||
apiCall {
|
||||
@@ -116,7 +116,7 @@ class TrafficLightNetWorkModel {
|
||||
val trafficLightRequestData =
|
||||
ChangeLightRequestData(lightId, crossingNo, heading, controlTime)
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["data"] = Gson().toJson(trafficLightRequestData)
|
||||
map["data"] = GsonUtils.toJson(trafficLightRequestData)
|
||||
}
|
||||
loader {
|
||||
apiCall {
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.util.Log
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
@@ -275,6 +276,9 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
ttsContent: String,
|
||||
tag: String
|
||||
) {
|
||||
if (alertContent.toString().isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-VipCarManager", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(MsgBoxType.V2X, V2XMsg(v2xType, alertContent.toString(), ttsContent))
|
||||
)
|
||||
|
||||
@@ -28,6 +28,8 @@ object AppConfigInfo {
|
||||
|
||||
// 高精地图版本
|
||||
var mapSdkVersion: String? = null
|
||||
// 高精地图采集版本
|
||||
var mapSdkOptVersion: String? = null
|
||||
var adasSdkVersion: String? = null
|
||||
var obuSdkVersion: String? = null
|
||||
|
||||
@@ -92,6 +94,7 @@ object AppConfigInfo {
|
||||
"Git分支HASH:${workingBranchHash}<br/>" +
|
||||
"<font color='red' size='30'>------------------依赖信息---------------------</font><br/>" +
|
||||
"MAP-SDK版本:${mapSdkVersion}<br/>" +
|
||||
"MAP-OPT-SDK版本:${mapSdkOptVersion}<br/>" +
|
||||
"ADAS-SDK版本:${adasSdkVersion}<br/>" +
|
||||
"OBU-SDK版本:${obuSdkVersion}<br/>" +
|
||||
"<font color='red' size='30'>------------------鉴权信息---------------------</font><br/>" +
|
||||
@@ -187,6 +190,7 @@ fun AppConfigInfo.toConfigUpload():ConfigUpload{
|
||||
configUpload.isConnectSocket = isConnectSocket
|
||||
configUpload.isConnectedNetty = isConnectedNetty
|
||||
configUpload.mapSdkVersion = mapSdkVersion
|
||||
configUpload.mapSdkOptVersion = mapSdkOptVersion
|
||||
configUpload.mogoSN = mogoSN
|
||||
configUpload.mogoToken = mogoToken
|
||||
configUpload.netMode = netMode
|
||||
|
||||
@@ -14,6 +14,7 @@ class ConfigUpload(
|
||||
var uniqueDeviceId: String? = null,
|
||||
var widevineIDMd5: String? = null,
|
||||
var mapSdkVersion: String? = null,
|
||||
var mapSdkOptVersion: String? = null,
|
||||
var adasSdkVersion: String? = null,
|
||||
var obuSdkVersion: String? = null,
|
||||
var mogoToken: String? = null,
|
||||
|
||||
@@ -21,6 +21,7 @@ public class CarInfo implements Serializable {
|
||||
private String model; //款式
|
||||
private String new_version;
|
||||
private String brand; //品牌
|
||||
private String brandId; //品牌
|
||||
private String energy_type; //驱动类型
|
||||
private List<String> passenger; //乘客数量
|
||||
private String number_plate; //车牌号
|
||||
@@ -105,6 +106,14 @@ public class CarInfo implements Serializable {
|
||||
this.number_plate = number_plate;
|
||||
}
|
||||
|
||||
public String getBrandId() {
|
||||
return brandId;
|
||||
}
|
||||
|
||||
public void setBrandId(String brandId) {
|
||||
this.brandId = brandId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CarInfo{" +
|
||||
@@ -115,6 +124,7 @@ public class CarInfo implements Serializable {
|
||||
", model='" + model + '\'' +
|
||||
", new_version='" + new_version + '\'' +
|
||||
", brand='" + brand + '\'' +
|
||||
", brandId='" + brandId + '\'' +
|
||||
", energy_type='" + energy_type + '\'' +
|
||||
", passenger=" + passenger +
|
||||
", number_plate='" + number_plate + '\'' +
|
||||
|
||||
@@ -8,20 +8,61 @@ import com.mogo.eagle.core.data.BaseData;
|
||||
* @since: 3/16/22
|
||||
*/
|
||||
public class ModifyBindingcarInfo extends BaseData {
|
||||
public String data;
|
||||
|
||||
public String getData() {
|
||||
private BindMsg data;
|
||||
|
||||
public BindMsg getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
public void setData(BindMsg data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ModifyBindingcarInfo{" +
|
||||
"data='" + data + '\'' +
|
||||
"data=" + data +
|
||||
'}';
|
||||
}
|
||||
|
||||
public class BindMsg {
|
||||
private String result;
|
||||
private String brand; //品牌
|
||||
private String brandId;
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getBrand() {
|
||||
return brand;
|
||||
}
|
||||
|
||||
public void setBrand(String brand) {
|
||||
this.brand = brand;
|
||||
}
|
||||
|
||||
public String getBrandId() {
|
||||
return brandId;
|
||||
}
|
||||
|
||||
public void setBrandId(String brandId) {
|
||||
this.brandId = brandId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BindMsg{" +
|
||||
"result='" + result + '\'' +
|
||||
", brand='" + brand + '\'' +
|
||||
", brandId='" + brandId + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ object HdMapBuildConfig {
|
||||
* 可以指定,R.raw.chuzuche,R.raw.xiaobache,R.raw.hongqi
|
||||
*/
|
||||
@JvmField
|
||||
var currentCarVrIconRes = R.raw.chuzuche
|
||||
var currentCarVrIconRes = R.raw.hq_h9
|
||||
|
||||
/**
|
||||
* 地图是否加载成功
|
||||
|
||||
@@ -98,6 +98,28 @@ object HmiBuildConfig {
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowObuLimitSpeedView = true
|
||||
var isShowObuLimitSpeedView = false
|
||||
|
||||
/**
|
||||
* 是否展示obu的v2v
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowObuV2vView = false
|
||||
|
||||
/**
|
||||
* 是否展示obu的v2i
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowObuV2iView = false
|
||||
|
||||
/**
|
||||
* 是否展示obu通过工控机展示的v2i
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowObuToDcV2iView = true
|
||||
|
||||
|
||||
}
|
||||
@@ -5,7 +5,8 @@ import com.mogo.eagle.core.data.config.CloudPoiManager
|
||||
|
||||
|
||||
/**
|
||||
* OBU、V2N事件类型枚举类
|
||||
* OBU、V2N事件类型枚举类, 自研sdk版本的OBU
|
||||
*
|
||||
*/
|
||||
enum class EventTypeEnumNew(
|
||||
val poiType: String, val poiTypeStr: String = "",
|
||||
@@ -132,110 +133,116 @@ enum class EventTypeEnumNew(
|
||||
// 违章停车
|
||||
ALERT_ILLEGAL_PARK("99992"),
|
||||
|
||||
TYPE_USECASE_ID_EBW(
|
||||
6.toString(),
|
||||
"紧急制动预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_emergency_brake,
|
||||
content = "前车急刹车",
|
||||
tts = "前车急刹车"
|
||||
),
|
||||
//-------------v2n start ------------>
|
||||
TYPE_USECASE_ID_FCW(
|
||||
0.toString(),
|
||||
2000.toString(),
|
||||
"前向碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
content = "前车碰撞预警",
|
||||
tts = "小心前车"
|
||||
),
|
||||
// TYPE_USECASE_ID_ICW(
|
||||
// 1.toString(),
|
||||
// "交叉路口碰撞预警",
|
||||
// poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
// content = "交叉路口碰撞预警",
|
||||
// tts = "注意交叉路口车辆"
|
||||
// ),
|
||||
TYPE_USECASE_ID_AVW(
|
||||
7.toString(),
|
||||
"异常车辆提醒",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content = "%s车异常",
|
||||
tts = "小心%s异常车辆"
|
||||
// TYPE_USECASE_ID_ICW(
|
||||
// 1.toString(),
|
||||
// "交叉路口碰撞预警",
|
||||
// poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
// content = "交叉路口碰撞预警",
|
||||
// tts = "注意交叉路口车辆"
|
||||
// ),
|
||||
TYPE_USECASE_ID_LTA(
|
||||
2001.toString(),
|
||||
"左转辅助",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
content = "左转碰撞预警",
|
||||
tts = "注意路口对向来车"
|
||||
),
|
||||
TYPE_USECASE_ID_BSW(
|
||||
3.toString(),
|
||||
2002.toString(),
|
||||
"盲区预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_blind_area_collision,
|
||||
content = "%s后盲区预警",
|
||||
tts = "注意%s后车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_LCW(
|
||||
4.toString(),
|
||||
2003.toString(),
|
||||
"变道预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_reverse_overtaking,
|
||||
content = "%s向变道预警",
|
||||
tts = "注意%s后车辆"
|
||||
),//注意左后车辆/注意右后车辆
|
||||
|
||||
TYPE_USECASE_ID_EVW(
|
||||
9.toString(),
|
||||
"紧急车辆提醒",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_special_vehicle_access,
|
||||
content = "注意特种车辆通行",
|
||||
tts = "请避让特种车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_CLW(
|
||||
8.toString(),
|
||||
"车辆失控预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_vehicle_control,
|
||||
content = "前%s失控预警",
|
||||
tts = "小心%s失控车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_DNPW(
|
||||
5.toString(),
|
||||
2004.toString(),
|
||||
"逆向超车预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_reverse_overtaking,
|
||||
content = "逆向超车预警",
|
||||
tts = "注意对向来车"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY(
|
||||
0x2C11.toString(),
|
||||
"减速慢行",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_give_way,
|
||||
content = "注意路况复杂,减速慢行",
|
||||
tts = "路况复杂,减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP(
|
||||
0x2C03.toString(),
|
||||
"前方右转急弯",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_turn_right_sharp,
|
||||
content = "注意前方右转急弯",
|
||||
tts = "前方路口右转急弯,减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP(
|
||||
0x2C02.toString(),
|
||||
"前方左转急弯",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_turn_left_sharp,
|
||||
content = "注意前方左转急弯",
|
||||
tts = "前方路口左转急弯,减速慢行",
|
||||
TYPE_USECASE_ID_EBW(
|
||||
2005.toString(),
|
||||
"紧急制动预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_emergency_brake,
|
||||
content = "前车急刹车",
|
||||
tts = "前车急刹车"
|
||||
),
|
||||
|
||||
TYPE_USECASE_ID_LTA(
|
||||
2.toString(),
|
||||
"左转辅助",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
content = "左转碰撞预警",
|
||||
tts = "注意路口对向来车"
|
||||
TYPE_USECASE_ID_AVW(
|
||||
2006.toString(),
|
||||
"异常车辆提醒",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content = "%s车异常",
|
||||
tts = "小心%s异常车辆"
|
||||
),
|
||||
|
||||
TYPE_USECASE_ID_TJW( //TODO
|
||||
4.toString(),
|
||||
"前方拥堵提醒",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_congestion,
|
||||
content = "前方%d米道路拥堵",
|
||||
tts = "前方拥堵,减速慢行"
|
||||
TYPE_USECASE_ID_CLW(
|
||||
2007.toString(),
|
||||
"车辆失控预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_vehicle_control,
|
||||
content = "前%s失控预警",
|
||||
tts = "小心%s失控车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_EVW(
|
||||
2008.toString(),
|
||||
"紧急车辆提醒",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_special_vehicle_access,
|
||||
content = "注意特种车辆通行",
|
||||
tts = "请避让特种车辆"
|
||||
),
|
||||
//-------------v2n end ------------>
|
||||
|
||||
TYPE_USECASE_ID_IVP(
|
||||
0x1.toString(),
|
||||
|
||||
//---------弱势交通参与者 start ------>
|
||||
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES(
|
||||
1001.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_motorcycle_collision,
|
||||
content = "注意机动车",
|
||||
tts = "注意机动车"
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES(
|
||||
1002.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_motobike,
|
||||
content = "注意非机动车",
|
||||
tts = "注意非机动车"
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_PERSON(
|
||||
1003.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content = "注意行人",
|
||||
tts = "注意行人"
|
||||
),
|
||||
TYPE_ERROR_WEAKNESS(
|
||||
1006.toString(),
|
||||
"未知/错误/异常",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content = "前方有未知障碍物",
|
||||
tts = "前方有未知障碍物"
|
||||
),
|
||||
//---------弱势交通参与者 end -------->
|
||||
|
||||
|
||||
//--------------红绿灯 start -------> TODO 修改重复
|
||||
TYPE_USECASE_ID_IVP_RED(
|
||||
1666.toString(),
|
||||
"闯红灯预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_red,
|
||||
content = "路口红灯,禁止通行",
|
||||
@@ -243,52 +250,210 @@ enum class EventTypeEnumNew(
|
||||
),
|
||||
|
||||
TYPE_USECASE_ID_IVP_GREEN(
|
||||
0x2.toString(),
|
||||
1667.toString(),
|
||||
"绿波通行",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_green,
|
||||
content = "建议车速 %s KM/H",
|
||||
tts = "建议车速 %s KM/H"
|
||||
),
|
||||
//-------------红绿灯 end ---------->
|
||||
|
||||
//6种智行杯的场景需添加
|
||||
TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE(
|
||||
904.toString(),
|
||||
"注意逆行车辆",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_school,
|
||||
content = "注意逆行车辆",
|
||||
tts = "注意逆行车辆"
|
||||
//-----------道路危险情况预警 start --------------->
|
||||
TYPE_USECASE_ID_BREAKDOWN_WARNING( //故障车辆
|
||||
101.toString(),
|
||||
"车辆故障",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
content = "前方%s米有故障车辆,影响路段%s米",
|
||||
tts = "前方%s米有故障车辆,影响路段%s米"
|
||||
),
|
||||
|
||||
TYPE_USECASE_ID_SLW(
|
||||
TYPE_FOURS_PONDING( //积水
|
||||
407.toString(),
|
||||
"道路积水",
|
||||
poiTypeSrcVr = R.drawable.v2x_icon_jishui_vr,
|
||||
content = "前方%s米道路积水,影响路段%s米",
|
||||
tts ="前方%s米道路积水,影响路段%s米"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PARKING( //异常停车
|
||||
412.toString(),
|
||||
"异常停车",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking,
|
||||
content = "前方%s米异常停车,影响路段%s米",
|
||||
tts = "前方%s米异常停车,影响路段%s米"
|
||||
),
|
||||
TYPE_USECASE_ID_TJW( //%d
|
||||
707.toString(),
|
||||
"拥堵",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_congestion,
|
||||
content = "前方%s米拥堵,影响路段%s米",
|
||||
tts = "前方%s米拥堵,影响路段%s米"
|
||||
),
|
||||
TYPE_USECASE_ID_SLW( //超速行驶
|
||||
901.toString(),
|
||||
"注意超速车辆",
|
||||
"超速行驶",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_over_speed,
|
||||
content = "注意超速车辆",
|
||||
tts = "注意超速车辆"
|
||||
content = "前方%s米超速行驶,影响路段%s米",
|
||||
tts = "前方%s米超速行驶,影响路段%s米"
|
||||
),
|
||||
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR(
|
||||
0x2C01.toString(),
|
||||
"前方有轨电车提醒",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
|
||||
content = "注意前方有轨电车",
|
||||
tts = "注意前方有轨电车驶过"
|
||||
TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE( //车辆逆行
|
||||
904.toString(),
|
||||
"逆行车辆",
|
||||
poiTypeSrcVr = R.drawable.icon_default,
|
||||
content = "前方%s米逆行车辆,影响路段%s米",
|
||||
tts = "前方%s米逆行车辆,影响路段%s米"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_SPEED_LIMIT( //-->
|
||||
6666.toString(),
|
||||
"超速",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_over_speed,
|
||||
content = "您已超速,请减速行驶",
|
||||
tts = "您已超速,请减速行驶"
|
||||
),
|
||||
//------------道路危险情况预警 end ----------->
|
||||
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING(
|
||||
0x2C04.toString(),
|
||||
"人行横道",
|
||||
|
||||
//------------车内标牌 start -------------->
|
||||
TYPE_ID_SHAPR_TURNS(
|
||||
2.toString(),
|
||||
"急转弯",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_turn_left_sharp,
|
||||
content = "前方%s米急转弯",
|
||||
tts = "前方%s米急转弯"
|
||||
),
|
||||
TYPE_ID_BRIDGE(
|
||||
8.toString(),
|
||||
"桥梁",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_hump_bridge,
|
||||
content = "前方%s米桥梁",
|
||||
tts = "前方%s米桥梁"
|
||||
),
|
||||
TYPE_ID_PEDESTRIAN(
|
||||
10.toString(),
|
||||
"行人",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content = "注意前方人行横道",
|
||||
tts = "前方人行横道,减速慢行"
|
||||
content = "前方%s米行人",
|
||||
tts = "前方%s米行人"
|
||||
),
|
||||
TYPE_ID_SLIPPERY_ROAD(
|
||||
17.toString(),
|
||||
"路滑",
|
||||
poiTypeSrcVr = R.drawable.v2x_icon_jiebing_vr,
|
||||
content = "前方%s米路滑",
|
||||
tts = "前方%s米路滑"
|
||||
),
|
||||
TYPE_ID_TUNNEL(
|
||||
21.toString(),
|
||||
"隧道",
|
||||
poiTypeSrcVr = R.drawable.icon_default,
|
||||
content = "前方%s米隧道",
|
||||
tts = "前方%s米隧道"
|
||||
),
|
||||
TYPE_ID_FERRY(
|
||||
22.toString(),
|
||||
"渡轮",
|
||||
poiTypeSrcVr = R.drawable.icon_default,
|
||||
content = "前方%s米渡轮",
|
||||
tts = "前方%s米渡轮"
|
||||
),
|
||||
TYPE_ID_UNEVEN_ROAD(
|
||||
24.toString(),
|
||||
"路面不平",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_road_hollow,
|
||||
content = "前方%s米路面不平",
|
||||
tts = "前方%s米路面不平"
|
||||
),
|
||||
TYPE_ID_NON_MOTOR_VEHICLE(
|
||||
32.toString(),
|
||||
"非机动车",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_motobike,
|
||||
content = "前方%s米有非机动车",
|
||||
tts = "前方%s米有非机动车"
|
||||
),
|
||||
TYPE_ID_OBSTACLE(
|
||||
36.toString(),
|
||||
"障碍",
|
||||
poiTypeSrcVr = R.drawable.icon_default,
|
||||
content = "前方%s米障碍",
|
||||
tts = "前方%s米障碍"
|
||||
),
|
||||
TYPE_FOURS_ROAD_WORK(
|
||||
38.toString(),
|
||||
"施工",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_road_construction,
|
||||
content = "前方%s米施工",
|
||||
tts = "前方%s米施工"
|
||||
),
|
||||
TYPE_VEHICLE_QUEUE(
|
||||
47.toString(),
|
||||
"车队",
|
||||
poiTypeSrcVr = R.drawable.icon_default,
|
||||
content = "前方%s米车队",
|
||||
tts = "前方%s米车队"
|
||||
),
|
||||
TYPE_NO_PASSING(
|
||||
51.toString(),
|
||||
"不通",
|
||||
poiTypeSrcVr = R.drawable.v2x_icon_fenglu_vr,
|
||||
content = "前方%s米不通",
|
||||
tts = "前方%s米不通"
|
||||
),
|
||||
TYPE_NO_TURNING_AROUND(
|
||||
75.toString(),
|
||||
"禁止掉头",
|
||||
poiTypeSrcVr = R.drawable.icon_default,
|
||||
content = "前方%s米禁止掉头",
|
||||
tts = "前方%s米禁止掉头"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING(
|
||||
0x2C10.toString(),
|
||||
78.toString(),
|
||||
"禁止停车",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking,
|
||||
content = "注意当前路段禁止停车",
|
||||
tts = "当前路段,禁止停车"
|
||||
content = "前方%s米禁止停车",
|
||||
tts = "前方%s米禁止停车"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_NO_TOOTING(
|
||||
80.toString(),
|
||||
"禁止鸣笛",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_no_tooting,
|
||||
content = "前方%s米禁止鸣笛",
|
||||
tts = "前方%s米禁止鸣笛"
|
||||
),
|
||||
TYPE_USECASE_ID_BUS_WARNING(
|
||||
123.toString(),
|
||||
"公交提醒",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
|
||||
content = "前方%s米公交提醒",
|
||||
tts = "前方%s米公交提醒"
|
||||
),
|
||||
TYPE_USECASE_ID_NARROW_RIGHT(
|
||||
163.toString(),
|
||||
"右侧变窄/车道数减少",
|
||||
poiTypeSrcVr = R.drawable.icon_default,
|
||||
content = "前方%s米右侧变窄/车道数减少",
|
||||
tts = "前方%s米右侧变窄/车道数减少"
|
||||
),
|
||||
TYPE_USECASE_ID_GAS_STATION(
|
||||
201.toString(),
|
||||
"加油站",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_gas_station,
|
||||
content = "前方%s米加油站",
|
||||
tts = "前方%s米加油站"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL(
|
||||
242.toString(),
|
||||
"学校",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_school,
|
||||
content = "前方%s米学校",
|
||||
tts = "前方%s米学校"
|
||||
),
|
||||
TYPE_USECASE_ID_ACCIDENT(
|
||||
244.toString(),
|
||||
"事故",
|
||||
poiTypeSrcVr = R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
content = "前方%s米事故",
|
||||
tts = "前方%s米事故"
|
||||
),
|
||||
//------------车内标牌 end -------------->
|
||||
|
||||
|
||||
TYPE_ERROR(
|
||||
0.toString(),
|
||||
@@ -640,12 +805,68 @@ enum class EventTypeEnumNew(
|
||||
ALERT_CAR_TROUBLE_WARNING.poiType -> {
|
||||
R.drawable.icon_car_red
|
||||
}
|
||||
else -> 0
|
||||
|
||||
//闯红灯预警
|
||||
TYPE_USECASE_ID_IVP_RED.poiType -> {
|
||||
R.drawable.icon_warning_v2x_traffic_lights_red
|
||||
}
|
||||
//绿波通行
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> {
|
||||
R.drawable.icon_warning_v2x_traffic_lights_green
|
||||
}
|
||||
|
||||
//机动车
|
||||
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType -> {
|
||||
R.drawable.icon_warning_v2x_motorcycle_collision
|
||||
}
|
||||
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType -> {
|
||||
R.drawable.icon_warning_v2x_motobike
|
||||
}
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> {
|
||||
R.drawable.icon_warning_v2x_pedestrian_crossing
|
||||
}
|
||||
TYPE_ERROR_WEAKNESS.poiType -> {
|
||||
R.drawable.icon_warning_v2x_abnormal_vehicle
|
||||
}
|
||||
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType -> TYPE_USECASE_ID_BREAKDOWN_WARNING.poiTypeSrcVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_PARKING.poiType -> TYPE_USECASE_ID_ROAD_PARKING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType -> TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiTypeSrcVr
|
||||
TYPE_ID_SHAPR_TURNS.poiType -> TYPE_ID_SHAPR_TURNS.poiTypeSrcVr
|
||||
TYPE_ID_BRIDGE.poiType -> TYPE_ID_BRIDGE.poiTypeSrcVr
|
||||
TYPE_ID_PEDESTRIAN.poiType -> TYPE_ID_PEDESTRIAN.poiTypeSrcVr
|
||||
TYPE_ID_SLIPPERY_ROAD.poiType -> TYPE_ID_SLIPPERY_ROAD.poiTypeSrcVr
|
||||
TYPE_ID_TUNNEL.poiType -> TYPE_ID_TUNNEL.poiTypeSrcVr
|
||||
TYPE_ID_FERRY.poiType -> TYPE_ID_FERRY.poiTypeSrcVr
|
||||
TYPE_ID_UNEVEN_ROAD.poiType -> TYPE_ID_UNEVEN_ROAD.poiTypeSrcVr
|
||||
TYPE_ID_NON_MOTOR_VEHICLE.poiType -> TYPE_ID_NON_MOTOR_VEHICLE.poiTypeSrcVr
|
||||
TYPE_ID_OBSTACLE.poiType -> TYPE_ID_OBSTACLE.poiTypeSrcVr
|
||||
TYPE_FOURS_ROAD_WORK.poiType -> TYPE_FOURS_ROAD_WORK.poiTypeSrcVr
|
||||
TYPE_VEHICLE_QUEUE.poiType -> TYPE_VEHICLE_QUEUE.poiTypeSrcVr
|
||||
TYPE_NO_PASSING.poiType -> TYPE_NO_PASSING.poiTypeSrcVr
|
||||
TYPE_NO_TURNING_AROUND.poiType -> TYPE_NO_TURNING_AROUND.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType -> TYPE_USECASE_ID_ROAD_NO_TOOTING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType -> TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_BUS_WARNING.poiType -> TYPE_USECASE_ID_BUS_WARNING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_NARROW_RIGHT.poiType -> TYPE_USECASE_ID_NARROW_RIGHT.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_GAS_STATION.poiType -> TYPE_USECASE_ID_GAS_STATION.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ACCIDENT.poiType -> TYPE_USECASE_ID_ACCIDENT.poiTypeSrcVr
|
||||
|
||||
else -> {
|
||||
R.drawable.icon_default
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//===================告警类事件===================
|
||||
|
||||
//===================告警类事件===================
|
||||
@JvmStatic
|
||||
fun getWarningIcon(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
@@ -658,22 +879,51 @@ enum class EventTypeEnumNew(
|
||||
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.poiTypeSrcVr
|
||||
TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.poiTypeSrcVr
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.poiTypeSrcVr
|
||||
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.poiTypeSrcVr
|
||||
GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeSrcVr
|
||||
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeSrcVr
|
||||
|
||||
TYPE_USECASE_ID_IVP_RED.poiType -> TYPE_USECASE_ID_IVP_RED.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.poiTypeSrcVr
|
||||
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType -> TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType -> TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiTypeSrcVr
|
||||
TYPE_ERROR_WEAKNESS.poiType -> TYPE_ERROR_WEAKNESS.poiTypeSrcVr
|
||||
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType -> TYPE_USECASE_ID_BREAKDOWN_WARNING.poiTypeSrcVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_PARKING.poiType -> TYPE_USECASE_ID_ROAD_PARKING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType -> TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiTypeSrcVr
|
||||
TYPE_ID_SHAPR_TURNS.poiType -> TYPE_ID_SHAPR_TURNS.poiTypeSrcVr
|
||||
TYPE_ID_BRIDGE.poiType -> TYPE_ID_BRIDGE.poiTypeSrcVr
|
||||
TYPE_ID_PEDESTRIAN.poiType -> TYPE_ID_PEDESTRIAN.poiTypeSrcVr
|
||||
TYPE_ID_SLIPPERY_ROAD.poiType -> TYPE_ID_SLIPPERY_ROAD.poiTypeSrcVr
|
||||
TYPE_ID_TUNNEL.poiType -> TYPE_ID_TUNNEL.poiTypeSrcVr
|
||||
TYPE_ID_FERRY.poiType -> TYPE_ID_FERRY.poiTypeSrcVr
|
||||
TYPE_ID_UNEVEN_ROAD.poiType -> TYPE_ID_UNEVEN_ROAD.poiTypeSrcVr
|
||||
TYPE_ID_NON_MOTOR_VEHICLE.poiType -> TYPE_ID_NON_MOTOR_VEHICLE.poiTypeSrcVr
|
||||
TYPE_ID_OBSTACLE.poiType -> TYPE_ID_OBSTACLE.poiTypeSrcVr
|
||||
TYPE_FOURS_ROAD_WORK.poiType -> TYPE_FOURS_ROAD_WORK.poiTypeSrcVr
|
||||
TYPE_VEHICLE_QUEUE.poiType -> TYPE_VEHICLE_QUEUE.poiTypeSrcVr
|
||||
TYPE_NO_PASSING.poiType -> TYPE_NO_PASSING.poiTypeSrcVr
|
||||
TYPE_NO_TURNING_AROUND.poiType -> TYPE_NO_TURNING_AROUND.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType -> TYPE_USECASE_ID_ROAD_NO_TOOTING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType -> TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_BUS_WARNING.poiType -> TYPE_USECASE_ID_BUS_WARNING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_NARROW_RIGHT.poiType -> TYPE_USECASE_ID_NARROW_RIGHT.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_GAS_STATION.poiType -> TYPE_USECASE_ID_GAS_STATION.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ACCIDENT.poiType -> TYPE_USECASE_ID_ACCIDENT.poiTypeSrcVr
|
||||
|
||||
else -> TYPE_ERROR.poiTypeSrcVr
|
||||
}
|
||||
}
|
||||
@@ -690,23 +940,53 @@ enum class EventTypeEnumNew(
|
||||
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.content
|
||||
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.content
|
||||
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.content
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.content
|
||||
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.content
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.content
|
||||
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.content
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.content
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.content
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.content
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.content
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.content
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.content
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.content
|
||||
TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.content
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content
|
||||
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.content
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.content
|
||||
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.content
|
||||
GHOST_PROBE.poiType -> GHOST_PROBE.content
|
||||
|
||||
TYPE_USECASE_ID_IVP_RED.poiType -> TYPE_USECASE_ID_IVP_RED.content
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.content
|
||||
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.content
|
||||
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType -> TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.content
|
||||
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType -> TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.content
|
||||
TYPE_ERROR_WEAKNESS.poiType -> TYPE_ERROR_WEAKNESS.content
|
||||
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.content
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.content
|
||||
TYPE_FOURS_ROAD_WORK.poiType -> TYPE_FOURS_ROAD_WORK.content
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.content
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.content
|
||||
TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType -> TYPE_USECASE_ID_BREAKDOWN_WARNING.content
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.content
|
||||
TYPE_USECASE_ID_ROAD_PARKING.poiType -> TYPE_USECASE_ID_ROAD_PARKING.content
|
||||
TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType -> TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.content
|
||||
TYPE_ID_SHAPR_TURNS.poiType -> TYPE_ID_SHAPR_TURNS.content
|
||||
TYPE_ID_BRIDGE.poiType -> TYPE_ID_BRIDGE.content
|
||||
TYPE_ID_PEDESTRIAN.poiType -> TYPE_ID_PEDESTRIAN.content
|
||||
TYPE_ID_SLIPPERY_ROAD.poiType -> TYPE_ID_SLIPPERY_ROAD.content
|
||||
TYPE_ID_TUNNEL.poiType -> TYPE_ID_TUNNEL.content
|
||||
TYPE_ID_FERRY.poiType -> TYPE_ID_FERRY.content
|
||||
TYPE_ID_UNEVEN_ROAD.poiType -> TYPE_ID_UNEVEN_ROAD.content
|
||||
TYPE_ID_NON_MOTOR_VEHICLE.poiType -> TYPE_ID_NON_MOTOR_VEHICLE.content
|
||||
TYPE_ID_OBSTACLE.poiType -> TYPE_ID_OBSTACLE.content
|
||||
TYPE_FOURS_ROAD_WORK.poiType -> TYPE_FOURS_ROAD_WORK.content
|
||||
TYPE_VEHICLE_QUEUE.poiType -> TYPE_VEHICLE_QUEUE.content
|
||||
TYPE_NO_PASSING.poiType -> TYPE_NO_PASSING.content
|
||||
TYPE_NO_TURNING_AROUND.poiType -> TYPE_NO_TURNING_AROUND.content
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.content
|
||||
TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType -> TYPE_USECASE_ID_ROAD_NO_TOOTING.content
|
||||
TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType -> TYPE_USECASE_ID_ROAD_SPEED_LIMIT.content
|
||||
TYPE_USECASE_ID_BUS_WARNING.poiType -> TYPE_USECASE_ID_BUS_WARNING.content
|
||||
TYPE_USECASE_ID_NARROW_RIGHT.poiType -> TYPE_USECASE_ID_NARROW_RIGHT.content
|
||||
TYPE_USECASE_ID_GAS_STATION.poiType -> TYPE_USECASE_ID_GAS_STATION.content
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.content
|
||||
TYPE_USECASE_ID_ACCIDENT.poiType -> TYPE_USECASE_ID_ACCIDENT.content
|
||||
|
||||
else -> TYPE_ERROR.content
|
||||
}
|
||||
}
|
||||
@@ -723,23 +1003,53 @@ enum class EventTypeEnumNew(
|
||||
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.tts
|
||||
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.tts
|
||||
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.tts
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.tts
|
||||
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.tts
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.tts
|
||||
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.tts
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.tts
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.tts
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.tts
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.tts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.tts
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.tts
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.tts
|
||||
TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.tts
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts
|
||||
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.tts
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.tts
|
||||
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.tts
|
||||
GHOST_PROBE.poiType -> GHOST_PROBE.tts
|
||||
|
||||
TYPE_USECASE_ID_IVP_RED.poiType -> TYPE_USECASE_ID_IVP_RED.tts
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.tts
|
||||
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.tts
|
||||
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType -> TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.tts
|
||||
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType -> TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.tts
|
||||
TYPE_ERROR_WEAKNESS.poiType -> TYPE_ERROR_WEAKNESS.tts
|
||||
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.tts
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.tts
|
||||
TYPE_FOURS_ROAD_WORK.poiType -> TYPE_FOURS_ROAD_WORK.tts
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.tts
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.tts
|
||||
TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType -> TYPE_USECASE_ID_BREAKDOWN_WARNING.tts
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.tts
|
||||
TYPE_USECASE_ID_ROAD_PARKING.poiType -> TYPE_USECASE_ID_ROAD_PARKING.tts
|
||||
TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType -> TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.tts
|
||||
TYPE_ID_SHAPR_TURNS.poiType -> TYPE_ID_SHAPR_TURNS.tts
|
||||
TYPE_ID_BRIDGE.poiType -> TYPE_ID_BRIDGE.tts
|
||||
TYPE_ID_PEDESTRIAN.poiType -> TYPE_ID_PEDESTRIAN.tts
|
||||
TYPE_ID_SLIPPERY_ROAD.poiType -> TYPE_ID_SLIPPERY_ROAD.tts
|
||||
TYPE_ID_TUNNEL.poiType -> TYPE_ID_TUNNEL.tts
|
||||
TYPE_ID_FERRY.poiType -> TYPE_ID_FERRY.tts
|
||||
TYPE_ID_UNEVEN_ROAD.poiType -> TYPE_ID_UNEVEN_ROAD.tts
|
||||
TYPE_ID_NON_MOTOR_VEHICLE.poiType -> TYPE_ID_NON_MOTOR_VEHICLE.tts
|
||||
TYPE_ID_OBSTACLE.poiType -> TYPE_ID_OBSTACLE.tts
|
||||
TYPE_FOURS_ROAD_WORK.poiType -> TYPE_FOURS_ROAD_WORK.tts
|
||||
TYPE_VEHICLE_QUEUE.poiType -> TYPE_VEHICLE_QUEUE.tts
|
||||
TYPE_NO_PASSING.poiType -> TYPE_NO_PASSING.tts
|
||||
TYPE_NO_TURNING_AROUND.poiType -> TYPE_NO_TURNING_AROUND.tts
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.tts
|
||||
TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType -> TYPE_USECASE_ID_ROAD_NO_TOOTING.tts
|
||||
TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType -> TYPE_USECASE_ID_ROAD_SPEED_LIMIT.tts
|
||||
TYPE_USECASE_ID_BUS_WARNING.poiType -> TYPE_USECASE_ID_BUS_WARNING.tts
|
||||
TYPE_USECASE_ID_NARROW_RIGHT.poiType -> TYPE_USECASE_ID_NARROW_RIGHT.tts
|
||||
TYPE_USECASE_ID_GAS_STATION.poiType -> TYPE_USECASE_ID_GAS_STATION.tts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.tts
|
||||
TYPE_USECASE_ID_ACCIDENT.poiType -> TYPE_USECASE_ID_ACCIDENT.tts
|
||||
|
||||
else -> TYPE_ERROR.tts
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user