Merge branch 'dev_robotaxi-d-app-module_266_220425_2.6.6' into dev_robobus-d_220427_local
This commit is contained in:
@@ -73,6 +73,6 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
|
||||
if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) {
|
||||
CallerHmiManager.showLimitingVelocity(1)
|
||||
}
|
||||
CallerHmiManager.showWarningV2X(v2xType, alertContent, ttsContent, tag, null, true, 5000L)
|
||||
CallerHmiManager.showWarningV2X(v2xType.toString(), alertContent, ttsContent, tag, null, true, 5000L)
|
||||
}
|
||||
}
|
||||
@@ -464,14 +464,14 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
* @param v2xType V2X类型
|
||||
* @param poiType V2X类型
|
||||
* @param alertContent 提醒文本
|
||||
* @param ttsContent tts语音播报消息
|
||||
* @param tag tag绑定弹窗的标志
|
||||
*/
|
||||
@Synchronized
|
||||
override fun showWarningV2X(
|
||||
v2xType: Int,
|
||||
v2xType: String,
|
||||
alertContent: CharSequence?,
|
||||
ttsContent: String?,
|
||||
tag: String?,
|
||||
@@ -487,9 +487,9 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
if (floatWindow == null || TextUtils.isEmpty(showTag) || !floatWindow.isShow() || floatWindow.config.floatTag != tag) {
|
||||
// 代理View初始化了才可以弹窗
|
||||
mViewNotification?.let { notificationView ->
|
||||
notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType.toString()))
|
||||
notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType))
|
||||
val warningContent = alertContent
|
||||
?: EventTypeEnum.getWarningContent(v2xType.toString())
|
||||
?: EventTypeEnum.getWarningContent(v2xType)
|
||||
if (warningContent.isEmpty()) {
|
||||
CallerLogger.e("$M_HMI$TAG", "Show warningContent is null or empty!")
|
||||
return@launchWhenResumed
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo
|
||||
|
||||
import android.content.Context
|
||||
import android.telecom.Call
|
||||
import android.util.Log
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
@@ -346,7 +344,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
// CallerHmiManager.showWarning(direction)
|
||||
|
||||
//显示弹框,语音提示
|
||||
CallerHmiManager.showWarningV2X(appId.toInt(),
|
||||
CallerHmiManager.showWarningV2X(appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
@@ -456,7 +454,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
// if (level == 2 || level == 3) { //不考虑level
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerHmiManager.showWarningV2X(v2xType.toInt(),
|
||||
CallerHmiManager.showWarningV2X(v2xType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(v2xType + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
@@ -655,7 +653,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
CallerHmiManager.showWarningV2X(
|
||||
appId, alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(), null, true, 5000L
|
||||
)
|
||||
}
|
||||
@@ -722,7 +720,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
val maxSpeed = currentLight.glosa_suggested_speed_max.toInt()
|
||||
if (maxSpeed > 0) {
|
||||
CallerHmiManager.showWarningV2X(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType.toInt(),
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(),
|
||||
@@ -855,7 +853,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
)
|
||||
if (level == 2 || level == 3) {
|
||||
//显示弹框,语音提示
|
||||
CallerHmiManager.showWarningV2X(appId,
|
||||
CallerHmiManager.showWarningV2X(appId.toString(),
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.mogo.cloud.passport.IMoGoTokenCallback
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.network.ParamsUtil
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
@@ -19,7 +18,6 @@ import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
@@ -44,6 +42,9 @@ import com.mogo.eagle.core.function.v2x.events.scenario.impl.V2XScenarioManager
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.*
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceManager
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
@@ -60,13 +61,13 @@ import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.mogo.service.statusmanager.StatusDescriptor.ACC_STATUS
|
||||
import com.mogo.service.statusmanager.StatusDescriptor.SEEK_HELPING
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.v2x.V2XManager
|
||||
import com.mogo.v2x.callback.IV2XCallback
|
||||
import com.mogo.v2x.config.V2XConfig
|
||||
import com.mogo.v2x.data.V2XAdvanceWarning
|
||||
import com.mogo.v2x.data.V2XMarkerCardResult
|
||||
import com.mogo.v2x.data.V2XOptimalRoute
|
||||
import com.mogo.v2x.data.V2XWarningTarget
|
||||
import com.mogo.v2x.event.V2XEvent
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.cache.CacheFactory
|
||||
@@ -78,11 +79,10 @@ import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.android.asCoroutineDispatcher
|
||||
import tv.danmaku.ijk.media.player.IjkMediaPlayer
|
||||
import java.lang.Exception
|
||||
import java.lang.IllegalStateException
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
|
||||
object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallback,
|
||||
IMogoMapListener, IMogoStatusChangedListener {
|
||||
|
||||
@@ -433,7 +433,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
* V2XEvent事件回调
|
||||
*/
|
||||
override fun onAck(event: V2XEvent) {
|
||||
CallerLogger.d("$M_V2X$TAG", "OK->: ${event.javaClass.name}")
|
||||
CallerLogger.d("$M_V2X$TAG", "OK->: $event")
|
||||
when (event) {
|
||||
is V2XEvent.ForwardsWarning -> {
|
||||
handleAdvanceWarningEvent(event)
|
||||
@@ -449,10 +449,22 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
is V2XEvent.Road -> {
|
||||
handleRoadMarkerEvent(event.data)
|
||||
}
|
||||
else -> throw IllegalStateException("invalid event type for $event")
|
||||
is V2XEvent.Warning -> {
|
||||
handleWarningTargetEvent(event.data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleWarningTargetEvent(data: V2XWarningTarget) {
|
||||
val v2xMessageEntity = V2XMessageEntity<V2XWarningTarget>()
|
||||
v2xMessageEntity.type = V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS
|
||||
// 设置数据
|
||||
v2xMessageEntity.content = data
|
||||
val intent = Intent(BROADCAST_SCENE_HANDLER_ACTION)
|
||||
intent.putExtra(BROADCAST_SCENE_EXTRA_KEY, v2xMessageEntity)
|
||||
LocalBroadcastManager.getInstance(Utils.getApp()).sendBroadcast(intent)
|
||||
}
|
||||
|
||||
private fun handleRoadMarkerEvent(data: V2XMarkerCardResult) {
|
||||
try {
|
||||
BridgeApi.v2xStatus()?.let {
|
||||
@@ -546,7 +558,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
}
|
||||
// 显示弹框,语音提示
|
||||
CallerHmiManager.showWarningV2X(
|
||||
appId,
|
||||
appId.toString(),
|
||||
content,
|
||||
tts,
|
||||
"$appId",
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
@@ -50,7 +52,13 @@ public class V2XAlarmServer {
|
||||
// 计算车辆距离指定气泡的距离
|
||||
MarkerLocation eventLocation = v2XRoadEventEntity.getLocation();
|
||||
// 1、判断是否到达了触发距离,20 ~ 500,
|
||||
if (v2XRoadEventEntity.getDistance() <= 500) {
|
||||
double distance = v2XRoadEventEntity.getDistance();
|
||||
if (distance <= 500) {
|
||||
if (EventTypeEnum.GHOST_PROBE.getPoiType().equals(v2XRoadEventEntity.getPoiType())) {
|
||||
if (distance > 25) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// 2、道路事件方向与当前行驶方向角度偏差《20度以内
|
||||
double carBearing = currentLocation.getBearing();
|
||||
double eventBearing = eventLocation.getAngle();
|
||||
|
||||
@@ -98,7 +98,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
V2XRoadEventEntity content = entity != null ? entity.getContent() : null;
|
||||
if (content != null) {
|
||||
//显示警告红边
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(entity.getType(), content.getAlarmContent(), content.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(5));
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(content.getPoiType(), content.getAlarmContent(), content.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(5));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,9 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
|
||||
@Override
|
||||
public void onShow() {
|
||||
CallerVisualAngleManager.INSTANCE.changeVisualAngle(CallerVisualAngleManager.Scene.RoadEvent.INSTANCE);
|
||||
if (isNeedChangeAngle()) {
|
||||
CallerVisualAngleManager.INSTANCE.changeVisualAngle(CallerVisualAngleManager.Scene.RoadEvent.INSTANCE);
|
||||
}
|
||||
CallerHmiManager.INSTANCE.showWarning(WarningDirectionEnum.ALERT_WARNING_TOP, TimeUnit.HOURS.toMillis(1));
|
||||
V2XMessageEntity<V2XRoadEventEntity> entity = getV2XMessageEntity();
|
||||
if (entity != null) {
|
||||
@@ -140,10 +142,21 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isNeedChangeAngle() {
|
||||
V2XMessageEntity<V2XRoadEventEntity> entity = getV2XMessageEntity();
|
||||
V2XRoadEventEntity content = entity != null ? entity.getContent() : null;
|
||||
if (content == null) {
|
||||
return true;
|
||||
}
|
||||
return !EventTypeEnum.GHOST_PROBE.getPoiType().equals(content.getPoiType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
CallerHmiManager.INSTANCE.dismissWarning(WarningDirectionEnum.ALERT_WARNING_TOP);
|
||||
CallerVisualAngleManager.INSTANCE.changeVisualAngle(new CallerVisualAngleManager.Scene.Default(3, TimeUnit.SECONDS));
|
||||
if (isNeedChangeAngle()) {
|
||||
CallerVisualAngleManager.INSTANCE.changeVisualAngle(new CallerVisualAngleManager.Scene.Default(3, TimeUnit.SECONDS));
|
||||
}
|
||||
clearPOI();
|
||||
release();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class V2XOptimalRouteVREventScenario
|
||||
if (entity != null) {
|
||||
V2XOptimalRouteDataRes content = entity.getContent();
|
||||
if (content != null) {
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(entity.getType(), "为您推荐最优路线", "已为您选择最优路线", TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(30));
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(entity.getType() + "", "为您推荐最优路线", "已为您选择最优路线", TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(30));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ import android.graphics.Color;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
|
||||
@@ -18,8 +16,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XWarningEntity;
|
||||
|
||||
import com.mogo.v2x.data.V2XWarningTarget;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -32,7 +29,7 @@ import java.util.concurrent.TimeUnit;
|
||||
public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapLocationListener, IMoGoWarningStatusListener {
|
||||
private static final String TAG = "V2XWarningMarker";
|
||||
private static final V2XWarningMarker sV2XWarningMarker = new V2XWarningMarker();
|
||||
private V2XWarningEntity mMarkerEntity;
|
||||
private V2XWarningTarget mMarkerEntity;
|
||||
|
||||
private WarningDirectionEnum mDirection;
|
||||
|
||||
@@ -45,8 +42,8 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "----- init -----:\n" + (v2XMessageEntity == null ? "null" : v2XMessageEntity.toString()));
|
||||
try {
|
||||
setV2XMessageEntity(v2XMessageEntity);
|
||||
if (v2XMessageEntity != null && v2XMessageEntity.getContent() instanceof V2XWarningEntity) {
|
||||
mMarkerEntity = (V2XWarningEntity) v2XMessageEntity.getContent();
|
||||
if (v2XMessageEntity != null && v2XMessageEntity.getContent() instanceof V2XWarningTarget) {
|
||||
mMarkerEntity = (V2XWarningTarget) v2XMessageEntity.getContent();
|
||||
show();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -62,24 +59,27 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL
|
||||
int v2xType = getV2XTypeForFrontWarning(mMarkerEntity);
|
||||
V2XMessageEntity entity = getV2XMessageEntity();
|
||||
if (v2xType != 0) {
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(v2xType, getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(3));
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(v2xType + "", getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(3));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int getV2XTypeForFrontWarning(V2XWarningEntity entity) {
|
||||
private int getV2XTypeForFrontWarning(V2XWarningTarget entity) {
|
||||
switch (entity.getType()) {
|
||||
case 1:
|
||||
case 11:
|
||||
entity.setTts("注意行人");
|
||||
return 0X2B0201;
|
||||
case 2:
|
||||
entity.setTts("注意自行车");
|
||||
case 4:
|
||||
entity.setTts("注意摩托车");
|
||||
return 0X2B0202;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private CharSequence getAlertContentForFrontWarning(V2XWarningEntity entity) {
|
||||
private CharSequence getAlertContentForFrontWarning(V2XWarningTarget entity) {
|
||||
double dis = entity.getDistance();
|
||||
//距离四舍五入保留整数
|
||||
BigDecimal bg = new BigDecimal(dis);
|
||||
|
||||
@@ -169,7 +169,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
private fun redLightWarning() {
|
||||
CallerLogger.d("$M_V2X$TAG", "=====闯红灯预警=====")
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP.poiType.toInt(), EventTypeEnum.TYPE_USECASE_ID_IVP.content, EventTypeEnum.TYPE_USECASE_ID_IVP.tts, EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, null, true, 5000L)
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, EventTypeEnum.TYPE_USECASE_ID_IVP.content, EventTypeEnum.TYPE_USECASE_ID_IVP.tts, EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, null, true, 5000L)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
speed
|
||||
)
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType.toInt(), content, tts, EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, null, true, 5000L)
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, content, tts, EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, null, true, 5000L)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
if (abs(currentResult!!.remain - it.remain) > 5 && currentResult.isGreen()) {
|
||||
CallerLogger.d("$M_V2X$TAG", "调用showWarningV2X to show")
|
||||
CallerHmiManager.showWarningV2X(
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType.toInt(),
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.content,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.tts,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType,
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"lat":39.969055,
|
||||
"lon":116.410811
|
||||
},
|
||||
"poiType":"10011",
|
||||
"poiType":"10024",
|
||||
"type":"CARD_TYPE_ROAD_CONDITION",
|
||||
"uploadType":"2",
|
||||
"userInfo":{
|
||||
@@ -41,5 +41,5 @@
|
||||
"userName":"零下的雨"
|
||||
}
|
||||
},
|
||||
"poiType":"10011"
|
||||
"poiType":"10024"
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.hmi.warning
|
||||
|
||||
import android.view.View
|
||||
import android.view.WindowManager.LayoutParams
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
@@ -68,12 +67,12 @@ interface IMoGoWaringProvider : IMoGoHmiViewProxy {
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
* @param v2xType V2X类型
|
||||
* @param poiType V2X类型
|
||||
* @param alertContent 提醒文本
|
||||
* @param ttsContent tts语音播报消息
|
||||
* @param tag tag绑定弹窗的标志
|
||||
*/
|
||||
fun showWarningV2X(v2xType: Int, alertContent: CharSequence?, ttsContent: String?, tag: String?, listenerIMoGo: IMoGoWarningStatusListener?, playTts: Boolean, expireTime: Long)
|
||||
fun showWarningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, tag: String?, listenerIMoGo: IMoGoWarningStatusListener?, playTts: Boolean, expireTime: Long)
|
||||
|
||||
/**
|
||||
* 关闭指定floatTag 的 VR下V2X预警弹窗
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.call.hmi
|
||||
|
||||
import android.view.View
|
||||
import android.view.WindowManager.LayoutParams
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
@@ -92,12 +91,12 @@ object CallerHmiManager : CallerBase() {
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
* @param v2xType V2X类型
|
||||
* @param poiType V2X类型
|
||||
* @param alertContent 提醒文本
|
||||
* @param ttsContent tts语音播报消息
|
||||
* @param tag tag绑定弹窗的标志
|
||||
*/
|
||||
fun showWarningV2X(v2xType: Int, alertContent: CharSequence?, ttsContent: String?, tag: String?, listenerIMoGo: IMoGoWarningStatusListener?, playTts: Boolean, expireTime: Long = 5000L) {
|
||||
fun showWarningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, tag: String?, listenerIMoGo: IMoGoWarningStatusListener?, playTts: Boolean, expireTime: Long = 5000L) {
|
||||
waringProviderApi?.showWarningV2X(v2xType, alertContent, ttsContent, tag, listenerIMoGo, playTts, expireTime)
|
||||
}
|
||||
|
||||
|
||||
@@ -968,7 +968,9 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_VR;
|
||||
mapStyle = MapAutoApi.MAP_STYLE_NIGHT_VR;
|
||||
}
|
||||
mMapView.getMapAutoViewHelper().setMapStyle(mapStyle);
|
||||
if (mMapView != null && mMapView.getMapAutoViewHelper() != null) {
|
||||
mMapView.getMapAutoViewHelper().setMapStyle(mapStyle);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -58,6 +58,10 @@ public class V2XRoadEventEntity implements Serializable {
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
@@ -101,6 +101,10 @@ enum class EventTypeEnum(
|
||||
//路面湿滑
|
||||
ROAD_SLIPPERY("10021"),
|
||||
|
||||
//鬼探头类型
|
||||
GHOST_PROBE("10024", "前方盲区行人预警", "前方盲区行人预警", R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
"前方盲区行人通行,请注意", "前方盲区即将有行人通过,请减速慢行"),
|
||||
|
||||
// 前方静止or慢速车辆报警
|
||||
ALERT_FRONT_CAR("99999"),
|
||||
|
||||
@@ -374,7 +378,7 @@ enum class EventTypeEnum(
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStr
|
||||
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStr
|
||||
|
||||
GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeStr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
@@ -395,6 +399,7 @@ enum class EventTypeEnum(
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStrVr
|
||||
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStrVr
|
||||
GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeStrVr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
@@ -464,7 +469,7 @@ enum class EventTypeEnum(
|
||||
FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
|
||||
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
|
||||
FOURS_ACCIDENT_05.poiType -> true
|
||||
FOURS_ACCIDENT_05.poiType, GHOST_PROBE.poiType -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
@@ -479,7 +484,7 @@ enum class EventTypeEnum(
|
||||
FOURS_BLOCK_UP.poiType, FOURS_ACCIDENT.poiType,
|
||||
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
|
||||
FOURS_ACCIDENT_05.poiType -> true
|
||||
FOURS_ACCIDENT_05.poiType, GHOST_PROBE.poiType -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
@@ -530,6 +535,7 @@ enum class EventTypeEnum(
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
FOURS_ACCIDENT.content
|
||||
GHOST_PROBE.poiType -> GHOST_PROBE.content
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
@@ -596,6 +602,7 @@ enum class EventTypeEnum(
|
||||
FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
|
||||
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
|
||||
FOURS_PONDING.poiType -> R.raw.v2x_daolujishui
|
||||
GHOST_PROBE.poiType -> R.raw.v2x_guzhangqiuzhu
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
@@ -713,6 +720,7 @@ enum class EventTypeEnum(
|
||||
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
|
||||
else -> TYPE_ERROR.poiTypeSrcVr
|
||||
}
|
||||
}
|
||||
@@ -754,6 +762,7 @@ enum class EventTypeEnum(
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_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
|
||||
else -> TYPE_ERROR.content
|
||||
}
|
||||
}
|
||||
@@ -795,6 +804,7 @@ enum class EventTypeEnum(
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_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
|
||||
else -> TYPE_ERROR.tts
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user