Merge branch 'dev/dev_eagle_architecture_upgrade' into dev/dev_eagle_wuhan_sikua_obu

# Conflicts:
#	.idea/misc.xml
#	core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckActivity.java
#	core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt
This commit is contained in:
董宏宇
2021-09-30 10:20:15 +08:00
48 changed files with 608 additions and 276 deletions

View File

@@ -29,7 +29,7 @@ public class AdasProvider implements IProvider {
Logger.d(TAG, "初始化 AdasProvider 模块");
adasEventManager = AdasEventManager.getInstance();
initAdas(context, adasEventManager);
initAutoPilotBusiness(context);
// initAutoPilotBusiness(context);
addAdasStatusListener(new IAdasStatusListener() {
@Override

View File

@@ -1402,12 +1402,12 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
}
@Override
public void updateMonitoringStatus(boolean hasError) {
public void updateMonitoringStatus(Integer state) {
Log.d(TAG, "updateCheckStatus");
if (hasError == true) {
tipImageView.setVisibility(View.VISIBLE);
} else {
if (state == 1) {
tipImageView.setVisibility(View.INVISIBLE);
} else {
tipImageView.setVisibility(View.VISIBLE);
}
}

View File

@@ -60,9 +60,9 @@ public class VehicleMonitoring implements Handler.Callback {
return false;
}
public boolean vehicleMonitor() {
public void vehicleMonitor() {
Log.d(TAG, "vehicleMonitor");
return CallerCheckManager.checkMonitor(mContext);
CallerCheckManager.checkMonitor(mContext);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/module_services_remind_background" />
<corners android:bottomLeftRadius="@dimen/module_services_dispatch_cars_dialog_corner" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/module_services_remind_background" />
<corners android:bottomRightRadius="@dimen/module_services_dispatch_cars_dialog_corner" />
</shape>

View File

@@ -67,6 +67,7 @@
android:layout_width="@dimen/module_services_dispatch_cars_dialog_btn_width"
android:layout_height="@dimen/module_services_dispatch_cars_dialog_line_margin_bottom"
android:gravity="center"
android:background="@drawable/module_service_left_corner_bg"
android:text="@string/module_services_dispatch_cars_affirm"
android:textColor="@color/module_services_dispatch_cars_text_loc"
android:textSize="@dimen/module_services_dispatch_cars_dialog_title_size"
@@ -88,6 +89,7 @@
android:gravity="center"
android:text="@string/module_services_dispatch_cars_cancel"
android:textColor="@color/module_services_dispatch_cars_cancel"
android:background="@drawable/module_service_right_corner_bg"
android:textSize="@dimen/module_services_dispatch_cars_dialog_title_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />

View File

@@ -30,7 +30,7 @@
<dimen name="module_services_dispatch_cars_dialog_title_margin_top">55px</dimen>
<dimen name="module_services_dispatch_cars_dialog_content_size">38px</dimen>
<dimen name="module_services_dispatch_cars_dialog_content_margin_top">179px</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_size">56px</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_size">54px</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_margin_top">251px</dimen>
<dimen name="module_services_dispatch_cars_dialog_line_margin_bottom">152px</dimen>
<dimen name="module_services_dispatch_cars_dialog_btn_width">474.5px</dimen>

View File

@@ -89,7 +89,7 @@
<dimen name="module_services_dispatch_cars_dialog_title_margin_top">41px</dimen>
<dimen name="module_services_dispatch_cars_dialog_content_size">28px</dimen>
<dimen name="module_services_dispatch_cars_dialog_content_margin_top">134px</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_size">42px</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_size">40px</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_margin_top">188px</dimen>
<dimen name="module_services_dispatch_cars_dialog_line_margin_bottom">114px</dimen>
<dimen name="module_services_dispatch_cars_dialog_btn_width">355px</dimen>

View File

@@ -18,4 +18,5 @@
<color name="module_services_dispatch_cars_count_down_bg">#4D000000</color>
<color name="module_services_dispatch_cars_line">#66B8BFE8</color>
<color name="module_services_dispatch_cars_cancel">#AFB3C7</color>
<color name="module_services_remind_background">#E63B4577</color>
</resources>

View File

@@ -88,7 +88,7 @@
<dimen name="module_services_dispatch_cars_dialog_title_margin_top">55px</dimen>
<dimen name="module_services_dispatch_cars_dialog_content_size">38px</dimen>
<dimen name="module_services_dispatch_cars_dialog_content_margin_top">179px</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_size">56px</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_size">54px</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_margin_top">251px</dimen>
<dimen name="module_services_dispatch_cars_dialog_line_margin_bottom">152px</dimen>
<dimen name="module_services_dispatch_cars_dialog_btn_width">474.5px</dimen>

View File

@@ -1,26 +0,0 @@
package com.mogo.module.v2x.listener;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
import com.mogo.eagle.core.data.v2x.AdvanceWarningBean;
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.utils.GsonUtil;
/**
* @author chenfufeng
* @description 路口碰撞预警、盲区预警等
* @since: 2021/9/23
*/
public class V2XMessageListener_404000 implements IMogoOnMessageListener<AdvanceWarningBean> {
@Override
public Class target() {
return AdvanceWarningBean.class;
}
@Override
public void onMsgReceived(AdvanceWarningBean message) {
// 将接收到的数据转换成最优车道推荐的场景数据
Logger.i(MODULE_NAME, "V2XMessageListener_404000" + GsonUtil.jsonFromObject(message));
}
}

View File

@@ -0,0 +1,117 @@
package com.mogo.module.v2x.listener
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.service.cloud.socket.IMogoOnMessageListener
import com.mogo.eagle.core.data.v2x.AdvanceWarningBean
import com.mogo.module.v2x.V2XConst
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.api.hmi.warning.WarningStatusListener
import com.mogo.module.common.drawer.TrafficMarkerDrawer
import com.mogo.module.common.enums.EventTypeEnum
import com.mogo.module.v2x.utils.V2XUtils
import com.mogo.utils.logger.Logger
/**
* @author chenfufeng
* @description 路口碰撞预警、盲区预警等
* @since: 2021/9/23
*/
class V2XMessageListener_404000 : IMogoOnMessageListener<AdvanceWarningBean> {
override fun target(): Class<AdvanceWarningBean> {
return AdvanceWarningBean::class.java
}
override fun onMsgReceived(message: AdvanceWarningBean?) {
if (message == null) {
Logger.i(V2XConst.MODULE_NAME, "V2XMessageListener_404000message is null!")
return
}
Logger.i(
V2XConst.MODULE_NAME,
"V2XMessageListener_404000" + com.mogo.utils.network.utils.GsonUtil.jsonFromObject(
message
)
)
V2XUtils.runOnUiThread {
var trafficData = buildTrafficData(message)
when (message.status) {
1 -> {
var tts = ""
var content = ""
var appId = 0
when (message.typeId) {
// 弱势交通碰撞预警
1001 -> {
appId = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt()
tts = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.tts
content = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.content
}
// 弱势交通逆行预警
1002 -> {
appId = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt()
tts = "行人逆行预警"
content = "行人逆行预警"
}
// 交叉路口碰撞预警
1003 -> {
appId = EventTypeEnum.TYPE_USECASE_ID_ICW.poiType.toInt()
tts = EventTypeEnum.TYPE_USECASE_ID_ICW.tts
content = EventTypeEnum.TYPE_USECASE_ID_ICW.content
}
// 盲区预警
1004 -> {
appId = EventTypeEnum.TYPE_USECASE_ID_BSW.poiType.toInt()
tts = String.format(EventTypeEnum.TYPE_USECASE_ID_BSW.tts, getWarningDirection())
content = EventTypeEnum.TYPE_USECASE_ID_BSW.content
}
// 逆向超车预警
1005 -> {
appId = EventTypeEnum.TYPE_USECASE_ID_DNPW.poiType.toInt()
tts = EventTypeEnum.TYPE_USECASE_ID_DNPW.tts
content = EventTypeEnum.TYPE_USECASE_ID_DNPW.content
}
}
// 显示弹框,语音提示
CallerHmiManager.showWarningV2X(appId, content, tts,
"$appId", object : WarningStatusListener {
override fun onShow() {}
override fun onDismiss() {
}
})
TrafficMarkerDrawer.updateITrafficInfo(trafficData)
}
2 -> {
TrafficMarkerDrawer.updateITrafficInfo(trafficData)
}
3 -> {
TrafficMarkerDrawer.removeCvxRvInfoIndInfo(trafficData.uuid)
}
}
}
}
private fun buildTrafficData(message: AdvanceWarningBean): TrafficData {
return TrafficData().apply {
type = when (message.objectType) {
1 -> TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE
2 -> TrafficTypeEnum.TYPE_TRAFFIC_ID_BICYCLE
3 -> TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE
4 -> TrafficTypeEnum.TYPE_TRAFFIC_ID_MOTO
6 -> TrafficTypeEnum.TYPE_TRAFFIC_ID_BUS
8 -> TrafficTypeEnum.TYPE_TRAFFIC_ID_TRUCK
9 -> TrafficTypeEnum.TYPE_TRAFFIC_ID_CAMERA
else -> TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI
}
uuid = message.objectId
lat = message.position.lat
lon = message.position.lon
heading = message.heading
threatLevel = message.threatLevel
}
}
private fun getWarningDirection(): String {
return ""
}
}