diff --git a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml index 975b76ad84..582b0f7d84 100644 --- a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml +++ b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml @@ -94,7 +94,7 @@ 0) { - this.visibility = View.VISIBLE - tvLimitingVelocity.text = "$limitingVelocity" - tvLimitingSource.visibility = View.VISIBLE - tvLimitingSource.text = sourceType.name - } else { - this.visibility = View.GONE - tvLimitingSource.visibility = View.GONE - tvLimitingSource.text = "" + ThreadUtils.runOnUiThread { + if (limitingVelocity > 0) { + visibility = View.VISIBLE + tvLimitingVelocity.text = "$limitingVelocity" + Log.d("emArrow","limit : ${ DataSourceType.getName(sourceType)}") + tvLimitingSource.text = DataSourceType.getName(sourceType) + } else { + visibility = View.GONE + tvLimitingSource.text = "" + } } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_limiting_speed_vr.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_limiting_speed_vr.xml index 0bca4b164a..c7d079cfb7 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_limiting_speed_vr.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_limiting_speed_vr.xml @@ -23,9 +23,8 @@ android:id="@+id/tvLimitingSource" android:layout_width="120dp" android:layout_height="35dp" - android:layout_marginEnd="40dp" android:gravity="center" - android:text="" + android:text="123" android:textColor="@color/color_FFFFFF" android:textSize="@dimen/dp_30" android:textStyle="bold" diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/DataSourceType.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/DataSourceType.kt index 7cc8ddb8fa..bddc074309 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/DataSourceType.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/DataSourceType.kt @@ -1,11 +1,26 @@ package com.mogo.eagle.core.data.enums + + enum class DataSourceType(name: String) { DEFAULT("defalut"), OBU("OBU"), MAP("MAP"), TELEMATIC("TELEMATIC"), AICLOUD("AI云"), - SUMMARY("汇总")// V2X事件汇总 + SUMMARY("汇总");// V2X事件汇总 + + companion object{ + fun getName(type :DataSourceType):String{ + return when(type){ + OBU -> "OBU" + MAP -> "MAP" + TELEMATIC -> "TELEMATIC" + AICLOUD -> "AI云" + SUMMARY -> "汇总" + else -> "defalut" + } + } + } } \ No newline at end of file