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 d48f3f38ab..c5a76d6ccc 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 @@ -158,11 +158,18 @@ class DebugSettingView @JvmOverloads constructor( * OBU状态回调 */ override fun onObuStatusResponse(obuStatusInfo: ObuStatusInfo) { - tvObuInfo.text = GsonUtils.toJson(obuStatusInfo) + tvObuInfo.post { + tvObuInfo.text = GsonUtils.toJson(obuStatusInfo) + } } + /** + * 自动驾驶状态回调 + */ override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) { - tvAutopilotInfo.text = GsonUtils.toJson(autoPilotStatusInfo) + tvAutopilotInfo.post { + tvAutopilotInfo.text = GsonUtils.toJson(autoPilotStatusInfo) + } } override fun onAutopilotArriveAtStation(autopilotWayArrive: AutopilotStationInfo?) { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SpeedPanelView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SpeedPanelView.kt index 8b9ed400fa..f813b70e1f 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SpeedPanelView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SpeedPanelView.kt @@ -126,10 +126,12 @@ class SpeedPanelView @JvmOverloads constructor( } override fun onCarLocationChanged2(latLng: Location) { - val speed = (latLng.speed * 3.6f).toInt() - mSpeedChartView.setArcColor(Color.parseColor(if (speed > 60) "#DB3137" else "#3E77F6")) - mSpeedChartView.setValues(speed) - setBackgroundResource(if (speed > 60) R.drawable.yi_biao_pan_bg_speeding else R.drawable.yi_biao_pan_bg_nor) + mSpeedChartView.post { + val speed = (latLng.speed * 3.6f).toInt() + mSpeedChartView.setArcColor(Color.parseColor(if (speed > 60) "#DB3137" else "#3E77F6")) + mSpeedChartView.setValues(speed) + setBackgroundResource(if (speed > 60) R.drawable.yi_biao_pan_bg_speeding else R.drawable.yi_biao_pan_bg_nor) + } } override fun onStatusChanged(descriptor: StatusDescriptor?, isTrue: Boolean) {