[6.7.0]红绿灯自车感知默认展示,去掉运营面板红绿灯开关

This commit is contained in:
xuxinchao
2024-10-11 11:45:28 +08:00
parent 4e3aff73c5
commit 7bbd260b99
7 changed files with 31 additions and 142 deletions

View File

@@ -150,18 +150,16 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
if(light.nextState == null || light.nextState == FusionTrafficLightOuterClass.FusionLightState.STATE_OFF_FUSION
|| light.nextTwoState == null || light.nextTwoState == FusionTrafficLightOuterClass.FusionLightState.STATE_OFF_FUSION){
if (HmiBuildConfig.isShowCarSourceTrafficLightView) {
var lightRemain = light.duration.toInt()
val source = when (trafficLights.source) {
1 -> DataSourceType.TELEMATIC_UNION_V2I
2 -> DataSourceType.TELEMATIC_UNION_V2N
else -> {
lightRemain = 0
DataSourceType.TELEMATIC
}
var lightRemain = light.duration.toInt()
val source = when (trafficLights.source) {
1 -> DataSourceType.TELEMATIC_UNION_V2I
2 -> DataSourceType.TELEMATIC_UNION_V2N
else -> {
lightRemain = 0
DataSourceType.TELEMATIC
}
onTrafficLightPlusSource(convert(light.state), lightRemain, source)
}
onTrafficLightPlusSource(convert(light.state), lightRemain, source)
}else{
Log.i(TAG,"current state="+light.state+" current duration="+light.duration+
" nextState="+light.nextState+" nextDuration="+light.nextDuration+
@@ -305,27 +303,25 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
*/
override fun onEnterCrossRoad(enter: Boolean) {
CallerLogger.d("${SceneConstant.M_D_C}${TAG}", "onEnterCrossRoad enter = $enter ")
if (HmiBuildConfig.isShowCarSourceTrafficLightView) {
return
}
if (!enter) {
Handler().postDelayed({
hasAiLightStatus = false
hasObuLightStatus = false
hasFusionLightStatus = false
}, 5000)
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
CallerTelematicManager.sendMsgToAllClients(
TelematicConstant.HIDE_TRAFFIC_LIGHT,
"0".toByteArray()
)
}
//如果没有OBU灯态则进行隐藏如果有OBU灯态则交由OBU管理
if (!hasObuLightStatus) {
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
// hide("云端离开路口隐藏", DataSourceType.AICLOUD)
}
}
// if (!enter) {
// Handler().postDelayed({
// hasAiLightStatus = false
// hasObuLightStatus = false
// hasFusionLightStatus = false
// }, 5000)
// if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
// CallerTelematicManager.sendMsgToAllClients(
// TelematicConstant.HIDE_TRAFFIC_LIGHT,
// "0".toByteArray()
// )
// }
// //如果没有OBU灯态则进行隐藏如果有OBU灯态则交由OBU管理
// if (!hasObuLightStatus) {
// CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
//// hide("云端离开路口隐藏", DataSourceType.AICLOUD)
// }
// }
}
/**
@@ -336,9 +332,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
"${SceneConstant.M_D_C}${TAG}",
"onTrafficRequestError hasObuLightStatus = $hasObuLightStatus ------> "
)
if (HmiBuildConfig.isShowCarSourceTrafficLightView) {
return
}
CallerTrafficLightListenerManager.resetTrafficLightStatus(hasAiLightStatus)
hasAiLightStatus = false
// if (!hasObuLightStatus) {
@@ -515,9 +508,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
}
private fun updateTrafficLight(trafficLightResult: TrafficLightResult) {
if(HmiBuildConfig.isShowCarSourceTrafficLightView){
return
}
val currentTrafficLight = trafficLightResult.currentRoadTrafficLight()
CallerLogger.d(
"${SceneConstant.M_D_C}${TAG}",
@@ -536,7 +526,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
}
private fun filterTelematicUnion(source: DataSourceType): Boolean {
return HmiBuildConfig.isShowCarSourceTrafficLightView && source != DataSourceType.TELEMATIC_UNION_V2N && source != DataSourceType.TELEMATIC_UNION_V2I && source != DataSourceType.TELEMATIC
return source != DataSourceType.TELEMATIC_UNION_V2N && source != DataSourceType.TELEMATIC_UNION_V2I && source != DataSourceType.TELEMATIC
}
fun destroy() {

View File

@@ -652,8 +652,6 @@ class OperatePanelLayout : LinearLayout {
class BusinessPreferenceFragmentCompat : OperatePanelDetailBase() {
companion object {
private const val KEY_RED_OR_GREEN_LIGHT_MARKER = "red_or_green_light_marker"
private const val KEY_RED_OR_GREEN_LIGHT_MERGE_MARKER = "red_or_green_light_merge_marker"
private const val KEY_FAULT_REPORT_TIP = "fault_report_tip"
private const val KEY_LIMIT_SPEED_MARKER = "limit_speed_marker"
private const val KEY_WEATHER_EFFECT_SWITCH = "weather_effect_switch"
@@ -666,12 +664,6 @@ class OperatePanelLayout : LinearLayout {
override fun getDefaultVal(pref: Preference): Any? {
when (pref.key) {
KEY_RED_OR_GREEN_LIGHT_MARKER -> {
return HmiBuildConfig.isShowTrafficLightView
}
KEY_RED_OR_GREEN_LIGHT_MERGE_MARKER -> {
return HmiBuildConfig.isShowCarSourceTrafficLightView
}
KEY_FAULT_REPORT_TIP -> {
return FunctionBuildConfig.isReportWarning
}
@@ -748,25 +740,6 @@ class OperatePanelLayout : LinearLayout {
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
when (preference.key) {
KEY_RED_OR_GREEN_LIGHT_MARKER -> {
val isChecked = newValue as? Boolean ?: false
hmiAction("SOP 红绿灯标识开关, ", isChecked)
HmiBuildConfig.isShowTrafficLightView = isChecked
clickEventAnalytics("红绿灯标识", isChecked)
if (isChecked) {
CallerHmiManager.showTrafficLightView()
} else {
CallerHmiManager.hideTrafficLightView()
}
return true
}
KEY_RED_OR_GREEN_LIGHT_MERGE_MARKER -> {
val isChecked = newValue as? Boolean ?: false
hmiAction("SOP 红绿灯车端来源标识开关, ", isChecked)
clickEventAnalytics("红绿灯车端融合标识", isChecked)
HmiBuildConfig.isShowCarSourceTrafficLightView = isChecked
return true
}
KEY_FAULT_REPORT_TIP -> {
val isChecked = newValue as? Boolean ?: false
hmiAction("SOP 是否开启异常上报, ", isChecked)

View File

@@ -58,7 +58,6 @@ import kotlinx.android.synthetic.main.view_sop_setting.view.rbThirty
import kotlinx.android.synthetic.main.view_sop_setting.view.rgFusionMode
import kotlinx.android.synthetic.main.view_sop_setting.view.rgPullTime
import kotlinx.android.synthetic.main.view_sop_setting.view.scCarAperture
import kotlinx.android.synthetic.main.view_sop_setting.view.scCarUnionTrafficLight
import kotlinx.android.synthetic.main.view_sop_setting.view.scConnectionSwitch
import kotlinx.android.synthetic.main.view_sop_setting.view.scDemoMode
import kotlinx.android.synthetic.main.view_sop_setting.view.scDrawPointCloudData
@@ -83,7 +82,6 @@ import kotlinx.android.synthetic.main.view_sop_setting.view.scShowBagRecordWindo
import kotlinx.android.synthetic.main.view_sop_setting.view.scSpeedLimit
import kotlinx.android.synthetic.main.view_sop_setting.view.scSweeperModeSwitch
import kotlinx.android.synthetic.main.view_sop_setting.view.scTakeOverRemind
import kotlinx.android.synthetic.main.view_sop_setting.view.scTrafficLight
import kotlinx.android.synthetic.main.view_sop_setting.view.scV2ISwitch
import kotlinx.android.synthetic.main.view_sop_setting.view.scV2NSwitch
import kotlinx.android.synthetic.main.view_sop_setting.view.scV2XSwitch
@@ -718,26 +716,6 @@ internal class SOPSettingView @JvmOverloads constructor(
* 其他类别开关设置
*/
private fun otherSetting() {
//红绿灯标识开关
scTrafficLight.isChecked = !HmiBuildConfig.isShowTrafficLightView
scTrafficLight.setOnCheckedChangeListener { _, isChecked ->
hmiAction("SOP 红绿灯标识开关, ", isChecked)
clickEventAnalytics("红绿灯标识",isChecked)
if (isChecked) {
CallerHmiManager.showTrafficLightView()
} else {
CallerHmiManager.hideTrafficLightView()
}
}
//红绿灯车端来源标识开关
scCarUnionTrafficLight.isChecked = HmiBuildConfig.isShowCarSourceTrafficLightView
scCarUnionTrafficLight.setOnCheckedChangeListener { _, isChecked ->
hmiAction("SOP 红绿灯车端来源标识开关, ", isChecked)
clickEventAnalytics("红绿灯车端融合标识",isChecked)
HmiBuildConfig.isShowCarSourceTrafficLightView = isChecked
}
//系统启动状态展示
scConnectionSwitch.isChecked = HmiBuildConfig.isShowConnectionProgressView
scConnectionSwitch.setOnCheckedChangeListener { _, isChecked ->

View File

@@ -120,9 +120,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
UiThreadHandler.post {
CallerLogger.d("$M_HMI$TAG","update checkLightId:$checkLightId, lightSource: $lightSource")
mCurrentLightId = checkLightId
if (!HmiBuildConfig.isShowTrafficLightView) {
updateTrafficLightIcon(checkLightId, lightSource)
}
updateTrafficLightIcon(checkLightId, lightSource)
}
}

View File

@@ -727,31 +727,6 @@
app:layout_constraintLeft_toLeftOf="@id/tvOtherTitle"
app:layout_constraintRight_toRightOf="parent" />
<!--红绿灯标识-->
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/scTrafficLight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:scaleX="1.2"
android:scaleY="1.2"
android:text="红绿灯标识"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="@id/otherGuideLine"
app:layout_constraintTop_toBottomOf="@id/tvOtherTitle" />
<!--红绿灯新链路 车端融合标识-->
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/scCarUnionTrafficLight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:scaleX="1.2"
android:scaleY="1.2"
android:text="红绿灯车端融合标识"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toRightOf="@id/otherGuideLine"
app:layout_constraintTop_toBottomOf="@id/tvOtherTitle" />
<!--限速标识-->
<androidx.appcompat.widget.SwitchCompat
@@ -764,7 +739,7 @@
android:text="限速标识"
app:layout_constraintLeft_toRightOf="@id/otherGuideLine"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/scCarUnionTrafficLight" />
app:layout_constraintTop_toBottomOf="@id/tvOtherTitle" />
<!--异常上报提示-->
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/scIPCReport"
@@ -776,7 +751,7 @@
android:text="异常上报提示"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="@id/otherGuideLine"
app:layout_constraintTop_toBottomOf="@id/scTrafficLight" />
app:layout_constraintTop_toBottomOf="@id/tvOtherTitle" />
<!--360环视-->
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/scNew360LookAround"

View File

@@ -3,18 +3,6 @@
<PreferenceCategory
android:layout="@layout/layout_operate_panel_preference_category_title"
android:title="业务类">
<SwitchPreferenceCompat
android:key="red_or_green_light_marker"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="红绿灯标识"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="red_or_green_light_merge_marker"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="红绿灯融合标识"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="fault_report_tip"
android:layout="@layout/layout_operate_panel_preference_switch_compat"