[8.2.6][司机屏] 自车请求平行驾驶状态提醒

This commit is contained in:
xinfengkun
2025-10-29 16:31:48 +08:00
parent feddb70dc9
commit 87fc8dbaf2
2 changed files with 47 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
import com.mogo.eagle.core.utilcode.util.SoundPoolUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.zhjt.mogo.adas.data.bean.MogoReport
import mogo.yycp.paralleldriving.protocol.ParallelTaskProcessNoticeOuterClass
import mogo_msg.MogoReportMsg
@@ -81,6 +82,41 @@ class TakeOverView @JvmOverloads constructor(
return@let
}
when (it.code) {
MogoReport.Code.Error.EVEHICLE.IN_TROUBLE -> {
if(!isParallel){
CallerHmiManager.warningV2X(
EventTypeEnumNew.EVEHICLE_IN_TROUBLE.poiType,
EventTypeEnumNew.EVEHICLE_IN_TROUBLE.content,
null,
object : IMoGoWarningStatusListener {
override fun onShow() {
takeOver = true
ThreadUtils.runOnUiThread{
ToastUtils.showLong(EventTypeEnumNew.EVEHICLE_IN_TROUBLE.content)
visibility = View.VISIBLE
}
//加入消息盒子
saveMsgBox(
MsgBoxBean(
MsgBoxType.V2X, V2XMsg(
EventTypeEnumNew.EVEHICLE_IN_TROUBLE.poiType,
EventTypeEnumNew.EVEHICLE_IN_TROUBLE.content,
null
)
)
)
}
override fun onDismiss() {
takeOver = false
ThreadUtils.runOnUiThread{
visibility = View.GONE
}
}
}
,isFromObu = false)
}
}
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_PLANNING,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_LOCATION,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS,

View File

@@ -113,6 +113,11 @@ enum class EventTypeEnumNew(
NETWORK_WEAK_EVENT("20001", "接管", "注意周围、立即接管", R.drawable.icon_warning_take_over,
"注意周围、立即接管", "平行驾驶遇弱网已退出,注意随时接管"),
//平行驾驶接入
EVEHICLE_IN_TROUBLE(
"20002", "自驾判定遇困", "已请求平行驾驶,请稍作等待", R.drawable.icon_warning_take_over,
"已请求平行驾驶,请稍作等待"
),
// 前方静止or慢速车辆报警
ALERT_FRONT_CAR("99999","前方预警"),
@@ -991,6 +996,9 @@ enum class EventTypeEnumNew(
NETWORK_WEAK_EVENT.poiType ->{
NETWORK_WEAK_EVENT.poiTypeStr
}
EVEHICLE_IN_TROUBLE.poiType -> {
EVEHICLE_IN_TROUBLE.poiTypeStr
}
//平行驾驶无法接管
TYPE_UNABLE_TAKEOVER.poiType->{
TYPE_UNABLE_TAKEOVER.poiTypeStr
@@ -1376,6 +1384,9 @@ enum class EventTypeEnumNew(
NETWORK_WEAK_EVENT.poiType -> {
R.drawable.icon_warning_take_over
}
EVEHICLE_IN_TROUBLE.poiType -> {
R.drawable.icon_warning_take_over
}
//平行驾驶无法接管
TYPE_UNABLE_TAKEOVER.poiType->{
R.drawable.icon_warning_take_over