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:
donghongyu
2022-12-12 12:54:51 +08:00
52 changed files with 904 additions and 966 deletions

View File

@@ -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) {
}
}

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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;
}
}
}

View File

@@ -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")
})
}
}

View File

@@ -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,

View File

@@ -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

View File

@@ -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}"

View File

@@ -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 ->

View File

@@ -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>

View File

@@ -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"

View File

@@ -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);

View File

@@ -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,

View File

@@ -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
)
}
}
}
}

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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))
)