From eb59f97196d216dda41f10e10b70cd6e9e813414 Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Thu, 17 Mar 2022 11:46:14 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E7=A7=BB=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_ipc_monitoring/.gitignore | 1 + app_ipc_monitoring/proguard-rules.pro | 26 ++++++++++ .../support/adas/high/common/MessageType.java | 50 +++++++++---------- .../adas/high/msg/MyMessageFactory.java | 2 +- 4 files changed, 52 insertions(+), 27 deletions(-) create mode 100644 app_ipc_monitoring/.gitignore create mode 100644 app_ipc_monitoring/proguard-rules.pro diff --git a/app_ipc_monitoring/.gitignore b/app_ipc_monitoring/.gitignore new file mode 100644 index 0000000000..796b96d1c4 --- /dev/null +++ b/app_ipc_monitoring/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app_ipc_monitoring/proguard-rules.pro b/app_ipc_monitoring/proguard-rules.pro new file mode 100644 index 0000000000..f10712073b --- /dev/null +++ b/app_ipc_monitoring/proguard-rules.pro @@ -0,0 +1,26 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile + +#-----MogoMap----- +-keep class com.mogo.map.MogoNavi{ + private (); +} diff --git a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/common/MessageType.java b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/common/MessageType.java index 1ba18b8e1c..a12f554de7 100644 --- a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/common/MessageType.java +++ b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/common/MessageType.java @@ -11,38 +11,37 @@ import mogo.telematics.pad.MessagePad; */ public enum MessageType { - TYPE_DEFAULT("default", MessagePad.MessageType.MsgTypeDefault, "默认"), - TYPE_RECEIVE_TRAJECTORY("trajectory", MessagePad.MessageType.MsgTypeTrajectory, "局部轨迹,车前引导线"), - TYPE_RECEIVE_TRACKED_OBJECTS("tracked_objects", MessagePad.MessageType.MsgTypeTrackedObjects, "障碍物信息"), - TYPE_RECEIVE_GNSS_INFO("gnss_info", MessagePad.MessageType.MsgTypeGnssInfo, "惯导信息"), - TYPE_RECEIVE_VEHICLE_STATE("vehicle_state", MessagePad.MessageType.MsgTypeVehicleState, "底盘信息, 透传底盘状态,pb参考底盘"), - TYPE_RECEIVE_AUTOPILOT_STATE("autopilot_state", MessagePad.MessageType.MsgTypeAutopilotState, "自动驾驶状态"), - TYPE_RECEIVE_REPORT_MESSAGE("report_message", MessagePad.MessageType.MsgTypeReportMessage, "监控事件报告"), + TYPE_DEFAULT(MessagePad.MessageType.MsgTypeDefault, "默认"), + TYPE_RECEIVE_TRAJECTORY(MessagePad.MessageType.MsgTypeTrajectory, "局部轨迹,车前引导线"), + TYPE_RECEIVE_TRACKED_OBJECTS(MessagePad.MessageType.MsgTypeTrackedObjects, "障碍物信息"), + TYPE_RECEIVE_GNSS_INFO(MessagePad.MessageType.MsgTypeGnssInfo, "惯导信息"), + TYPE_RECEIVE_VEHICLE_STATE(MessagePad.MessageType.MsgTypeVehicleState, "底盘信息, 透传底盘状态,pb参考底盘"), + TYPE_RECEIVE_AUTOPILOT_STATE(MessagePad.MessageType.MsgTypeAutopilotState, "自动驾驶状态"), + TYPE_RECEIVE_REPORT_MESSAGE(MessagePad.MessageType.MsgTypeReportMessage, "监控事件报告"), - TYPE_RECEIVE_BASIC_INFO_REQ("basic_info_req", MessagePad.MessageType.MsgTypeBasicInfoReq, "自动驾驶设备基础信息请求"), - TYPE_SEND_BASIC_INFO_RESP("basic_info_resp", MessagePad.MessageType.MsgTypeBasicInfoResp, "自动驾驶设备基础信息应答"), - TYPE_SEND_SET_AUTOPILOT_MODE_REQ("set_autopilot_mode_req", MessagePad.MessageType.MsgTypeSetAutopilotModeReq, "设置自动驾驶模式 启动自动驾驶"), - TYPE_SEND_SET_DEMO_MODE_REQ("set_demo_mode_req", MessagePad.MessageType.MsgTypeSetDemoModeReq, "设置演示模式"), - TYPE_SEND_CAR_CONFIG_REQ("car_config_req", MessagePad.MessageType.MsgTypeCarConfigReq, "车机基础信息请求"), - TYPE_RECEIVE_CAR_CONFIG_RESP("car_config_resp", MessagePad.MessageType.MsgTypeCarConfigResp, "车机基础信息应答"), - TYPE_SEND_RECORD_CAUSE("record_cause", MessagePad.MessageType.MsgTypeRecordCause, "记录人工接管原因"), - TYPE_SEND_RECORD_DATA("record_data", MessagePad.MessageType.MsgTypeRecordData, "数据采集请求"), - TYPE_RECEIVE_RECORD_RESULT("record_result", MessagePad.MessageType.MsgTypeRecordResult, "数据采集结果"), - TYPE_SEND_SET_AUTOPILOT_SPEED_REQ("set_autopilot_speed_req", MessagePad.MessageType.MsgTypeSetAutopilotSpeedReq, "设置自动驾驶最大速度"), - TYPE_SEND_GLOBAL_PATH_REQ("global_path_req", MessagePad.MessageType.MsgTypeGlobalPathReq, "自动驾驶路径请求"), - TYPE_RECEIVE_GLOBAL_PATH_RESP("global_path_resp", MessagePad.MessageType.MsgTypeGlobalPathResp, "自动驾驶路径应答"), - TYPE_SEND_TRAFFIC_LIGHT_DATA("traffic_light_data", MessagePad.MessageType.MsgTypeTrafficLightData, "发送红绿灯数据到工控机"), + TYPE_RECEIVE_BASIC_INFO_REQ(MessagePad.MessageType.MsgTypeBasicInfoReq, "自动驾驶设备基础信息请求"), + TYPE_SEND_BASIC_INFO_RESP(MessagePad.MessageType.MsgTypeBasicInfoResp, "自动驾驶设备基础信息应答"), + TYPE_SEND_SET_AUTOPILOT_MODE_REQ(MessagePad.MessageType.MsgTypeSetAutopilotModeReq, "设置自动驾驶模式 启动自动驾驶"), + TYPE_SEND_SET_DEMO_MODE_REQ(MessagePad.MessageType.MsgTypeSetDemoModeReq, "设置演示模式"), + TYPE_SEND_CAR_CONFIG_REQ(MessagePad.MessageType.MsgTypeCarConfigReq, "车机基础信息请求"), + TYPE_RECEIVE_CAR_CONFIG_RESP(MessagePad.MessageType.MsgTypeCarConfigResp, "车机基础信息应答"), + TYPE_SEND_RECORD_CAUSE(MessagePad.MessageType.MsgTypeRecordCause, "记录人工接管原因"), + TYPE_SEND_RECORD_DATA(MessagePad.MessageType.MsgTypeRecordData, "数据采集请求"), + TYPE_RECEIVE_RECORD_RESULT(MessagePad.MessageType.MsgTypeRecordResult, "数据采集结果"), + TYPE_SEND_SET_AUTOPILOT_SPEED_REQ(MessagePad.MessageType.MsgTypeSetAutopilotSpeedReq, "设置自动驾驶最大速度"), + TYPE_SEND_GLOBAL_PATH_REQ(MessagePad.MessageType.MsgTypeGlobalPathReq, "自动驾驶路径请求"), + TYPE_RECEIVE_GLOBAL_PATH_RESP(MessagePad.MessageType.MsgTypeGlobalPathResp, "自动驾驶路径应答"), + TYPE_SEND_TRAFFIC_LIGHT_DATA(MessagePad.MessageType.MsgTypeTrafficLightData, "发送红绿灯数据到工控机"), @Deprecated - TYPE_RECEIVE_WARN("warn", MessagePad.MessageType.MsgTypeWarn, "预警数据"), - TYPE_RECEIVE_ARRIVAL_NOTIFICATION("arrival_notification", MessagePad.MessageType.MsgTypeArrivalNotification, "到站提醒"), + TYPE_RECEIVE_WARN(MessagePad.MessageType.MsgTypeWarn, "预警数据"), + TYPE_RECEIVE_ARRIVAL_NOTIFICATION(MessagePad.MessageType.MsgTypeArrivalNotification, "到站提醒"), /** * 工控机升级状态 */ @Deprecated - TYPE_RECEIVE_IPC_UPGRADE_STATUS("ipc_upgrade_status", null, "IPC升级状态"); + TYPE_RECEIVE_IPC_UPGRADE_STATUS(null, "IPC升级状态"); - public final String typeName; /** * 消息action code */ @@ -52,8 +51,7 @@ public enum MessageType { */ public final String desc; - MessageType(String typeName, MessagePad.MessageType typeCode, String desc) { - this.typeName = typeName; + MessageType(MessagePad.MessageType typeCode, String desc) { this.typeCode = typeCode; this.desc = desc; } diff --git a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/msg/MyMessageFactory.java b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/msg/MyMessageFactory.java index 6e6939e767..4ea47e0ee5 100644 --- a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/msg/MyMessageFactory.java +++ b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/msg/MyMessageFactory.java @@ -32,7 +32,7 @@ public class MyMessageFactory implements IMyMessageFactory { @Override public IMsg createMessage(String messageType) { - if (MessageType.TYPE_RECEIVE_IPC_UPGRADE_STATUS.typeName.equals(messageType)) { + if ("ipc_upgrade_status".equals(messageType)) { //ws 工控机升级状态 if (autopilotUpgradeStatusMessage == null) { autopilotUpgradeStatusMessage = new WsAutopilotUpgradeStatusMessage();