[6.7.0][运营面板][V2X] 移除V2N新链路开关,默认走新链路

This commit is contained in:
renwj
2024-09-27 11:26:05 +08:00
parent 99558e84d9
commit d7a52f7f8c
12 changed files with 54 additions and 70 deletions

View File

@@ -301,7 +301,7 @@ class OperatePanelLayout : LinearLayout {
companion object {
private const val KEY_V2X_TOTAL_SWITCH = "v2x_total_switch"
private const val KEY_V2N_TOTAL_SWITCH = "v2n_total_switch"
private const val KEY_V2N_NEW_LINKED = "v2n_new_linked"
// private const val KEY_V2N_NEW_LINKED = "v2n_new_linked"
private const val KEY_V2N_NEW_LINKED_TO_PNC = "v2n_new_linked_to_pnc"
private const val KEY_V2N_NEW_LINKED_GREEN_WAVE = "v2n_new_linked_green_wave"
private const val KEY_V2I_TOTAL_SWITCH = "v2i_total_switch"
@@ -324,9 +324,9 @@ class OperatePanelLayout : LinearLayout {
KEY_V2N_TOTAL_SWITCH -> {
return FunctionBuildConfig.v2nTotalSwitch
}
KEY_V2N_NEW_LINKED -> {
return FunctionBuildConfig.v2nNewLinked
}
// KEY_V2N_NEW_LINKED -> {
// return FunctionBuildConfig.v2nNewLinked
// }
KEY_V2N_NEW_LINKED_TO_PNC -> {
return FunctionBuildConfig.v2nNewLinkedToPNC
}
@@ -382,19 +382,19 @@ class OperatePanelLayout : LinearLayout {
hmiAction("V2N总开关, ", isChecked)
clickEventAnalytics("V2N总开关", isChecked)
if (!isChecked) {
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2N_NEW_LINKED)?.also { changeValue(it, false) }
// preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2N_NEW_LINKED)?.also { changeValue(it, false) }
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2N_NEW_LINKED_TO_PNC)?.also { changeValue(it, false) }
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_V2N_NEW_LINKED_GREEN_WAVE)?.also { changeValue(it, false) }
}
return true
}
KEY_V2N_NEW_LINKED -> {
val isChecked = newValue as? Boolean ?: false
FunctionBuildConfig.v2nNewLinked = isChecked
hmiAction("V2N新链路", isChecked)
clickEventAnalytics("V2N新链路", isChecked)
return true
}
// KEY_V2N_NEW_LINKED -> {
// val isChecked = newValue as? Boolean ?: false
// FunctionBuildConfig.v2nNewLinked = isChecked
// hmiAction("V2N新链路", isChecked)
// clickEventAnalytics("V2N新链路", isChecked)
// return true
// }
KEY_V2N_NEW_LINKED_TO_PNC -> {
val isChecked = newValue as? Boolean ?: false
FunctionBuildConfig.v2nNewLinkedToPNC = isChecked

View File

@@ -199,8 +199,8 @@ internal class SOPSettingView @JvmOverloads constructor(
clickEventAnalytics("V2N总开关",isChecked)
if (isChecked) {
//V2N新链路
scNewV2NData.isChecked = FunctionBuildConfig.v2nNewLinked
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", FunctionBuildConfig.v2nNewLinked)
// scNewV2NData.isChecked = FunctionBuildConfig.v2nNewLinked
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", true)
//V2N场景进PNC
scV2nPnc.isChecked = FunctionBuildConfig.v2nNewLinkedToPNC
hmiAction("SOP V2N场景进PNC, ", FunctionBuildConfig.v2nNewLinkedToPNC)
@@ -237,7 +237,6 @@ internal class SOPSettingView @JvmOverloads constructor(
FunctionBuildConfig.v2nTotalSwitch = isChecked
val map = HashMap<String, Boolean>().also {
it["f1"] = isChecked
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
@@ -291,21 +290,20 @@ internal class SOPSettingView @JvmOverloads constructor(
}
//V2N新链路
scNewV2NData.isChecked = FunctionBuildConfig.v2nNewLinked
scNewV2NData.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
clickEventAnalytics("V2N新链路",isChecked)
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", isChecked)
FunctionBuildConfig.v2nNewLinked = isChecked
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = isChecked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
scNewV2NData.isEnabled = false
// scNewV2NData.setOnCheckedChangeListener { compoundButton, isChecked ->
// if (!compoundButton.isPressed) {
// return@setOnCheckedChangeListener
// }
// clickEventAnalytics("V2N新链路",isChecked)
// hmiAction("SOP 是否是V2N新链路(云->工控机->App)", isChecked)
// FunctionBuildConfig.v2nNewLinked = isChecked
//
// val map = HashMap<String, Boolean>().also {
// it["f1"] = FunctionBuildConfig.v2nTotalSwitch
// }
// CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
// }
//V2N场景进PNC
scV2nPnc.isChecked = FunctionBuildConfig.v2nNewLinkedToPNC

View File

@@ -18,14 +18,14 @@
android:defaultValue="@bool/v2n_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2n_new_linked"
android:title="V2N新链路"
android:persistent="false"
android:dependency="v2n_total_switch"
android:defaultValue="@bool/v2n_new_linked"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<!-- <SwitchPreferenceCompat-->
<!-- android:key="v2n_new_linked"-->
<!-- android:title="V2N新链路"-->
<!-- android:persistent="false"-->
<!-- android:dependency="v2n_total_switch"-->
<!-- android:defaultValue="@bool/v2n_new_linked"-->
<!-- android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"-->
<!-- android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>-->
<SwitchPreferenceCompat
android:key="v2n_new_linked_to_pnc"
android:title="V2N场景进PNC"