Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into mutidev_robotaxi-d-app-module_2130_221116_2.13.0_multi_display
# Conflicts: # gradle.properties
This commit is contained in:
@@ -160,6 +160,7 @@ public class BusPassengerModel {
|
||||
|| data.getResult() == null
|
||||
|| data.getResult().getSites() == null) {
|
||||
routesResult = null;
|
||||
mNextStationIndex = 0;
|
||||
startOrStopCalculateRouteInfo(false);
|
||||
if (mRouteLineInfoCallback != null){
|
||||
mRouteLineInfoCallback.showNoTaskView();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
@@ -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,6 +441,7 @@ public class BusOrderModel {
|
||||
clearAutopilotControlParameters();
|
||||
closeBeautificationMode();
|
||||
clearStartAutopilotTag();
|
||||
removeTipRunnables();
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "获取到小巴路线数据: " + data);
|
||||
@@ -644,22 +647,23 @@ 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 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);
|
||||
}
|
||||
}
|
||||
@@ -1012,13 +1016,10 @@ public class BusOrderModel {
|
||||
}
|
||||
|
||||
if (isArrivedStation) return;
|
||||
isArrivedStation = true;
|
||||
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-当前==backgroundCurrentStationIndex="
|
||||
+ backgroundCurrentStationIndex);
|
||||
|
||||
isGoingToNextStation = false;
|
||||
|
||||
arriveSiteStation();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,21 +38,21 @@ 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){
|
||||
CallerLogger.INSTANCE.e( M_BUS + "triggerStartAutopilotFailureEvent", 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);
|
||||
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_CODE, failCode);
|
||||
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_MSG, failMsg);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -29,6 +29,7 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
|
||||
private boolean isAutopilotAbility = true;
|
||||
private String autopilotAbilityReason = "";
|
||||
private String startFailedCode = "";
|
||||
private String startFailedMessage = "";
|
||||
|
||||
private OchAdasStartFailureCallback failureCallback = null;
|
||||
@@ -57,6 +58,10 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
|
||||
return autopilotAbilityReason;
|
||||
}
|
||||
|
||||
public String getStartFailedCode() {
|
||||
return startFailedCode;
|
||||
}
|
||||
|
||||
public String getStartFailedMessage() {
|
||||
return startFailedMessage;
|
||||
}
|
||||
@@ -112,9 +117,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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -36,12 +36,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,9 +51,10 @@ public class TaxiAnalyticsManager {
|
||||
}
|
||||
}
|
||||
|
||||
private void triggerStartAutopilotFailureEvent(String failMsg){
|
||||
private void triggerStartAutopilotFailureEvent(String failCode, String failMsg){
|
||||
CallerLogger.INSTANCE.e(M_TAXI + "triggerStartAutopilotFailureEvent", failMsg);
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_RESULT, false);
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_CODE, failCode);
|
||||
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_MSG,
|
||||
failMsg);
|
||||
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
|
||||
|
||||
@@ -201,6 +201,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 {
|
||||
|
||||
@@ -76,6 +76,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)
|
||||
DebugConfig.setMultiDisplay(BuildConfig.IS_MULTI_DISPLAY)
|
||||
|
||||
|
||||
@@ -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,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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -60,8 +61,8 @@ 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
|
||||
@@ -98,6 +99,7 @@ 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.*
|
||||
@@ -1372,12 +1374,26 @@ 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) {
|
||||
if (HmiBuildConfig.isShowTurnLightView) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
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
|
||||
|
||||
@@ -73,13 +73,11 @@ 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.*
|
||||
@@ -1145,7 +1143,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
* 限速数据,优先使用obu,默认打开
|
||||
*/
|
||||
tbRoadLimitSpeed.setOnCheckedChangeListener { _, isChecked ->
|
||||
HmiBuildConfig.isShowObuLimitSpeedView = !isChecked
|
||||
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1691,8 +1689,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}"
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -94,6 +95,11 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
tbRoadLimitSpeedSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
//默认关闭
|
||||
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
|
||||
}
|
||||
|
||||
//红绿灯标识
|
||||
tbTrafficLight.isChecked = HmiBuildConfig.isShowTrafficLightView
|
||||
tbTrafficLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -167,12 +167,24 @@
|
||||
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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -372,13 +372,12 @@ class MogoPrivateObuManager private constructor() {
|
||||
|
||||
when (status) {
|
||||
// 添加
|
||||
ObuConstants.STATUS.ADD,
|
||||
ObuConstants.STATUS.UPDATE// 更新
|
||||
-> {
|
||||
//显示警告红边 TODO 需要确定是什么值
|
||||
// CallerHmiManager.showWarning(direction)
|
||||
|
||||
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,
|
||||
@@ -401,6 +400,12 @@ class MogoPrivateObuManager private constructor() {
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
}
|
||||
|
||||
ObuConstants.STATUS.UPDATE -> {
|
||||
//显示警告红边 TODO 需要确定是什么值
|
||||
// CallerHmiManager.showWarning(direction)
|
||||
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.invokeTrackerWarningInfo(it)
|
||||
@@ -408,6 +413,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
// 删除
|
||||
ObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
@@ -500,12 +506,14 @@ class MogoPrivateObuManager private constructor() {
|
||||
|
||||
when (info.status) {
|
||||
// 添加
|
||||
ObuConstants.STATUS.ADD,
|
||||
ObuConstants.STATUS.UPDATE// 更新
|
||||
-> {
|
||||
// if (level == 2 || level == 3) { //不考虑level
|
||||
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,
|
||||
@@ -529,6 +537,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
5000L
|
||||
)
|
||||
// }
|
||||
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.invokeTrackerWarningInfo(it)
|
||||
@@ -536,6 +545,10 @@ class MogoPrivateObuManager private constructor() {
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
ObuConstants.STATUS.UPDATE -> {
|
||||
}
|
||||
|
||||
// 删除
|
||||
ObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
@@ -721,6 +734,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 +811,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 +947,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
|
||||
@@ -252,27 +253,27 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
MogoObuConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
when (data.warningMsg[0].eventSerialNum) {
|
||||
MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
appId = V2iEventTypeEnum.FOURS_PONDING.poiType
|
||||
appId = EventTypeEnumNew.FOURS_PONDING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
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
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
appId =
|
||||
V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
}
|
||||
}
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
@@ -289,80 +290,80 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
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
|
||||
appId = EventTypeEnumNew.TYPE_ID_SHAPR_TURNS.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
appId = V2iEventTypeEnum.TYPE_ID_BRIDGE.poiType
|
||||
appId = EventTypeEnumNew.TYPE_ID_BRIDGE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
appId = V2iEventTypeEnum.TYPE_ID_PEDESTRIAN.poiType
|
||||
appId = EventTypeEnumNew.TYPE_ID_PEDESTRIAN.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
appId = V2iEventTypeEnum.TYPE_ID_SLIPPERY_ROAD.poiType
|
||||
appId = EventTypeEnumNew.TYPE_ID_SLIPPERY_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
appId = V2iEventTypeEnum.TYPE_ID_TUNNEL.poiType
|
||||
appId = EventTypeEnumNew.TYPE_ID_TUNNEL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
appId = V2iEventTypeEnum.TYPE_ID_FERRY.poiType
|
||||
appId = EventTypeEnumNew.TYPE_ID_FERRY.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
appId = V2iEventTypeEnum.TYPE_ID_UNEVEN_ROAD.poiType
|
||||
appId = EventTypeEnumNew.TYPE_ID_UNEVEN_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
appId = V2iEventTypeEnum.TYPE_ID_NON_MOTOR_VEHICLE.poiType
|
||||
appId = EventTypeEnumNew.TYPE_ID_NON_MOTOR_VEHICLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
appId = V2iEventTypeEnum.TYPE_ID_OBSTACLE.poiType
|
||||
appId = EventTypeEnumNew.TYPE_ID_OBSTACLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
appId = V2iEventTypeEnum.TYPE_FOURS_ROAD_WORK.poiType
|
||||
appId = EventTypeEnumNew.TYPE_FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
appId = V2iEventTypeEnum.TYPE_VEHICLE_QUEUE.poiType
|
||||
appId = EventTypeEnumNew.TYPE_VEHICLE_QUEUE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
appId = V2iEventTypeEnum.TYPE_NO_PASSING.poiType
|
||||
appId = EventTypeEnumNew.TYPE_NO_PASSING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
appId = V2iEventTypeEnum.TYPE_NO_TURNING_AROUND.poiType
|
||||
appId = EventTypeEnumNew.TYPE_NO_TURNING_AROUND.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
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
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BUS_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_NARROW_RIGHT.poiType
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_NARROW_RIGHT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_GAS_STATION.poiType
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_GAS_STATION.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
appId =
|
||||
V2iEventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_ACCIDENT.poiType
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ACCIDENT.poiType
|
||||
}
|
||||
}
|
||||
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //标牌是没有影响范围的
|
||||
alertContent,
|
||||
Math.round(data.warningMsg[0].distance).toString()
|
||||
@@ -375,10 +376,10 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
|
||||
// 拥堵
|
||||
MogoObuConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
appId = V2iEventTypeEnum.TYPE_USECASE_ID_TJW.poiType
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_TJW.poiType
|
||||
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsg[0].distance).toString(),
|
||||
@@ -393,20 +394,23 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
|
||||
//限速预警, ADD处理一次
|
||||
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
alertContent = V2iEventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = V2iEventTypeEnum.getWarningTts(appId)
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
}
|
||||
}
|
||||
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_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()}"
|
||||
"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)
|
||||
//不显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuNewMana1", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
@@ -483,25 +487,25 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
var v2xType = ""
|
||||
if (data.participant.ptcType == 1) { //机动车
|
||||
v2xType =
|
||||
EventTypeEnumWeaknessTraffic.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
|
||||
} else if (data.participant.ptcType == 2) { //非机动车
|
||||
v2xType =
|
||||
EventTypeEnumWeaknessTraffic.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
|
||||
} else if (data.participant.ptcType == 3) { //行人
|
||||
v2xType =
|
||||
EventTypeEnumWeaknessTraffic.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
} else { //未知
|
||||
v2xType = EventTypeEnumWeaknessTraffic.TYPE_ERROR.poiType
|
||||
v2xType = EventTypeEnumNew.TYPE_ERROR.poiType
|
||||
}
|
||||
val ttsContent = EventTypeEnumWeaknessTraffic.getWarningTts(v2xType)
|
||||
val ttsContent = EventTypeEnumNew.getWarningTts(v2xType)
|
||||
val alertContent =
|
||||
EventTypeEnumWeaknessTraffic.getWarningContent(v2xType)
|
||||
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}",
|
||||
"onMogoObuRsmWarning ---status---> ${data.status} ---data.warningMsg.warningData[0].status = ${data.warningMsg.warningData[0].status}"
|
||||
"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) {
|
||||
@@ -509,6 +513,9 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
// if (level == 2 || level == 3) { //不考虑level
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-PriObuNewMana2", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
@@ -735,9 +742,12 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
MogoObuConstants.STATUS.UPDATE -> {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
|
||||
"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(
|
||||
@@ -818,12 +828,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
|
||||
|
||||
/**
|
||||
* 修改红绿灯
|
||||
@@ -846,60 +860,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${MogoObuConst.TAG_MOGO_NEW_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${MogoObuConst.TAG_MOGO_NEW_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,
|
||||
|
||||
@@ -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,6 @@ object HmiBuildConfig {
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowObuLimitSpeedView = true
|
||||
var isShowObuLimitSpeedView = false
|
||||
|
||||
}
|
||||
@@ -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,66 @@ enum class EventTypeEnumNew(
|
||||
ALERT_CAR_TROUBLE_WARNING.poiType -> {
|
||||
R.drawable.icon_car_red
|
||||
}
|
||||
|
||||
//闯红灯预警
|
||||
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 -> 0
|
||||
}
|
||||
}
|
||||
|
||||
//===================告警类事件===================
|
||||
|
||||
//===================告警类事件===================
|
||||
@JvmStatic
|
||||
fun getWarningIcon(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
@@ -658,22 +877,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 +938,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 +1001,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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
package com.mogo.eagle.core.data.enums
|
||||
|
||||
import com.mogo.eagle.core.data.R
|
||||
|
||||
|
||||
/**
|
||||
* 交通信号灯
|
||||
*/
|
||||
enum class EventTypeEnumTrafficLight(
|
||||
val poiType: String, val poiTypeStr: String = "",
|
||||
val poiTypeStrVr: String = "",
|
||||
val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo,
|
||||
val content: String = "", val tts: String = ""
|
||||
) {
|
||||
|
||||
TYPE_USECASE_ID_IVP_RED(
|
||||
0x1.toString(),
|
||||
"闯红灯预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_red,
|
||||
content = "路口红灯,禁止通行",
|
||||
tts = "路口红灯,禁止通行"
|
||||
),
|
||||
TYPE_USECASE_ID_IVP_GREEN(
|
||||
0x2.toString(),
|
||||
"绿波通行",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_green,
|
||||
content = "建议车速 %s KM/H",
|
||||
tts = "建议车速 %s KM/H"
|
||||
),
|
||||
|
||||
TYPE_ERROR(
|
||||
0.toString(),
|
||||
"未知/错误/异常",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content = "",
|
||||
tts = ""
|
||||
);
|
||||
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun getWarningIcon(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
TYPE_USECASE_ID_IVP_RED.poiType -> TYPE_USECASE_ID_IVP_RED.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.poiTypeSrcVr
|
||||
|
||||
else -> TYPE_ERROR.poiTypeSrcVr
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningContent(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
TYPE_USECASE_ID_IVP_RED.poiType -> TYPE_USECASE_ID_IVP_RED.content
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.content
|
||||
|
||||
else -> TYPE_ERROR.content
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningTts(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
TYPE_USECASE_ID_IVP_RED.poiType -> TYPE_USECASE_ID_IVP_RED.tts
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.tts
|
||||
else -> TYPE_ERROR.tts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
package com.mogo.eagle.core.data.enums
|
||||
|
||||
import com.mogo.eagle.core.data.R
|
||||
|
||||
|
||||
/**
|
||||
* 弱势交通分类
|
||||
*/
|
||||
enum class EventTypeEnumWeaknessTraffic(
|
||||
val poiType: String, val poiTypeStr: String = "",
|
||||
val poiTypeStrVr: String = "",
|
||||
val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo,
|
||||
val content: String = "", val tts: String = ""
|
||||
) {
|
||||
|
||||
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES(
|
||||
1.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_motorcycle_collision,
|
||||
content = "注意机动车",
|
||||
tts = "注意机动车"
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES(
|
||||
2.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_motobike,
|
||||
content = "注意非机动车",
|
||||
tts = "注意非机动车"
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_PERSON(
|
||||
3.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content = "注意行人",
|
||||
tts = "注意行人"
|
||||
),
|
||||
|
||||
TYPE_ERROR(
|
||||
0.toString(),
|
||||
"未知/错误/异常",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content = "前方有未知障碍物",
|
||||
tts = "前方有未知障碍物"
|
||||
);
|
||||
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun getWarningIcon(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
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
|
||||
|
||||
else -> TYPE_ERROR.poiTypeSrcVr
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningContent(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
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
|
||||
else -> TYPE_ERROR.content
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningTts(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
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
|
||||
else -> TYPE_ERROR.tts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,410 +0,0 @@
|
||||
package com.mogo.eagle.core.data.enums
|
||||
|
||||
import com.mogo.eagle.core.data.R
|
||||
|
||||
/**
|
||||
* OBU、V2i事件类型枚举类
|
||||
*/
|
||||
enum class V2iEventTypeEnum(
|
||||
val poiType: String, val poiTypeStr: String = "",
|
||||
val poiTypeStrVr: String = "",
|
||||
val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo,
|
||||
val content: String = "", val tts: String = ""
|
||||
) {
|
||||
|
||||
//-----------道路危险情况预警 start --------------->
|
||||
TYPE_USECASE_ID_BREAKDOWN_WARNING( //故障车辆
|
||||
101.toString(),
|
||||
"车辆故障",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
content = "前方%s米有故障车辆,影响路段%s米",
|
||||
tts = "前方%s米有故障车辆,影响路段%s米"
|
||||
),
|
||||
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 = "前方%s米超速行驶,影响路段%s米",
|
||||
tts = "前方%s米超速行驶,影响路段%s米"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE( //车辆逆行
|
||||
904.toString(),
|
||||
"逆行车辆",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_school,
|
||||
content = "前方%s米逆行车辆,影响路段%s米",
|
||||
tts = "前方%s米逆行车辆,影响路段%s米"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_SPEED_LIMIT(
|
||||
1.toString(),
|
||||
"超速",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_over_speed,
|
||||
content = "您已超速,请减速行驶",
|
||||
tts = "您已超速,请减速行驶"
|
||||
),
|
||||
|
||||
//------------道路危险情况预警 end ----------->
|
||||
|
||||
//------------车内标牌 start -------------->
|
||||
// TYPE_ID_NTERSECTION(
|
||||
// 1.toString(),
|
||||
// "十字路口",
|
||||
// poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
|
||||
// content = "前方%s米十字路口,影响路段%s米",
|
||||
// tts = "前方%s米十字路口,影响路段%s米"
|
||||
// ),
|
||||
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_tramcar,
|
||||
content = "前方%s米桥梁",
|
||||
tts = "前方%s米桥梁"
|
||||
),
|
||||
TYPE_ID_PEDESTRIAN(
|
||||
10.toString(),
|
||||
"行人",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content = "前方%s米行人",
|
||||
tts = "前方%s米行人"
|
||||
),
|
||||
TYPE_ID_SLIPPERY_ROAD(
|
||||
17.toString(),
|
||||
"路滑",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
|
||||
content = "前方%s米路滑",
|
||||
tts = "前方%s米路滑"
|
||||
),
|
||||
TYPE_ID_TUNNEL(
|
||||
21.toString(),
|
||||
"隧道",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
|
||||
content = "前方%s米隧道",
|
||||
tts = "前方%s米隧道"
|
||||
),
|
||||
TYPE_ID_FERRY(
|
||||
22.toString(),
|
||||
"渡轮",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
|
||||
content = "前方%s米渡轮",
|
||||
tts = "前方%s米渡轮"
|
||||
),
|
||||
TYPE_ID_UNEVEN_ROAD(
|
||||
24.toString(),
|
||||
"路面不平",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
|
||||
content = "前方%s米路面不平",
|
||||
tts = "前方%s米路面不平"
|
||||
),
|
||||
TYPE_ID_NON_MOTOR_VEHICLE(
|
||||
32.toString(),
|
||||
"非机动车",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
|
||||
content = "前方%s米有非机动车",
|
||||
tts = "前方%s米有非机动车"
|
||||
),
|
||||
TYPE_ID_OBSTACLE(
|
||||
36.toString(),
|
||||
"障碍",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
|
||||
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_warning_v2x_road_construction,
|
||||
content = "前方%s米车队",
|
||||
tts = "前方%s米车队"
|
||||
),
|
||||
TYPE_NO_PASSING(
|
||||
51.toString(),
|
||||
"不通",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_road_construction,
|
||||
content = "前方%s米不通",
|
||||
tts = "前方%s米不通"
|
||||
),
|
||||
TYPE_NO_TURNING_AROUND(
|
||||
75.toString(),
|
||||
"禁止掉头",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_road_construction,
|
||||
content = "前方%s米禁止掉头",
|
||||
tts = "前方%s米禁止掉头"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING(
|
||||
78.toString(),
|
||||
"禁止停车",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking,
|
||||
content = "前方%s米禁止停车",
|
||||
tts = "前方%s米禁止停车"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_NO_TOOTING(
|
||||
80.toString(),
|
||||
"禁止鸣笛",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking,
|
||||
content = "前方%s米禁止鸣笛",
|
||||
tts = "前方%s米禁止鸣笛"
|
||||
),
|
||||
|
||||
// TYPE_USECASE_ID_GO_STRAIGHT_TURN_RIGHT(
|
||||
// 100.toString(),
|
||||
// "直行或右转",
|
||||
// poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking,
|
||||
// content = "前方%s米直行或右转",
|
||||
// tts = "前方%s米直行或右转"
|
||||
// ),
|
||||
TYPE_USECASE_ID_BUS_WARNING(
|
||||
123.toString(),
|
||||
"公交提醒",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking,
|
||||
content = "前方%s米公交提醒",
|
||||
tts = "前方%s米公交提醒"
|
||||
),
|
||||
TYPE_USECASE_ID_NARROW_RIGHT(
|
||||
163.toString(),
|
||||
"右侧变窄/车道数减少",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking,
|
||||
content = "前方%s米右侧变窄/车道数减少",
|
||||
tts = "前方%s米右侧变窄/车道数减少"
|
||||
),
|
||||
TYPE_USECASE_ID_GAS_STATION(
|
||||
201.toString(),
|
||||
"加油站",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking,
|
||||
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.icon_warning_v2x_school,
|
||||
content = "前方%s米事故",
|
||||
tts = "前方%s米事故"
|
||||
),
|
||||
|
||||
//------------车内标牌 end -------------->
|
||||
|
||||
TYPE_USECASE_ID_IVP(
|
||||
0x2.toString(),
|
||||
"闯红灯预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_red,
|
||||
content = "路口红灯,禁止通行",
|
||||
tts = "路口红灯,禁止通行"
|
||||
),
|
||||
TYPE_USECASE_ID_IVP_GREEN(
|
||||
0x2B091.toString(),
|
||||
"绿波通行",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_green,
|
||||
content = "建议车速 %s KM/H",
|
||||
tts = "建议车速 %s KM/H"
|
||||
),
|
||||
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING(
|
||||
0x2C04.toString(),
|
||||
"人行横道",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content = "注意前方人行横道",
|
||||
tts = "前方人行横道,减速慢行"
|
||||
),
|
||||
|
||||
TYPE_ERROR(
|
||||
0.toString(),
|
||||
"未知/错误/异常",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content = "",
|
||||
tts = ""
|
||||
),
|
||||
|
||||
TYPE_VIP_IDENTIFICATION("10022", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行", "已为您变灯,请优先通行"),
|
||||
TYPE_OPTIMAL_ROUTE_RECOMMEND("2000", "", "", R.drawable.icon_warning_v2x_optimal_route, "为您推荐最优路线", "已为您选择最优路线");
|
||||
|
||||
|
||||
companion object {
|
||||
//===================告警类事件===================
|
||||
|
||||
@JvmStatic
|
||||
fun getTts(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
TYPE_FOURS_ROAD_WORK.poiType -> TYPE_FOURS_ROAD_WORK.tts
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningIcon(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.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_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.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_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.poiTypeSrcVr
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.poiTypeSrcVr
|
||||
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.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_NTERSECTION.poiType -> TYPE_ID_NTERSECTION.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_GO_STRAIGHT_TURN_RIGHT.poiType -> TYPE_USECASE_ID_GO_STRAIGHT_TURN_RIGHT.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
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningContent(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.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_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.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_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.content
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.content
|
||||
TYPE_FOURS_ROAD_WORK.poiType -> TYPE_FOURS_ROAD_WORK.content
|
||||
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.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_NTERSECTION.poiType -> TYPE_ID_NTERSECTION.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_GO_STRAIGHT_TURN_RIGHT.poiType -> TYPE_USECASE_ID_GO_STRAIGHT_TURN_RIGHT.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
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningTts(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.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_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.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_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.tts
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.tts
|
||||
TYPE_FOURS_ROAD_WORK.poiType -> TYPE_FOURS_ROAD_WORK.tts
|
||||
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.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_NTERSECTION.poiType -> TYPE_ID_NTERSECTION.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_GO_STRAIGHT_TURN_RIGHT.poiType -> TYPE_USECASE_ID_GO_STRAIGHT_TURN_RIGHT.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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.mogo.eagle.core.data.map.entity;
|
||||
import android.text.TextUtils;
|
||||
|
||||
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -54,6 +56,33 @@ public class V2XRoadEventEntity implements Serializable {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public String getTts(boolean haveLiveCar) {
|
||||
if (EventTypeEnum.GHOST_PROBE.getPoiType().equals(poiType)) {
|
||||
tts = EventTypeEnum.GHOST_PROBE.getTts();
|
||||
return tts;
|
||||
}
|
||||
tts = "前方#" + (int) getDistance() + "米#";
|
||||
tts += EventTypeEnum.getTts(getPoiType());
|
||||
if (haveLiveCar) {
|
||||
tts += ",查看实况请说确定。";
|
||||
setShowEventButton(true);
|
||||
} else {
|
||||
tts += ",请注意躲避。";
|
||||
setShowEventButton(false);
|
||||
}
|
||||
return tts;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测到附近#道路施工#,确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。
|
||||
*/
|
||||
public String getTtsWithFeedback() {
|
||||
tts = "检测到附近";
|
||||
tts += EventTypeEnum.getTtsWithFeedback(getPoiType());
|
||||
tts += ",确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。";
|
||||
return tts;
|
||||
}
|
||||
|
||||
public String getTts() {
|
||||
return tts;
|
||||
}
|
||||
@@ -70,7 +99,8 @@ public class V2XRoadEventEntity implements Serializable {
|
||||
isShowEventButton = showEventButton;
|
||||
}
|
||||
|
||||
public String getAlarmContent(){ //todo 缺少
|
||||
public String getAlarmContent() {
|
||||
alarmContent = EventTypeEnum.getAlarmContent(getPoiType());
|
||||
return alarmContent;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,9 +90,4 @@ public interface IMogoMapService extends IProvider {
|
||||
*/
|
||||
IMogoTrafficSearch getTrafficSearchApi();
|
||||
|
||||
/**
|
||||
* 获取地图版本号
|
||||
* @return
|
||||
*/
|
||||
String getMapVersion();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.*
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleOwner
|
||||
import com.mogo.eagle.core.utilcode.kotlin.safeCancel
|
||||
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.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import kotlinx.coroutines.*
|
||||
@@ -199,30 +199,30 @@ object CallerVisualAngleManager {
|
||||
}
|
||||
val triggerTime = SystemClock.elapsedRealtime()
|
||||
scope.launch {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 1 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 1 ---")
|
||||
val displayed = getDisplayed()
|
||||
if (displayed == null) {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 2 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 2 ---")
|
||||
val top = getTop() //堆顶
|
||||
if (top != null) {
|
||||
if (top.target.priority >= scene.priority) {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 3 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 3 ---")
|
||||
top.triggerTime = triggerTime
|
||||
doChangeAngle(top)
|
||||
synchronized(heap){
|
||||
heap += Record(scene, triggerTime = -1)
|
||||
}
|
||||
} else {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 4 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 4 ---")
|
||||
doChangeAngle(Record(scene, triggerTime = triggerTime))
|
||||
}
|
||||
} else {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 4 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 4 ---")
|
||||
doChangeAngle(Record(scene, triggerTime = triggerTime))
|
||||
}
|
||||
} else {
|
||||
if (scene.javaClass == displayed.target.javaClass) {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 5 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 5 ---")
|
||||
defaultDelayJob?.safeCancel()
|
||||
return@launch
|
||||
}
|
||||
@@ -242,32 +242,32 @@ object CallerVisualAngleManager {
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
if (prev.priority >= scene.priority && (prev is RoadEvent || prev is TooClose)) {
|
||||
if (scene !is Default && prev.priority >= scene.priority && (prev is RoadEvent || prev is TooClose)) {
|
||||
val displayDuration = triggerTime - prevTriggerTime
|
||||
if (displayDuration < prev.displayThreshold) {
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
if (scene is Default) {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 6 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 6 ---")
|
||||
defaultDelayJob?.safeCancel()
|
||||
launch {
|
||||
val delay = scene.unit.toMillis(scene.delay)
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 7 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 7 ---")
|
||||
delay(delay)
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 8 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 8 ---")
|
||||
doChangeAngle(Record(scene, triggerTime = triggerTime))
|
||||
heap -= displayed
|
||||
}.also { itx ->
|
||||
itx.invokeOnCompletion {
|
||||
if (it is CancellationException) {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 9 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 9 ---")
|
||||
}
|
||||
}
|
||||
defaultDelayJob = itx
|
||||
}
|
||||
} else {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 10 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 10 ---")
|
||||
defaultDelayJob?.safeCancel()
|
||||
if (displayed.target.priority < scene.priority) {
|
||||
doChangeAngle(Record(scene, triggerTime = triggerTime))
|
||||
@@ -281,14 +281,14 @@ object CallerVisualAngleManager {
|
||||
private fun doChangeAngle(record: Record) {
|
||||
val angle = record.target.angle
|
||||
CallerMapUIServiceManager.getMapUIController()?.also {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${record.target} --- 13 ---")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${record.target} --- 13 ---")
|
||||
if (record.target !is Default) {
|
||||
record.isDisplay = true
|
||||
synchronized(heap) {
|
||||
heap += record
|
||||
}
|
||||
}
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "触发场景:${record.target} --- 15 ---> angle: $angle")
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${record.target} --- 15 ---> angle: $angle")
|
||||
it.changeMapVisualAngle(angle, null)
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -148,6 +148,26 @@ public class DebugConfig {
|
||||
return sSocketAppId;
|
||||
}
|
||||
|
||||
private static String mapVersion;
|
||||
|
||||
public static void setMapVersion(String mapVersion) {
|
||||
DebugConfig.mapVersion = mapVersion;
|
||||
}
|
||||
|
||||
public static String getMapVersion() {
|
||||
return mapVersion;
|
||||
}
|
||||
|
||||
private static String mapOptVersion;
|
||||
|
||||
public static void setMapOptVersion(String mapOptVersion) {
|
||||
DebugConfig.mapOptVersion = mapOptVersion;
|
||||
}
|
||||
|
||||
public static String getMapOptVersion() {
|
||||
return mapOptVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否需要实时上报坐标位置
|
||||
*/
|
||||
|
||||
@@ -86,7 +86,7 @@ MOGO_TELEMATIC_VERSION=1.4.3.27
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.8.0.7_map
|
||||
MAP_SDK_OPERATION_VERSION=1.1.3.5
|
||||
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
## 产品库必备配置,产品库自动对versionCode和versionName版本进行升级
|
||||
|
||||
@@ -171,12 +171,6 @@ public interface IMogoMap {
|
||||
*/
|
||||
IMogoPolyline addPolyline( MogoPolylineOptions options );
|
||||
|
||||
/**
|
||||
* 获取地图版本
|
||||
* @return
|
||||
*/
|
||||
String getMapVersion();
|
||||
|
||||
/**
|
||||
* 获取行驶方向一定长度的中心线
|
||||
* @param lon 经度
|
||||
|
||||
@@ -19,7 +19,6 @@ import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.SystemClock;
|
||||
import android.os.Trace;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
@@ -45,7 +44,6 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.listener.MogoMapListenerHandler;
|
||||
import com.mogo.map.navi.MogoCarLocationChangedListenerRegister;
|
||||
|
||||
@@ -302,11 +302,6 @@ public class AMapWrapper implements IMogoMap {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapVersion() {
|
||||
return MapAutoApi.INSTANCE.getSDKVersion();
|
||||
}
|
||||
|
||||
private boolean checkAMap() {
|
||||
mAMap = mMapView.getMapAutoViewHelper();
|
||||
sAMap = mAMap;
|
||||
|
||||
Reference in New Issue
Block a user