[6.7.0]红绿灯自车感知默认展示,去掉运营面板红绿灯开关
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user