[dev_minibus-d_230425_3.2.0] 修改红绿灯闪烁问题,优化红绿灯读秒三位数显示不全问题
This commit is contained in:
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02Lis
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_CROSS_ROAD
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_TRAFFIC_LIGHT
|
||||
@@ -100,7 +101,6 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
}
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus()
|
||||
CallerTrafficLightListenerManager.invokeTrafficRequestError()
|
||||
|
||||
})
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -51,7 +51,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
val INSTANCE: TrafficLightDispatcher by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
TrafficLightDispatcher()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private var mContext: Context? = null
|
||||
@@ -156,7 +155,20 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
hide()
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否重置红绿灯数据,需要确保,在obu的红绿灯显示的时候,不执行。否则会闪屏
|
||||
*/
|
||||
override fun resetTrafficLight(isReset: Boolean) {
|
||||
CallerLogger.d("${SceneConstant.M_OBU}${TAG}", "resetTrafficLight ------> isReset = $isReset ")
|
||||
if (!hasObuLightStatus) {
|
||||
if(isReset){
|
||||
hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun hide(){
|
||||
CallerLogger.d("${SceneConstant.M_OBU}${TAG}", "hide() -------> ")
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.HIDE_TRAFFIC_LIGHT, "0".toByteArray())
|
||||
@@ -172,7 +184,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
lightSource: DataSourceType
|
||||
) {
|
||||
super.onTrafficLightPlusSource(light, remain, lightSource)
|
||||
CallerLogger.d("${SceneConstant.M_OBU}${TAG}", "onTrafficLightPlusSource ----- light = $light ---remain = $remain ---lightSource = $lightSource")
|
||||
// CallerLogger.d("${SceneConstant.M_OBU}${TAG}", "onTrafficLightPlusSource ----- light = $light ---remain = $remain ---lightSource = $lightSource")
|
||||
if (lightSource == DataSourceType.OBU) {
|
||||
hasObuLightStatus = true
|
||||
}
|
||||
@@ -213,9 +225,9 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
}
|
||||
onTrafficLightPlusSource(it.convert(), remain, DataSourceType.AICLOUD)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun destroy() {
|
||||
//取消注册监听AI云.OBU,路侧获取红绿灯状态
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<dimen name="hmi_traffic_light_bg_margin_left">15dp</dimen>
|
||||
<dimen name="hmi_traffic_light_bg_margin_top">17dp</dimen>
|
||||
<dimen name="hmi_traffic_light_icon_size">154dp</dimen>
|
||||
<dimen name="hmi_traffic_light_time_view_width">71dp</dimen>
|
||||
<dimen name="hmi_traffic_light_time_view_width">110dp</dimen>
|
||||
<dimen name="hmi_traffic_light_time_size">60dp</dimen>
|
||||
<dimen name="hmi_traffic_light_source_size">32dp</dimen>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user