Merge remote-tracking branch 'origin/dev_robotaxi-d-app-module_280_220608_2.8.0' into dev_robotaxi-d-app-module_280_220608_2.8.0
This commit is contained in:
@@ -259,7 +259,8 @@ class MoGoAutopilotProvider :
|
||||
trafficLightResult.laneNo,
|
||||
trafficLightResult.arrowNo,
|
||||
trafficLightResult.flashYellow,
|
||||
trafficLightResult.toTrafficLightDetail()
|
||||
trafficLightResult.toTrafficLightDetail(),
|
||||
trafficLightResult.timeStamp
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,16 +6,18 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_version_name.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description APP版本号+MAP版本号水印显示
|
||||
* @description APP版本号+MAP版本号水印显示(只在司机屏展示)
|
||||
* @since: 2022/5/20
|
||||
*/
|
||||
class VersionNameView @JvmOverloads constructor(
|
||||
@@ -36,8 +38,11 @@ class VersionNameView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
showCurrentPadVersion()
|
||||
showCurrentMapVersion()
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
showCurrentPadVersion()
|
||||
showCurrentMapVersion()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,12 +71,18 @@ class VersionNameView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
|
||||
@@ -64,10 +64,7 @@ import com.mogo.service.statusmanager.StatusDescriptor.SEEK_HELPING
|
||||
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.data.*
|
||||
import com.mogo.v2x.event.V2XEvent
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.cache.CacheFactory
|
||||
@@ -78,6 +75,7 @@ import com.shuyu.gsyvideoplayer.player.PlayerFactory
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.android.asCoroutineDispatcher
|
||||
import roadwork.Road.RW_PB
|
||||
import tv.danmaku.ijk.media.player.IjkMediaPlayer
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
@@ -452,9 +450,27 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
is V2XEvent.Warning -> {
|
||||
handleWarningTargetEvent(event.data)
|
||||
}
|
||||
is V2XEvent.RoadAI -> {
|
||||
handleRoadMarkerEvent(event.data.toRoadMarker)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val RW_PB.toRoadMarker: V2XMarkerCardResult
|
||||
get() = V2XMarkerCardResult().also { l1 ->
|
||||
l1.exploreWay = ArrayList<V2XMarkerExploreWay>().also { l2 ->
|
||||
l2.add(V2XMarkerExploreWay().also { l3 ->
|
||||
l3.poiType = this.roadwork?.poiType?.toString()
|
||||
l3.generateTime = this.roadwork?.detectTime ?: 0L
|
||||
l3.location = V2XMarkerLocation().also { l4 ->
|
||||
l4.lat = this.roadwork?.center?.point?.lat ?: 0.0
|
||||
l4.lon = this.roadwork?.center?.point?.lon ?: 0.0
|
||||
l4.angle = -1.0
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleWarningTargetEvent(data: V2XWarningTarget) {
|
||||
val v2xMessageEntity = V2XMessageEntity<V2XWarningTarget>()
|
||||
v2xMessageEntity.type = V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS
|
||||
|
||||
@@ -48,7 +48,8 @@ public class V2XAlarmServer {
|
||||
// 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告
|
||||
for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) {
|
||||
// 0、道路事件必须有朝向,角度>=0;
|
||||
if (v2XRoadEventEntity.getLocation().getAngle() >= 0) {
|
||||
boolean ignoreAngle = v2XRoadEventEntity.getLocation().getAngle() < 0;
|
||||
if (v2XRoadEventEntity.getLocation().getAngle() >= 0 || ignoreAngle) {
|
||||
// 计算车辆距离指定气泡的距离
|
||||
MarkerLocation eventLocation = v2XRoadEventEntity.getLocation();
|
||||
// 1、判断是否到达了触发距离,20 ~ 500,
|
||||
@@ -63,7 +64,7 @@ public class V2XAlarmServer {
|
||||
double carBearing = currentLocation.getBearing();
|
||||
double eventBearing = eventLocation.getAngle();
|
||||
double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing);
|
||||
if (diffAngle < 20) {
|
||||
if (ignoreAngle || diffAngle < 20) {
|
||||
// 3、计算当前车辆行驶方向与事件位置之间夹角《20度,保证道路事件在车辆前方
|
||||
double eventAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
|
||||
currentLocation.getLongitude(),
|
||||
@@ -72,7 +73,7 @@ public class V2XAlarmServer {
|
||||
eventLocation.getLat(),
|
||||
(int) currentLocation.getBearing()
|
||||
);
|
||||
if (0 <= eventAngle && eventAngle <= 20) {
|
||||
if (ignoreAngle || 0 <= eventAngle && eventAngle <= 20) {
|
||||
// 判断是否已经提示过道路事件
|
||||
boolean isAlreadyAlert = false;
|
||||
String lastTime = mAlertRoadEventList.get(v2XRoadEventEntity);
|
||||
|
||||
Reference in New Issue
Block a user