[dev_opt_2.15.0]运营面板增加V2N场景进PNC开关
This commit is contained in:
@@ -87,6 +87,18 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
HmiBuildConfig.isShowCloudWeaknessTrafficView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* V2N场景进PNC
|
||||
*/
|
||||
tbV2nPnc.isChecked = FunctionBuildConfig.isV2NPnc
|
||||
tbV2nPnc.setOnCheckedChangeListener{ compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
CallerAutoPilotControlManager.sendV2nToPncCmd(isChecked)
|
||||
FunctionBuildConfig.isV2NPnc = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* obu V2V开关,默认打开
|
||||
*/
|
||||
@@ -239,29 +251,12 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION, TAG, true, this
|
||||
)
|
||||
// 开启定时查询速度
|
||||
Timer().schedule(timerTaskRefresh, Date(), 500)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(FuncBizConfig.FOUNDATION, TAG)
|
||||
try {
|
||||
timerTaskRefresh.cancel()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
private val timerTaskRefresh = object : TimerTask(){
|
||||
override fun run() {
|
||||
UiThreadHandler.post{
|
||||
tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun updateBizView(type: String, lock: Boolean) {
|
||||
|
||||
@@ -233,6 +233,20 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbV2nPnc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="V2N场景进PNC"
|
||||
android:paddingTop="25dp"
|
||||
android:paddingBottom="25dp"
|
||||
android:scaleY="1.2"
|
||||
android:scaleX="1.2"
|
||||
app:layout_constraintLeft_toRightOf="@id/verticalGuideLine"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbGreenWaveSop"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSpeedThresholdTitle"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user