合并2.13.2的obu验收相关功能
This commit is contained in:
@@ -57,7 +57,7 @@ class V2XLimitingVelocityBroadcastReceiver : BroadcastReceiver() {
|
||||
* @param limitingVelocitySpeed 限速速度
|
||||
*/
|
||||
private fun dispatchShowWaring(limitingVelocitySpeed: Int) {
|
||||
CallerHmiManager.showLimitingVelocity(limitingVelocitySpeed)
|
||||
CallerHmiManager.showLimitingVelocity(limitingVelocitySpeed, 1)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,7 +76,7 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
|
||||
tag: String?
|
||||
) {
|
||||
if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) {
|
||||
CallerHmiManager.showLimitingVelocity(1)
|
||||
CallerHmiManager.showLimitingVelocity(1, 1)
|
||||
}
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-V2XWarningBR", "alertContent或ttsContent为空!")
|
||||
|
||||
@@ -663,18 +663,26 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
/**
|
||||
* 控制展示限速标志及内容
|
||||
*/
|
||||
override fun showLimitingVelocity(limitingSpeed: Int) {
|
||||
override fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int) {
|
||||
// 控制 限速UI 展示
|
||||
if (HmiBuildConfig.isShowLimitingVelocityView) {
|
||||
if (limitingSpeed > 0) {
|
||||
mViewLimitingVelocity?.visibility = View.VISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed)
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.VISIBLE
|
||||
if (limitSpeedSource == 1) {
|
||||
tvLimitingSource.text = "MAP"
|
||||
} else if (limitSpeedSource == 2) {
|
||||
tvLimitingSource.text = "RSU"
|
||||
}
|
||||
} else {
|
||||
mViewLimitingVelocity?.visibility = View.INVISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0)
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.INVISIBLE
|
||||
}
|
||||
} else {
|
||||
disableLimitingVelocity()
|
||||
tvLimitingSource?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -683,7 +691,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
*/
|
||||
override fun disableLimitingVelocity() {
|
||||
mViewLimitingVelocity?.visibility = View.GONE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0)
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, 1)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,6 +78,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* obu弱势交通控制
|
||||
*/
|
||||
tbObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
|
||||
tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) { //默认开启
|
||||
CallerHmiManager.setObuWeaknessTraffic(true)
|
||||
@@ -89,6 +90,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 云端弱势交通控制
|
||||
*/
|
||||
tbCloudWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowCloudWeaknessTrafficView
|
||||
tbCloudWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) { //默认关闭
|
||||
CallerHmiManager.setCloudWeaknessTraffic(true)
|
||||
|
||||
@@ -20,8 +20,8 @@ class LimitingVelocityView @JvmOverloads constructor(
|
||||
LayoutInflater.from(context).inflate(R.layout.view_limiting_speed_vr, this, true)
|
||||
}
|
||||
|
||||
override fun updateLimitingSpeed(limitingSpeed: Int) {
|
||||
super.updateLimitingSpeed(limitingSpeed)
|
||||
override fun updateLimitingSpeed(limitingSpeed: Int, limitSource: Int) {
|
||||
super.updateLimitingSpeed(limitingSpeed, limitSource)
|
||||
tvLimitingVelocity.text = "$limitingSpeed"
|
||||
}
|
||||
}
|
||||
@@ -179,6 +179,21 @@
|
||||
app:layout_goneMarginTop="40dp"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<!--限速来源-->
|
||||
<TextView
|
||||
android:id="@+id/tvLimitingSource"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewLimitingVelocity" />
|
||||
|
||||
<!--消息盒子司机端选择入口-->
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBoxDriver"
|
||||
|
||||
Reference in New Issue
Block a user