diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index d2fec88cd1..aba1ba3798 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -1149,33 +1149,44 @@ class DebugSettingView @JvmOverloads constructor( * 工控机异常回调 */ override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) { - guardianInfo?.let { - reportMsgLayout.visibility = View.VISIBLE - tvReportSrc.text = it.src - tvReportLevel.text = it.level - tvReportMsg.text = it.msg - tvReportCode.text = it.code - tvReportResult.text = it.getResult(0) - tvReportActions.text = it.getActions(0) + ThreadUtils.runOnUiThread{ + guardianInfo?.let { + reportMsgLayout.visibility = View.VISIBLE + tvReportSrc.text = "src:${it.src}" + tvReportLevel.text = "level:${it.level}" + tvReportMsg.text = "msg:${it.msg}" + tvReportCode.text = "code:${it.code}" + var resultStr="result:" + for(result in it.resultList){ + resultStr = "$resultStr$result " + } + tvReportResult.text = resultStr - if("error".equals(it.level)){ - //字体为红色,吐司提示 - tvReportSrc.setTextColor(Color.RED) - tvReportLevel.setTextColor(Color.RED) - tvReportMsg.setTextColor(Color.RED) - tvReportCode.setTextColor(Color.RED) - tvReportResult.setTextColor(Color.RED) - tvReportActions.setTextColor(Color.RED) - ToastUtils.showShort(it.msg) - }else{ - tvReportSrc.setTextColor(Color.BLACK) - tvReportLevel.setTextColor(Color.BLACK) - tvReportMsg.setTextColor(Color.BLACK) - tvReportCode.setTextColor(Color.BLACK) - tvReportResult.setTextColor(Color.BLACK) - tvReportActions.setTextColor(Color.BLACK) + var actionStr="action:" + for(action in it.actionsList){ + actionStr = "$actionStr$action " + } + tvReportActions.text = actionStr + + + if("error".equals(it.level)){ + //字体为红色,吐司提示 + tvReportSrc.setTextColor(Color.RED) + tvReportLevel.setTextColor(Color.RED) + tvReportMsg.setTextColor(Color.RED) + tvReportCode.setTextColor(Color.RED) + tvReportResult.setTextColor(Color.RED) + tvReportActions.setTextColor(Color.RED) + ToastUtils.showShort(it.msg) + }else{ + tvReportSrc.setTextColor(Color.BLACK) + tvReportLevel.setTextColor(Color.BLACK) + tvReportMsg.setTextColor(Color.BLACK) + tvReportCode.setTextColor(Color.BLACK) + tvReportResult.setTextColor(Color.BLACK) + tvReportActions.setTextColor(Color.BLACK) + } } - } }