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
This commit is contained in:
@@ -317,7 +317,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
carConfigResp: MessagePad.CarConfigResp?
|
||||
) {
|
||||
if (carConfigResp != null) {
|
||||
//todo emArrow startUp时确认数据完整性
|
||||
AppConfigInfo.dockerVersion = carConfigResp.dockVersion
|
||||
AppConfigInfo.plateNumber = carConfigResp.plateNumber//车牌号
|
||||
AppConfigInfo.iPCMacAddress = carConfigResp.macAddress//工控机MAC地址
|
||||
|
||||
@@ -300,14 +300,14 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
|
||||
mInViewY = motionEvent.y
|
||||
// 获取相对屏幕的坐标,即以屏幕左上角为原点
|
||||
mDownInScreenX = motionEvent.rawX
|
||||
mDownInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight()
|
||||
mDownInScreenY = motionEvent.rawY
|
||||
mInScreenX = motionEvent.rawX
|
||||
mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight()
|
||||
mInScreenY = motionEvent.rawY
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
// 更新浮动窗口位置参数
|
||||
mInScreenX = motionEvent.rawX
|
||||
mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight()
|
||||
mInScreenY = motionEvent.rawY
|
||||
mWindowParams!!.x = (mInScreenX - mInViewX).toInt()
|
||||
mWindowParams!!.y = (mInScreenY - mInViewY).toInt()
|
||||
// 手指移动的时候更新小悬浮窗的位置
|
||||
|
||||
@@ -315,14 +315,14 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
mInViewY = motionEvent.y
|
||||
// 获取相对屏幕的坐标,即以屏幕左上角为原点
|
||||
mDownInScreenX = motionEvent.rawX
|
||||
mDownInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight()
|
||||
mDownInScreenY = motionEvent.rawY
|
||||
mInScreenX = motionEvent.rawX
|
||||
mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight()
|
||||
mInScreenY = motionEvent.rawY
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
// 更新浮动窗口位置参数
|
||||
mInScreenX = motionEvent.rawX
|
||||
mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight()
|
||||
mInScreenY = motionEvent.rawY
|
||||
mWindowParams!!.x = (mInScreenX - mInViewX).toInt()
|
||||
mWindowParams!!.y = (mInScreenY - mInViewY).toInt()
|
||||
// 手指移动的时候更新小悬浮窗的位置
|
||||
@@ -338,7 +338,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
// 默认固定位置,靠屏幕右边缘的中间
|
||||
mWindowManager!!.defaultDisplay.getMetrics(metrics)
|
||||
mWindowParams!!.x = metrics.widthPixels
|
||||
mWindowParams!!.y = metrics.heightPixels / 2 - BarUtils.getStatusBarHeight()-350
|
||||
mWindowParams!!.y = metrics.heightPixels / 2 - BarUtils.getStatusBarHeight()-950
|
||||
mWindowManager!!.addView(mFloatLayout, mWindowParams)
|
||||
//开启录包
|
||||
if(recordCaseEntity!=null){
|
||||
|
||||
@@ -270,7 +270,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
if(isChecked){
|
||||
viewPassengerMsgBoxList.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.GONE
|
||||
viewPassengerMsgBoxList.notifyData()
|
||||
viewPassengerMsgBoxBubble.isShowData(false)
|
||||
CallerHmiManager.updatePassengerMsgBoxTipView(false)
|
||||
}else{
|
||||
|
||||
@@ -3,15 +3,24 @@ package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.data.msgbox.OperationMsg
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxListAdapter
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.*
|
||||
|
||||
/**
|
||||
@@ -23,13 +32,13 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr){
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) , IMsgBoxListener {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_driver_msg_box_list, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private val TAG = "DriverMsgBoxListView"
|
||||
private var noticeList: ArrayList<MsgBoxBean> ?= null
|
||||
private var ipcReportList: ArrayList<MsgBoxBean> ?= null
|
||||
private var badCaseList: ArrayList<MsgBoxBean> ?= null
|
||||
@@ -42,10 +51,13 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
|
||||
//获取通知消息列表
|
||||
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
|
||||
noticeList = noticeList?.let { ArrayList(it.reversed()) }
|
||||
//获取车辆系统信息列表
|
||||
ipcReportList = CallerMsgBoxManager.getCachedSysInfoData() as ArrayList<MsgBoxBean>?
|
||||
ipcReportList = ipcReportList?.let { ArrayList(it.reversed()) }
|
||||
//获取录包信息列表
|
||||
badCaseList = CallerMsgBoxManager.getCachedRecordBagData() as ArrayList<MsgBoxBean>?
|
||||
badCaseList = badCaseList?.let { ArrayList(it.reversed()) }
|
||||
//通知
|
||||
tvMsgNotice.setOnClickListener {
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
@@ -103,14 +115,6 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
fun notifyData(){
|
||||
val localNoticeList = MsgBoxConfig.noticeList.reversed()
|
||||
noticeList?.addAll(0,localNoticeList)
|
||||
val localSysInfoList = MsgBoxConfig.systemInfoList.reversed()
|
||||
ipcReportList?.addAll(0,localSysInfoList)
|
||||
val localRecordList = MsgBoxConfig.recordBagList.reversed()
|
||||
|
||||
badCaseList?.addAll(0,localRecordList)
|
||||
|
||||
//获取当前Tab选择
|
||||
when(MsgBoxConfig.getUserRecord()){
|
||||
0 ->{
|
||||
@@ -162,6 +166,35 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post{
|
||||
when (category) {
|
||||
MsgCategory.NOTICE -> {
|
||||
noticeList?.add(0,msgBoxList)
|
||||
}
|
||||
MsgCategory.SYS_INFO -> {
|
||||
ipcReportList?.add(0,msgBoxList)
|
||||
}
|
||||
MsgCategory.RECORD_BAG -> {
|
||||
badCaseList?.add(0,msgBoxList)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -7,14 +7,18 @@ import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxListAdapter
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.layout_passenger_msg_box_list.view.*
|
||||
|
||||
/**
|
||||
@@ -26,8 +30,9 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr){
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener {
|
||||
|
||||
private val TAG = "PassengerMsgBoxListView"
|
||||
var passengerMsgBoxListAdapter: PassengerMsgBoxListAdapter ?= null
|
||||
private var noticeList: ArrayList<MsgBoxBean> ?= null
|
||||
|
||||
@@ -47,18 +52,40 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
rvPassengerList.addItemDecoration(divider)
|
||||
//获取通知消息列表
|
||||
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
|
||||
noticeList?.reversed()
|
||||
noticeList = noticeList?.let { ArrayList(it.reversed()) }
|
||||
noticeList?.let {
|
||||
passengerMsgBoxListAdapter?.setData(it)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun notifyData(){
|
||||
val localNoticeList = MsgBoxConfig.noticeList.reversed()
|
||||
noticeList?.addAll(0,localNoticeList)
|
||||
noticeList?.let {
|
||||
passengerMsgBoxListAdapter?.setData(it)
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post{
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
|| msgBoxList.type == MsgBoxType.OBU){
|
||||
noticeList?.add(0,msgBoxList)
|
||||
noticeList?.let {
|
||||
passengerMsgBoxListAdapter?.setData(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,11 +106,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
return R.layout.module_main_activity_main;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void beforeSetContentView(Bundle savedInstanceState) {
|
||||
init();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
injectStatusBar();
|
||||
@@ -152,16 +147,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
decorView.addView(statusBarView, statusBarLP);
|
||||
}
|
||||
|
||||
// 隐藏布局
|
||||
protected void hideLayout() {
|
||||
mFloatingLayout.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// 显示布局
|
||||
protected void showLayout() {
|
||||
mFloatingLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -187,7 +172,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
AppLaunchTimeUtils.beginTimeCalculate(AppLaunchTimeUtils.HOT_START);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
@@ -216,10 +200,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
}
|
||||
}
|
||||
|
||||
private void init() {
|
||||
MogoStatusManager.getInstance().setMainPageLaunchedStatus(TAG, true);
|
||||
}
|
||||
|
||||
private void initConnectInfoRV() {
|
||||
mConnAdapter = new ConnInfoAdapter(this, dataList);
|
||||
mConnectInfoRV.setLayoutManager(new LinearLayoutManager(this));
|
||||
@@ -464,7 +444,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
if (mapUIController != null) {
|
||||
mapUIController.destroy();
|
||||
}
|
||||
MogoStatusManager.getInstance().setMainPageLaunchedStatus(TAG, false);
|
||||
MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, false);
|
||||
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "destroy.");
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.mogo.eagle.core.function.main.constants.MainConstants;
|
||||
*/
|
||||
public class MainPresenter extends Presenter<MainView> {
|
||||
|
||||
private Handler mMsgHandler = new Handler(Looper.getMainLooper()) {
|
||||
private final Handler mMsgHandler = new Handler(Looper.getMainLooper()) {
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
super.handleMessage(msg);
|
||||
|
||||
@@ -4,24 +4,19 @@ import android.content.Context
|
||||
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
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumWeaknessTraffic
|
||||
import com.mogo.eagle.core.data.enums.V2iEventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.enums.*
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showLimitingVelocity
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager.invokeOnLimitingVelocityChange
|
||||
import com.mogo.eagle.core.function.obu.mogo.MogoObuConst.TAG_MOGO_OBU
|
||||
import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtilsNew
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -577,7 +572,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图匹配 是OBU算法输出地图匹配结果,主车匹配道路哪条路或者哪条车道 TODO
|
||||
* 地图匹配 是OBU算法输出地图匹配结果,主车匹配道路哪条路或者哪条车道
|
||||
*/
|
||||
override fun onMogoObuMapMath(data: MogoObuMapMathData?) {
|
||||
super.onMogoObuMapMath(data)
|
||||
@@ -615,7 +610,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
* 获取消息的方位 车辆相关
|
||||
*/
|
||||
private fun getMessageDirection(targetClassification: Int): WarningDirectionEnum {
|
||||
// CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "预警红边:预警方向->$targetClassification")
|
||||
// CallerLogger.d("$M_OBU${TAG_MOGO_OBU}", "预警红边:预警方向->$targetClassification")
|
||||
return when (targetClassification) {
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方
|
||||
@@ -844,75 +839,68 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
//这里需要根据真实数据确定 index 取值方式
|
||||
val currentLight = lights[0]
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"$M_OBU${TAG_MOGO_OBU}",
|
||||
"currentLight = $currentLight ---currentLight.phase = ${currentLight.phaseId} ---appId = $appId"
|
||||
)
|
||||
// 闯红灯预警
|
||||
// 闯红灯预警,绿波通行和闯红灯是互斥的
|
||||
when (appId) {
|
||||
0x0 -> {//不可用 V2I_RLVW_VIOLATION_TYPE_UNAVAILABLE 无效
|
||||
|
||||
}
|
||||
0x1 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT TODO 需要约束一个红灯周期只显示一次
|
||||
// CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
// CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}","changeTrafficLightStatus 闯红灯 --------> ")
|
||||
// ttsContent = EventTypeEnumNew.getWarningTts(appId.toString())
|
||||
// alertContent = EventTypeEnumNew.getWarningContent(appId.toString())
|
||||
// CallerHmiManager.warningV2X(
|
||||
// appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
// appId.toString(), null, true, 5000L, MsgBoxType.OBU
|
||||
// )
|
||||
// CallerHmiManager.disableWarningV2X(0x2.toString())
|
||||
// CallerLogger.d("$M_OBU${TAG_MOGO_OBU}","changeTrafficLightStatus 闯红灯 --------> ")
|
||||
// ttsContent = EventTypeEnumTrafficLight.getWarningTts(appId.toString())
|
||||
// alertContent = EventTypeEnumTrafficLight.getWarningContent(appId.toString())
|
||||
// CallerHmiManager.warningV2X(
|
||||
// appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
// appId.toString(), null, true, 5000L)
|
||||
}
|
||||
|
||||
0x2 -> {//绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION TODO 需要约束一个绿灯周期只显示一次
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId.toString())
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OBU,
|
||||
V2XMsg(
|
||||
appId.toString(),
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(), null, true, 3000L
|
||||
)
|
||||
|
||||
// 拼接建议速度
|
||||
// CallerLogger.d(
|
||||
// "$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
// "绿波通行引导 --------> speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}"
|
||||
// )
|
||||
// val adviceSpeed =
|
||||
// "${currentLight.suggestMinSpeed*3.6} - ${currentLight.suggestMaxSpeed*3.6}"
|
||||
// val adviceSpeedTts =
|
||||
// "${currentLight.suggestMinSpeed*3.6}到${currentLight.suggestMaxSpeed*3.6}"
|
||||
// ttsContent =
|
||||
// String.format(
|
||||
// EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
// adviceSpeedTts
|
||||
// )
|
||||
// alertContent =
|
||||
// String.format(
|
||||
// EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
// adviceSpeed
|
||||
// )
|
||||
// val maxSpeed = currentLight.suggestMaxSpeed*3.6
|
||||
// if (maxSpeed > 0) {
|
||||
// CallerHmiManager.warningV2X(
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
// alertContent,
|
||||
// ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
// appId.toString(),
|
||||
// null,
|
||||
// true,
|
||||
// 5000L,
|
||||
// MsgBoxType.OBU
|
||||
// )
|
||||
// }
|
||||
0x2 -> { //绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION TODO 需要约束一个绿灯周期只显示一次
|
||||
// CallerHmiManager.disableWarningV2X(0x1.toString())
|
||||
// CallerLogger.d(
|
||||
// "$M_OBU${TAG_MOGO_OBU}",
|
||||
// "speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}"
|
||||
// )
|
||||
// val adviceSpeed =
|
||||
// "${currentLight.suggestMinSpeed} - ${currentLight.suggestMaxSpeed}"
|
||||
// val adviceSpeedTts =
|
||||
// "${currentLight.suggestMinSpeed}到${currentLight.suggestMaxSpeed}"
|
||||
// ttsContent =
|
||||
// String.format(
|
||||
// EventTypeEnumTrafficLight.getWarningTts(appId.toString()),
|
||||
// adviceSpeedTts
|
||||
// )
|
||||
// alertContent =
|
||||
// String.format(
|
||||
// EventTypeEnumTrafficLight.getWarningContent(appId.toString()),
|
||||
// adviceSpeed
|
||||
// )
|
||||
//
|
||||
// val maxSpeed = currentLight.suggestMaxSpeed
|
||||
// if (maxSpeed > 0) {
|
||||
// CallerMsgBoxManager.saveMsgBox(
|
||||
// MsgBoxBean(
|
||||
// MsgBoxType.OBU,
|
||||
// V2XMsg(
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
// alertContent,
|
||||
// ttsContent
|
||||
// )
|
||||
// )
|
||||
// )
|
||||
//
|
||||
// CallerHmiManager.warningV2X(
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
// alertContent,
|
||||
// ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
// appId.toString(),
|
||||
// null,
|
||||
// true,
|
||||
// 5000L
|
||||
// )
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,6 +921,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
val red = currentLight.countDown.toInt()
|
||||
CallerHmiManager.changeCountdownRed(red)
|
||||
}
|
||||
|
||||
// 绿灯
|
||||
4, 5, 6 -> {
|
||||
if (!isGreenLight) {
|
||||
@@ -943,52 +932,8 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
CallerHmiManager.showWarningTrafficLight(3, 2)
|
||||
val green = currentLight.countDown.toInt()
|
||||
CallerHmiManager.changeCountdownGreen(green)
|
||||
//防止数据出现问题的容错
|
||||
CallerHmiManager.changeCountdownRed(0)
|
||||
CallerHmiManager.changeCountdownYellow(0)
|
||||
// 拼接建议速度
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_OBU}",
|
||||
"speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}"
|
||||
)
|
||||
val adviceSpeed =
|
||||
"${currentLight.suggestMinSpeed} - ${currentLight.suggestMaxSpeed}"
|
||||
val adviceSpeedTts =
|
||||
"${currentLight.suggestMinSpeed}到${currentLight.suggestMaxSpeed}"
|
||||
ttsContent =
|
||||
String.format(
|
||||
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
adviceSpeedTts
|
||||
)
|
||||
alertContent =
|
||||
String.format(
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
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,
|
||||
3000L
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// 黄灯
|
||||
7, 8 -> {
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.mogo.eagle.core.data.trafficlight.currentRoadTrafficLight
|
||||
import com.mogo.eagle.core.data.trafficlight.isGreen
|
||||
import com.mogo.eagle.core.data.trafficlight.isRed
|
||||
import com.mogo.eagle.core.data.v2x.VipMessage
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
@@ -270,6 +271,15 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(MsgBoxType.V2X, V2XMsg(v2xType, alertContent.toString(), ttsContent))
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
v2xType, alertContent, ttsContent, tag,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {}
|
||||
override fun onDismiss() {}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
}
|
||||
|
||||
fun destroy() {
|
||||
|
||||
Reference in New Issue
Block a user