add func of toggle of beauty func

This commit is contained in:
zhongchao
2022-08-16 14:31:40 +08:00
parent a97f7f870a
commit fcc83d87ff
5 changed files with 50 additions and 5 deletions

View File

@@ -565,6 +565,15 @@ class DebugSettingView @JvmOverloads constructor(
tbIsRainMode.visibility = View.GONE
}
tbBeautyMode.isChecked = FunctionBuildConfig.isBeautyMode
//感知优化模式
tbBeautyMode.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.isBeautyMode = isChecked
if (!FunctionBuildConfig.isBeautyMode) {
tbBeautyMode.isChecked = false
}
}
//重启工控机所有节点
btnIpcReboot.onClick {
CallerAutoPilotManager.sendIpcReboot()

View File

@@ -232,6 +232,17 @@
android:textSize="@dimen/dp_24"
android:background="@drawable/radio_button_normal_background_right"/>
<ToggleButton
android:id="@+id/tbBeautyMode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:textColor="#000"
android:textOff="开启感知优化模式"
android:textOn="关闭感知优化模式"
android:textSize="@dimen/dp_24"
android:background="@drawable/radio_button_normal_background_right"/>
<Button
android:id="@+id/btnIpcReboot"
android:layout_width="match_parent"