[6.2.9]消息盒子Report关键INFO事件 PAD显示需求

This commit is contained in:
xuxinchao
2024-01-24 16:45:40 +08:00
parent 70814ce094
commit 11f8fb666f
2 changed files with 43 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.zhjt.mogo.adas.data.bean.MogoReport
import mogo_msg.MogoReportMsg
/**
@@ -87,7 +88,32 @@ class IPCReportManager : IMoGoAutopilotStatusListener {
|| it.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
|| it.resultList.contains(RESULT_AUTOPILOT_INFERIOR)
|| it.resultList.contains(RESULT_SHOW_WARNING)
|| it.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)){
|| it.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)
|| it.code == MogoReport.Code.Info.ISYS.STARTING
|| it.code == MogoReport.Code.Info.ISYS.RUNNING
|| it.code == MogoReport.Code.Info.IMAP.ENTRY_AUTOPILOT
|| it.code == MogoReport.Code.Info.IMAP.EXIT_AUTOPILOT
|| it.code == MogoReport.Code.Info.IMAP.ENTRY_REMOTEPILOT
|| it.code == MogoReport.Code.Info.IMAP.EXIT_REMOTEPILOT
|| it.code == MogoReport.Code.Info.IMAP.CONTROLLER_START_FM_COMMAND
|| it.code == MogoReport.Code.Info.IMAP.CONTROLLER_FINISH_FM_COMMAND
|| it.code == MogoReport.Code.Info.IMAP.CONTROLLER_ABORT_FM_COMMAND
|| it.code == MogoReport.Code.Info.IMAP.PLANNING_START_FM_COMMAND
|| it.code == MogoReport.Code.Info.IMAP.PLANNING_FINISH_FM_COMMAND
|| it.code == MogoReport.Code.Info.IMAP.PLANNING_ABORT_FM_COMMAND
|| it.code == MogoReport.Code.Info.ISYS.ALREADY_AUTOPILOT_STATE
|| it.code == MogoReport.Code.Info.ISYS.AUTOPILOT_TAKEN_OVER_BY_REMOTE
|| it.code == MogoReport.Code.Info.ISSM.OTA_UPGRADE_START
|| it.code == MogoReport.Code.Info.ISSM.OTA_UPGRADE_FINISH
|| it.code == MogoReport.Code.Info.ISSM.OTA_UPGRADE_LOADING
|| it.code == MogoReport.Code.Info.ISYS.INIT_TRAJECTORY_START
|| it.code == MogoReport.Code.Info.ISYS.INIT_TRAJECTORY_SUCCESS
|| it.code == MogoReport.Code.Info.ISYS.INIT_TRAJECTORY_TIMEOUT
|| it.code == MogoReport.Code.Info.ISYS.INIT_TRAJECTORY_FAILURE
|| it.code == MogoReport.Code.Info.IPARALLEL.AICLOUD_CONNECTION_OK
|| it.code == MogoReport.Code.Info.IVEHICLE.NOT_IN_TROUBLE
|| it.code == MogoReport.Code.Info.ILCT.RTK_STATUS_NORMAL
){
val reportEntity = ReportEntity(TimeUtils.millis2String(System.currentTimeMillis()),
it.src,it.level,it.msg,it.code,it.resultList,it.actionsList,false)
CallerMsgBoxManager.saveMsgBox(MsgBoxBean(MsgBoxType.REPORT, reportEntity))

View File

@@ -52,6 +52,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
private val RESULT_AUTOPILOT_SYSTEM_UNSTARTED = "RESULT_AUTOPILOT_SYSTEM_UNSTARTED"
private val RESULT_REMOTEPILOT_DISABLE = "RESULT_REMOTEPILOT_DISABLE"
//Warning
private val RESULT_AUTOPILOT_INFERIOR = "RESULT_AUTOPILOT_INFERIOR"
private val RESULT_SHOW_WARNING = "RESULT_SHOW_WARNING"
private val RESULT_REMOTEPILOT_INFERIOR = "RESULT_REMOTEPILOT_INFERIOR"
fun setData(data: List<MsgBoxBean>) {
this.data = data
notifyDataSetChanged()
@@ -378,13 +383,23 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_error_open))
holder.tvReportLevelNormal.text = "Error"
holder.tvReportLevelOpen.text = "Error"
} else {
} else if(reportEntity.resultList.contains(RESULT_AUTOPILOT_INFERIOR)
|| reportEntity.resultList.contains(RESULT_SHOW_WARNING)
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)
){
//Warning
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
holder.tvReportLevelNormal.text = "Warning"
holder.tvReportLevelOpen.text = "Warning"
}else {
//INFO
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
holder.tvReportLevelNormal.text = "Info"
holder.tvReportLevelOpen.text = "Info"
}
holder.tvReportTimeNormal.text =
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
holder.tvReportTimeOpen.text =