wait to finish
This commit is contained in:
@@ -19,9 +19,8 @@ import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.module.common.drawer.TrafficMarkerDrawer
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeHelper
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeHelper
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.zhidao.support.obu.MogoObuManager
|
||||
import com.zhidao.support.obu.OnMogoObuListener
|
||||
@@ -77,16 +76,16 @@ class MogoPrivateObuManager private constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
fun disConnectObu(){
|
||||
fun disConnectObu() {
|
||||
try {
|
||||
MogoObuManager.getInstance().disConnect()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun isConnected(): Boolean{
|
||||
fun isConnected(): Boolean {
|
||||
return MogoObuManager.getInstance().isConnected
|
||||
}
|
||||
|
||||
@@ -219,7 +218,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_RV", true) }
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxRvInfoIndInfo2TrafficData(info)?.let {
|
||||
TrafficMarkerDrawer.updateITrafficLocationInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()?.updateITrafficLocationInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,7 +388,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.invokeTrackerWarningInfo(it)
|
||||
TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
@@ -403,7 +403,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
CallerObuListenerManager.removeTrackerWarningInfo(it)
|
||||
// 事件结束,还原车辆颜色
|
||||
it.threatLevel = 0x01
|
||||
TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -507,7 +508,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.invokeTrackerWarningInfo(it)
|
||||
TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
@@ -519,7 +521,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
CallerObuListenerManager.removeTrackerWarningInfo(it)
|
||||
// 事件结束,还原交通参与者颜色
|
||||
it.threatLevel = 0x01
|
||||
TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
CallerHmiManager.disableWarningV2X(ObuConstants.USE_CASE_ID.VRUCW.toString())
|
||||
}
|
||||
@@ -849,21 +852,21 @@ class MogoPrivateObuManager private constructor() {
|
||||
}
|
||||
//前车急刹预警
|
||||
EventTypeEnum.TYPE_USECASE_ID_EBW.poiType -> {
|
||||
EventTypeHelper.getEBW(appId){ alert, tts ->
|
||||
EventTypeHelper.getEBW(appId) { alert, tts ->
|
||||
alertContent = alert
|
||||
ttsContent = tts
|
||||
}
|
||||
}
|
||||
//前向碰撞预警
|
||||
EventTypeEnum.TYPE_USECASE_ID_FCW.poiType -> {
|
||||
EventTypeHelper.getFCW(appId){ alert, tts ->
|
||||
EventTypeHelper.getFCW(appId) { alert, tts ->
|
||||
alertContent = alert
|
||||
ttsContent = tts
|
||||
}
|
||||
}
|
||||
//逆向超车预警
|
||||
EventTypeEnum.TYPE_USECASE_ID_DNPW.poiType -> {
|
||||
EventTypeHelper.getDNPW(appId){ alert, tts ->
|
||||
EventTypeHelper.getDNPW(appId) { alert, tts ->
|
||||
alertContent = alert
|
||||
ttsContent = tts
|
||||
}
|
||||
@@ -917,7 +920,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
//更新周边车辆进行预警颜色变换,车辆实时移动和变色
|
||||
TrafficDataConvertUtils.cvxV2vThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.invokeTrackerWarningInfo(it)
|
||||
TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
@@ -930,7 +933,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
TrafficDataConvertUtils.cvxV2vThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerObuListenerManager.removeTrackerWarningInfo(it)
|
||||
it.threatLevel = 0x01
|
||||
TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
CallerMapUIServiceManager.getMarkerService()?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user