[2.13.0] 添加obu v2i和v2n的开关

This commit is contained in:
lixiaopeng
2022-12-12 15:25:34 +08:00
parent 990cff2390
commit 5011ffa22b
5 changed files with 679 additions and 616 deletions

View File

@@ -95,11 +95,32 @@ class SOPSettingView @JvmOverloads constructor(
}
}
/**
* 限速数据来源开关
*/
tbRoadLimitSpeedSop.setOnCheckedChangeListener { _, isChecked ->
//默认关闭
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
}
/**
* obu V2V开关
*/
tbObuV2vView.setOnCheckedChangeListener { _, isChecked ->
//默认关闭
HmiBuildConfig.isShowObuV2vView = isChecked
Log.d("liyz", "v2v isChecked = $isChecked")
}
/**
* obu V2i开关
*/
tbObuV2iView.setOnCheckedChangeListener { _, isChecked ->
//默认关闭
HmiBuildConfig.isShowObuV2iView = isChecked
Log.d("liyz", "viv isChecked = $isChecked")
}
//红绿灯标识
tbTrafficLight.isChecked = HmiBuildConfig.isShowTrafficLightView
tbTrafficLight.setOnCheckedChangeListener { _, isChecked ->

View File

@@ -129,6 +129,30 @@
app:layout_constraintTop_toBottomOf="@id/tbRainMode"
/>
<ToggleButton
android:id="@+id/tbObuV2vView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_20"
android:background="@drawable/radio_button_normal_background_right"
android:textColor="#000"
android:textOff="展示v2v事件"
android:textOn="不展示v2v事件"
app:layout_constraintTop_toBottomOf="@id/tbObu"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbObuV2iView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_20"
android:background="@drawable/radio_button_normal_background_right"
android:textColor="#000"
android:textOff="展示v2i事件"
android:textOn="不展示v2i事件"
app:layout_constraintTop_toBottomOf="@id/tbObuV2vView"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbObuWeaknessTrafficSop"
android:layout_width="match_parent"
@@ -136,7 +160,7 @@
android:layout_margin="@dimen/dp_10"
android:padding="@dimen/dp_20"
android:background="@drawable/radio_button_normal_background_right"
app:layout_constraintTop_toBottomOf="@id/tbObu"
app:layout_constraintTop_toBottomOf="@id/tbObuV2iView"
android:textOff="关闭路侧弱势群体预警"
android:textOn="打开路侧弱势群体预警"
android:textSize="@dimen/dp_24" />