Merge branch 'dev_minibus-d_230425_3.2.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_minibus-d_230425_3.2.0
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.BusPassengerTrafficLightView
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
|
||||
android:id="@+id/bus_p_traffic_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
app:roma_close="@drawable/roma_bus_p_bg_selector"
|
||||
app:roma_open="@drawable/iv_roma_bus_passenger_press_bg" />
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.BusPassengerTrafficLightView
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
|
||||
android:id="@+id/bus_p_traffic_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -14,12 +14,16 @@ import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.TrafficLightView_TAG
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.hmi_view_traffic_light.view.*
|
||||
|
||||
/**
|
||||
* 新版红绿灯view
|
||||
@@ -28,7 +32,8 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
context: Context?,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IViewControlListener, IMoGoTrafficLightListener {
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IViewControlListener, IMoGoTrafficLightListener,
|
||||
IMoGoSkinModeChangeListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "SingleTrafficLightView"
|
||||
@@ -50,6 +55,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
mLightSourceTV = findViewById(R.id.hmi_traffic_light_source)
|
||||
mLightSourceDivider = findViewById(R.id.hmi_traffic_light_divider)
|
||||
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(TrafficLightView_TAG, this)
|
||||
}
|
||||
@@ -61,10 +67,28 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
CallerHmiViewControlListenerManager.removeListener(TrafficLightView_TAG)
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
when (skinMode) {
|
||||
0 -> {
|
||||
hmi_traffic_light_bg.setBackgroundResource(R.drawable.traffic_light_bg)
|
||||
hmi_traffic_light_source.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
hmi_traffic_light_divider.setBackgroundColor(resources.getColor(R.color.color_FFFFFF))
|
||||
}
|
||||
1 -> {
|
||||
hmi_traffic_light_bg.setBackgroundResource(R.drawable.traffic_light_bg_day_light)
|
||||
hmi_traffic_light_source.setTextColor(resources.getColor(R.color.color_2D3E5F))
|
||||
hmi_traffic_light_divider.setBackgroundColor(resources.getColor(R.color.color_2D3E5F))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
|
||||
@@ -48,12 +48,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
CallerDevaToolsManager.INSTANCE.updateUpgradeProgress();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldInit() {
|
||||
CallerLogger.INSTANCE.w(M_HMI + TAG, "evaluate shouldInit() with: " + ProcessUtils.getProcessName(Process.myPid()));
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化异常采集配置
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#CCFFFFFF"/>
|
||||
<corners android:radius="@dimen/hmi_traffic_light_layout_corner"/>
|
||||
</shape>
|
||||
@@ -12,7 +12,6 @@
|
||||
android:layout_height="@dimen/hmi_traffic_light_bg_height"
|
||||
android:layout_marginStart="@dimen/hmi_traffic_light_bg_margin_left"
|
||||
android:layout_marginTop="@dimen/hmi_traffic_light_bg_margin_top"
|
||||
android:background="@drawable/traffic_light_bg"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
@@ -41,7 +40,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="自车感知"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="@dimen/hmi_traffic_light_source_size"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -53,7 +51,6 @@
|
||||
android:id="@+id/hmi_traffic_light_divider"
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:background="@color/color_FFFFFF"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/hmi_traffic_light_source"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<color name="color_0099dd">#0099dd</color>
|
||||
<color name="color_FFFFFF">#FFFFFF</color>
|
||||
<color name="color_2C2E30">#2C2E30</color>
|
||||
<color name="color_2D3E5F">#2D3E5F</color>
|
||||
<color name="color_D4D8DC">#D4D8DC</color>
|
||||
<color name="color_27FFFFFF">#27FFFFFF</color>
|
||||
<color name="color_1E111111">#1E111111</color>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -18,6 +18,11 @@ interface IMoGoTrafficLightListener {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否重置
|
||||
*/
|
||||
fun resetTrafficLight(isReset: Boolean) {}
|
||||
|
||||
/**
|
||||
* 云端红绿灯接口请求失败
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@ object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>
|
||||
}
|
||||
|
||||
fun invokeTrafficLightStatus(trafficLightResult: TrafficLightResult) {
|
||||
CallerTrafficLightListenerManager.trafficLightResult = trafficLightResult
|
||||
this.trafficLightResult = trafficLightResult
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onTrafficLightStatus(trafficLightResult)
|
||||
@@ -57,10 +57,11 @@ object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>
|
||||
*/
|
||||
fun resetTrafficLightStatus(hideTrafficLight:Boolean = true) {
|
||||
trafficLightResult = null
|
||||
// 隐藏traffic light
|
||||
if(hideTrafficLight){
|
||||
disableTrafficLight()
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.resetTrafficLight(hideTrafficLight)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) {
|
||||
|
||||
@@ -12,6 +12,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.SoftKeyBoardJobber;
|
||||
|
||||
import me.jessyan.autosize.AutoSizeCompat;
|
||||
@@ -34,6 +35,9 @@ public abstract class MvpActivity<V extends IView, P extends Presenter<V>> exten
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
|
||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
super.onCreate(savedInstanceState);
|
||||
if (!ProcessUtils.isMainProcess(this)) {
|
||||
return;
|
||||
}
|
||||
setContentView(getLayoutId());
|
||||
initViews();
|
||||
mPresenter = createPresenter();
|
||||
@@ -112,7 +116,7 @@ public abstract class MvpActivity<V extends IView, P extends Presenter<V>> exten
|
||||
|
||||
@Override
|
||||
public Resources getResources() {
|
||||
if ( Looper.myLooper() == Looper.getMainLooper()) {
|
||||
if (Looper.myLooper() == Looper.getMainLooper()) {
|
||||
AutoSizeCompat.autoConvertDensityOfGlobal(super.getResources());
|
||||
}
|
||||
return super.getResources();
|
||||
|
||||
@@ -66,23 +66,23 @@ SERVICE_BIZ_VERSION=1.2.4
|
||||
LOGLIB_VERSION=1.5.27
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.4.6.7
|
||||
MOGO_NETWORK_VERSION=1.4.6.8
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.4.6.7
|
||||
MOGO_PASSPORT_VERSION=1.4.6.8
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.4.6.7
|
||||
MOGO_SOCKET_VERSION=1.4.6.8
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.4.6.7
|
||||
MOGO_REALTIME_VERSION=1.4.6.8
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.4.6.7
|
||||
MOGO_TANLU_VERSION=1.4.6.8
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.4.6.7
|
||||
MOGO_LIVE_VERSION=1.4.6.8
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.6.7
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.6.8
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.4.6.7
|
||||
MOGO_LOCATION_VERSION=1.4.6.8
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.4.6.7
|
||||
MOGO_TELEMATIC_VERSION=1.4.6.8
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.12.1.1
|
||||
|
||||
Reference in New Issue
Block a user