[m1][mogo-adas] 不能启动自动驾驶档位参数修改成BuildConfig可配置模式
This commit is contained in:
@@ -38,3 +38,15 @@
|
||||
3. demo: 演示环境(大部分时候都是测试环境)
|
||||
|
||||
## 区分 flavor 功能引入
|
||||
|
||||
|
||||
|
||||
## 不能启动自动驾驶的档位
|
||||
| 车型 | 配置所在文件 | 档位 | 配置 |
|
||||
|:-|:-|:-|:-|
|
||||
| 东风、红旗 | fOchTaxi.gradle、fOchTaxiPassenger.gradle | P、R | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}' |
|
||||
| 金旅小巴 | fOchBus.gradle、fOchBusPassenger.gradle、fOchShuttle.gradle、fOchShuttlePassenger.gradle | N、R | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}' |
|
||||
| M1 | fOchBusPassengerM1.gradle | 不限制档位 | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null' |
|
||||
| M2 | fOchBusPassengerM2.gradle | N、P、R | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}' |
|
||||
| 清扫车 | fOchSweeper.gradle | N | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);}}' |
|
||||
| 开沃 | 暂无 | 不限制档位 | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null' |
|
||||
|
||||
@@ -45,6 +45,9 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
//不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,6 +48,9 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
//不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,5 +48,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -44,5 +44,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -48,5 +48,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//M1不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
|
||||
}
|
||||
}
|
||||
@@ -45,5 +45,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//M2不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -46,5 +46,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -41,5 +41,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -49,5 +49,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//清扫车不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);}}'
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,9 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Taxi不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,6 +48,9 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
//Taxi不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,5 +45,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,8 @@ object ConfigStartUp {
|
||||
FunctionBuildConfig.appIdentityMode = BuildConfig.APP_IDENTITY_MODE
|
||||
// 各个module需要的url
|
||||
FunctionBuildConfig.urlJson = GsonUtils.fromJson(BuildConfig.URLs, UrlConfig::class.java)
|
||||
//不能启动自动驾驶的档位
|
||||
FunctionBuildConfig.unableLaunchAutopilotGear = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR
|
||||
|
||||
// // 这里影响当前Activity的身份信息,多进程先保持与原来一样,主进程为司机端,:passenger 进程为乘客端 TODO 暂时不启用,仅做洱海交付,独立乘客屏+宣传视频
|
||||
// if (ProcessUtils.getCurrentProcessName().contains(":passenger")) {
|
||||
|
||||
@@ -64,6 +64,12 @@ android {
|
||||
driver {
|
||||
dimension "multi_device"
|
||||
buildConfigField 'boolean', 'IS_CLIENT', 'false'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_M1', 'null'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_M2', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_SWEEPER', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_VAN', 'null'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,13 @@ import android.app.Application;
|
||||
|
||||
import com.zhidao.adas.client.utils.CrashHandler;
|
||||
|
||||
import chassis.Chassis;
|
||||
|
||||
public class App extends Application {
|
||||
public static App INSTANCE;
|
||||
|
||||
public Chassis.GearPosition gear;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
@@ -2,36 +2,15 @@ package com.zhidao.adas.client;
|
||||
|
||||
import android.util.Pair;
|
||||
|
||||
import com.zhidao.adas.client.bean.ArrivalNotification;
|
||||
import com.zhidao.adas.client.bean.AutopilotState;
|
||||
import com.zhidao.adas.client.bean.BagManagerCmd;
|
||||
import com.zhidao.adas.client.bean.BaseInfo;
|
||||
import com.zhidao.adas.client.bean.BasicInfoReq;
|
||||
import com.zhidao.adas.client.bean.CarConfigResp;
|
||||
import com.zhidao.adas.client.bean.ChassisStates;
|
||||
import com.zhidao.adas.client.bean.DataShow;
|
||||
import com.zhidao.adas.client.bean.ErrorData;
|
||||
import com.zhidao.adas.client.bean.FSMFunctionStates;
|
||||
import com.zhidao.adas.client.bean.GlobalPathResp;
|
||||
import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.ObuMap;
|
||||
import com.zhidao.adas.client.bean.ObuRsi;
|
||||
import com.zhidao.adas.client.bean.ObuRsm;
|
||||
import com.zhidao.adas.client.bean.ObuSpat;
|
||||
import com.zhidao.adas.client.bean.OriginalPointCloudData;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PlanningDecisionState;
|
||||
import com.zhidao.adas.client.bean.PlanningObjects;
|
||||
import com.zhidao.adas.client.bean.PredictionObstacleTrajectory;
|
||||
import com.zhidao.adas.client.bean.RecordDataConfig;
|
||||
import com.zhidao.adas.client.bean.RecordPanel;
|
||||
import com.zhidao.adas.client.bean.RoboSweeperTaskIndex;
|
||||
import com.zhidao.adas.client.bean.StatusInfo;
|
||||
import com.zhidao.adas.client.bean.TrackedObjects;
|
||||
import com.zhidao.adas.client.bean.Trajectory;
|
||||
import com.zhidao.adas.client.bean.VehicleState;
|
||||
import com.zhidao.adas.client.bean.Warn;
|
||||
import com.zhidao.adas.client.log.LogSave;
|
||||
import com.zhidao.adas.client.utils.Constants;
|
||||
import com.zhidao.support.adas.high.common.ThreadPoolManager;
|
||||
@@ -44,6 +23,8 @@ import java.util.Locale;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* 数据分发
|
||||
*/
|
||||
@@ -193,8 +174,8 @@ public class DataDistribution {
|
||||
}
|
||||
|
||||
public String cutDown(String str) {
|
||||
if (isCutDown && str.length() > 650) {
|
||||
str = str.substring(0, 650) + "\n(已缩短。如需查看完整数据,请勾选日志缩短复选框)";
|
||||
if (isCutDown && str.length() > 850) {
|
||||
str = str.substring(0, 850) + "\n(已缩短。如需查看完整数据,请勾选日志缩短复选框)";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
@@ -202,219 +183,222 @@ public class DataDistribution {
|
||||
private String onTransmit(String time, BaseInfo data) {
|
||||
String temp = data.toString();
|
||||
String str = cutDown(temp);
|
||||
if (data instanceof Trajectory) {
|
||||
listTrajectory.add(0, new DataShow(listTrajectorySize++, time + str));
|
||||
if (listTrajectory.size() > LIST_SIZE) {
|
||||
listTrajectory.remove(listTrajectory.size() - 1);
|
||||
if (data.header == null) {
|
||||
if (data instanceof ErrorData) {
|
||||
listErrorData.add(0, new DataShow(listErrorDataSize++, time + str));
|
||||
if (listErrorData.size() > 100) {
|
||||
listErrorData.remove(listErrorData.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_ERROR.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof OriginalPointCloudData) {
|
||||
listOriginalPointCloud.add(0, new DataShow(listOriginalPointCloudSize++, time + str));
|
||||
if (listOriginalPointCloud.size() > LIST_SIZE) {
|
||||
listOriginalPointCloud.remove(listOriginalPointCloud.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_POINT_CLOUD_ORIGINAL.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_TRAJECTORY.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof TrackedObjects) {
|
||||
listTrackedObjects.add(0, new DataShow(listTrackedObjectsSize++, time + str));
|
||||
if (listTrackedObjects.size() > LIST_SIZE) {
|
||||
listTrackedObjects.remove(listTrackedObjects.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_TRACKED_OBJECTS.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof OriginalPointCloudData) {
|
||||
listOriginalPointCloud.add(0, new DataShow(listOriginalPointCloudSize++, time + str));
|
||||
if (listOriginalPointCloud.size() > LIST_SIZE) {
|
||||
listOriginalPointCloud.remove(listOriginalPointCloud.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_POINT_CLOUD_ORIGINAL.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof PlanningObjects) {
|
||||
listPlanningObjects.add(0, new DataShow(listPlanningObjectsSize++, time + str));
|
||||
if (listPlanningObjects.size() > LIST_SIZE) {
|
||||
listPlanningObjects.remove(listPlanningObjects.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_OBJECTS.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof PlanningDecisionState) {
|
||||
listPlanningDecisionState.add(0, new DataShow(listPlanningDecisionStateSize++, time + str));
|
||||
if (listPlanningDecisionState.size() > LIST_SIZE) {
|
||||
listPlanningDecisionState.remove(listPlanningDecisionState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_DECISION_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuSpat) {
|
||||
listObuSpat.add(0, new DataShow(listObuSpatSize++, time + str));
|
||||
if (listObuSpat.size() > LIST_SIZE) {
|
||||
listObuSpat.remove(listObuSpat.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_SPAT.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuRsi) {
|
||||
listObuRsi.add(0, new DataShow(listObuRsiSize++, time + str));
|
||||
if (listObuRsi.size() > LIST_SIZE) {
|
||||
listObuRsi.remove(listObuRsi.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSI.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuRsm) {
|
||||
listObuRsm.add(0, new DataShow(listObuRsmSize++, time + str));
|
||||
if (listObuRsm.size() > LIST_SIZE) {
|
||||
listObuRsm.remove(listObuRsm.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSM.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuMap) {
|
||||
listObuMap.add(0, new DataShow(listObuMapSize++, time + str));
|
||||
if (listObuMap.size() > LIST_SIZE) {
|
||||
listObuMap.remove(listObuMap.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_MAP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof GnssInfo) {
|
||||
listGnssInfo.add(0, new DataShow(listGnssInfoSize++, time + str));
|
||||
if (listGnssInfo.size() > LIST_SIZE) {
|
||||
listGnssInfo.remove(listGnssInfo.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_GNSS_INFO.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof VehicleState) {
|
||||
listVehicleState.add(0, new DataShow(listVehicleStateSize++, time + str));
|
||||
if (listVehicleState.size() > LIST_SIZE) {
|
||||
listVehicleState.remove(listVehicleState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_VEHICLE_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ChassisStates) {
|
||||
listChassisStates.add(0, new DataShow(listChassisStatesSize++, time + str));
|
||||
if (listChassisStates.size() > LIST_SIZE) {
|
||||
listChassisStates.remove(listChassisStates.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_CHASSIS_STATES.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof AutopilotState) {
|
||||
listAutopilotState.add(0, new DataShow(listAutopilotStateSize++, time + str));
|
||||
if (listAutopilotState.size() > LIST_SIZE) {
|
||||
listAutopilotState.remove(listAutopilotState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_AUTOPILOT_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof MogoReportMessage) {
|
||||
listMogoReportMessage.add(0, new DataShow(listMogoReportMessageSize++, time + str));
|
||||
if (listMogoReportMessage.size() > LIST_SIZE) {
|
||||
listMogoReportMessage.remove(listMogoReportMessage.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_REPORT_MESSAGE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof PerceptionTrafficLight) {
|
||||
listPerceptionTrafficLight.add(0, new DataShow(listPerceptionTrafficLightSize++, time + str));
|
||||
if (listPerceptionTrafficLight.size() > LIST_SIZE) {
|
||||
listPerceptionTrafficLight.remove(listPerceptionTrafficLight.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PERCEPTION_TRAFFIC_LIGHT.equals(listener.first)) {
|
||||
listener.second.onPerceptionTrafficLight((PerceptionTrafficLight) data);
|
||||
}
|
||||
} else if (data instanceof PredictionObstacleTrajectory) {
|
||||
listPredictionObstacleTrajectory.add(0, new DataShow(listPredictionObstacleTrajectorySize++, time + str));
|
||||
if (listPredictionObstacleTrajectory.size() > LIST_SIZE) {
|
||||
listPredictionObstacleTrajectory.remove(listPredictionObstacleTrajectory.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof BasicInfoReq) {
|
||||
|
||||
} else if (data instanceof CarConfigResp) {
|
||||
if (listener != null && Constants.TITLE.TITLE_CAR_CONFIG_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof RecordPanel) {
|
||||
listRecordPanel.add(0, new DataShow(listRecordPanelSize++, time + str));
|
||||
if (listRecordPanel.size() > LIST_SIZE) {
|
||||
listRecordPanel.remove(listRecordPanel.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_RECORD_RESULT.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof BagManagerCmd) {
|
||||
listBagManagerCmd.add(0, new DataShow(listBagManagerCmdSize++, time + str));
|
||||
if (listBagManagerCmd.size() > LIST_SIZE) {
|
||||
listBagManagerCmd.remove(listBagManagerCmd.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_BAG_MANAGER_CMD.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof GlobalPathResp) {
|
||||
listGlobalPathResp.add(0, new DataShow(listGlobalPathRespSize++, time + str));
|
||||
if (listGlobalPathResp.size() > LIST_SIZE) {
|
||||
listGlobalPathResp.remove(listGlobalPathResp.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof Warn) {
|
||||
listWarn.add(0, new DataShow(listWarnSize++, time + str));
|
||||
if (listWarn.size() > LIST_SIZE) {
|
||||
listWarn.remove(listWarn.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_WARN.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ArrivalNotification) {
|
||||
listArrivalNotification.add(0, new DataShow(listArrivalNotificationSize++, time + str));
|
||||
if (listArrivalNotification.size() > LIST_SIZE) {
|
||||
listArrivalNotification.remove(listArrivalNotification.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_ARRIVAL_NOTIFICATION.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof StatusInfo) {
|
||||
listStatusInfo.add(0, new DataShow(listStatusInfoSize++, time + str));
|
||||
if (listStatusInfo.size() > LIST_SIZE) {
|
||||
listStatusInfo.remove(listStatusInfo.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_STATUS_QUERY_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof RecordDataConfig) {
|
||||
listRecordDataConfig.add(0, new DataShow(listRecordDataConfigSize++, time + str));
|
||||
if (listRecordDataConfig.size() > LIST_SIZE) {
|
||||
listRecordDataConfig.remove(listRecordDataConfig.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_RECORD_DATA_CONFIG_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof RoboSweeperTaskIndex) {
|
||||
listRoboSweeperTaskIndex.add(0, new DataShow(listRoboSweeperTaskIndexSize++, time + str));
|
||||
if (listRoboSweeperTaskIndex.size() > LIST_SIZE) {
|
||||
listRoboSweeperTaskIndex.remove(listRoboSweeperTaskIndex.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_SWEEPER_TASK_INDEX_DATA.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof FSMFunctionStates) {
|
||||
listFSMFunctionStates.add(0, new DataShow(listFSMFunctionStatesSize++, time + str));
|
||||
if (listFSMFunctionStates.size() > LIST_SIZE) {
|
||||
listFSMFunctionStates.remove(listFSMFunctionStates.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_FUNCTION_STATES.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ErrorData) {
|
||||
listErrorData.add(0, new DataShow(listErrorDataSize++, time + str));
|
||||
if (listErrorData.size() > 100) {
|
||||
listErrorData.remove(listErrorData.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_ERROR.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
} else {
|
||||
MessagePad.MessageType messageType = data.header.getMsgType();
|
||||
if (messageType == MessagePad.MessageType.MsgTypeTrajectory) {
|
||||
listTrajectory.add(0, new DataShow(listTrajectorySize++, time + str));
|
||||
if (listTrajectory.size() > LIST_SIZE) {
|
||||
listTrajectory.remove(listTrajectory.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_TRAJECTORY.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeTrackedObjects) {
|
||||
listTrackedObjects.add(0, new DataShow(listTrackedObjectsSize++, time + str));
|
||||
if (listTrackedObjects.size() > LIST_SIZE) {
|
||||
listTrackedObjects.remove(listTrackedObjects.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_TRACKED_OBJECTS.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypePlanningObjects) {
|
||||
listPlanningObjects.add(0, new DataShow(listPlanningObjectsSize++, time + str));
|
||||
if (listPlanningObjects.size() > LIST_SIZE) {
|
||||
listPlanningObjects.remove(listPlanningObjects.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_OBJECTS.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypePlanningDecisionState) {
|
||||
listPlanningDecisionState.add(0, new DataShow(listPlanningDecisionStateSize++, time + str));
|
||||
if (listPlanningDecisionState.size() > LIST_SIZE) {
|
||||
listPlanningDecisionState.remove(listPlanningDecisionState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_DECISION_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeGnssInfo) {
|
||||
listGnssInfo.add(0, new DataShow(listGnssInfoSize++, time + str));
|
||||
if (listGnssInfo.size() > LIST_SIZE) {
|
||||
listGnssInfo.remove(listGnssInfo.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_GNSS_INFO.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeVehicleState) {
|
||||
listVehicleState.add(0, new DataShow(listVehicleStateSize++, time + str));
|
||||
if (listVehicleState.size() > LIST_SIZE) {
|
||||
listVehicleState.remove(listVehicleState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_VEHICLE_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeChassisStates) {
|
||||
listChassisStates.add(0, new DataShow(listChassisStatesSize++, time + str));
|
||||
if (listChassisStates.size() > LIST_SIZE) {
|
||||
listChassisStates.remove(listChassisStates.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_CHASSIS_STATES.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeAutopilotState) {
|
||||
listAutopilotState.add(0, new DataShow(listAutopilotStateSize++, time + str));
|
||||
if (listAutopilotState.size() > LIST_SIZE) {
|
||||
listAutopilotState.remove(listAutopilotState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_AUTOPILOT_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeReportMessage) {
|
||||
listMogoReportMessage.add(0, new DataShow(listMogoReportMessageSize++, time + str));
|
||||
if (listMogoReportMessage.size() > LIST_SIZE) {
|
||||
listMogoReportMessage.remove(listMogoReportMessage.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_REPORT_MESSAGE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypePredictionObstacleTrajectory) {
|
||||
listPredictionObstacleTrajectory.add(0, new DataShow(listPredictionObstacleTrajectorySize++, time + str));
|
||||
if (listPredictionObstacleTrajectory.size() > LIST_SIZE) {
|
||||
listPredictionObstacleTrajectory.remove(listPredictionObstacleTrajectory.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeCarConfigResp) {
|
||||
if (listener != null && Constants.TITLE.TITLE_CAR_CONFIG_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeRecordResult) {
|
||||
listRecordPanel.add(0, new DataShow(listRecordPanelSize++, time + str));
|
||||
if (listRecordPanel.size() > LIST_SIZE) {
|
||||
listRecordPanel.remove(listRecordPanel.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_RECORD_RESULT.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeBagManagerCmd) {
|
||||
listBagManagerCmd.add(0, new DataShow(listBagManagerCmdSize++, time + str));
|
||||
if (listBagManagerCmd.size() > LIST_SIZE) {
|
||||
listBagManagerCmd.remove(listBagManagerCmd.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_BAG_MANAGER_CMD.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeGlobalPathResp) {
|
||||
listGlobalPathResp.add(0, new DataShow(listGlobalPathRespSize++, time + str));
|
||||
if (listGlobalPathResp.size() > LIST_SIZE) {
|
||||
listGlobalPathResp.remove(listGlobalPathResp.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeWarn) {
|
||||
listWarn.add(0, new DataShow(listWarnSize++, time + str));
|
||||
if (listWarn.size() > LIST_SIZE) {
|
||||
listWarn.remove(listWarn.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_WARN.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeArrivalNotification) {
|
||||
listArrivalNotification.add(0, new DataShow(listArrivalNotificationSize++, time + str));
|
||||
if (listArrivalNotification.size() > LIST_SIZE) {
|
||||
listArrivalNotification.remove(listArrivalNotification.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_ARRIVAL_NOTIFICATION.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeStatusQueryResp) {
|
||||
listStatusInfo.add(0, new DataShow(listStatusInfoSize++, time + str));
|
||||
if (listStatusInfo.size() > LIST_SIZE) {
|
||||
listStatusInfo.remove(listStatusInfo.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_STATUS_QUERY_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeRecordDataConfigResp) {
|
||||
listRecordDataConfig.add(0, new DataShow(listRecordDataConfigSize++, time + str));
|
||||
if (listRecordDataConfig.size() > LIST_SIZE) {
|
||||
listRecordDataConfig.remove(listRecordDataConfig.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_RECORD_DATA_CONFIG_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeSweeperTaskIndexData) {
|
||||
listRoboSweeperTaskIndex.add(0, new DataShow(listRoboSweeperTaskIndexSize++, time + str));
|
||||
if (listRoboSweeperTaskIndex.size() > LIST_SIZE) {
|
||||
listRoboSweeperTaskIndex.remove(listRoboSweeperTaskIndex.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_SWEEPER_TASK_INDEX_DATA.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeFunctionStates) {
|
||||
listFSMFunctionStates.add(0, new DataShow(listFSMFunctionStatesSize++, time + str));
|
||||
if (listFSMFunctionStates.size() > LIST_SIZE) {
|
||||
listFSMFunctionStates.remove(listFSMFunctionStates.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_FUNCTION_STATES.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof PerceptionTrafficLight) {
|
||||
listPerceptionTrafficLight.add(0, new DataShow(listPerceptionTrafficLightSize++, time + str));
|
||||
if (listPerceptionTrafficLight.size() > LIST_SIZE) {
|
||||
listPerceptionTrafficLight.remove(listPerceptionTrafficLight.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PERCEPTION_TRAFFIC_LIGHT.equals(listener.first)) {
|
||||
listener.second.onPerceptionTrafficLight((PerceptionTrafficLight) data);
|
||||
}
|
||||
} else if (data instanceof ObuSpat) {
|
||||
listObuSpat.add(0, new DataShow(listObuSpatSize++, time + str));
|
||||
if (listObuSpat.size() > LIST_SIZE) {
|
||||
listObuSpat.remove(listObuSpat.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_SPAT.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuRsi) {
|
||||
listObuRsi.add(0, new DataShow(listObuRsiSize++, time + str));
|
||||
if (listObuRsi.size() > LIST_SIZE) {
|
||||
listObuRsi.remove(listObuRsi.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSI.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuRsm) {
|
||||
listObuRsm.add(0, new DataShow(listObuRsmSize++, time + str));
|
||||
if (listObuRsm.size() > LIST_SIZE) {
|
||||
listObuRsm.remove(listObuRsm.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSM.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuMap) {
|
||||
listObuMap.add(0, new DataShow(listObuMapSize++, time + str));
|
||||
if (listObuMap.size() > LIST_SIZE) {
|
||||
listObuMap.remove(listObuMap.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_MAP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
return temp;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class ArrivalNotification extends BaseInfo {
|
||||
public final MessagePad.ArrivalNotification bean;
|
||||
|
||||
public ArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class AutopilotState extends BaseInfo {
|
||||
public final MessagePad.AutopilotState bean;
|
||||
|
||||
public AutopilotState(MessagePad.Header header, MessagePad.AutopilotState bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class BagManagerCmd extends BaseInfo {
|
||||
public final BagManagerOuterClass.BagManager bean;
|
||||
|
||||
public BagManagerCmd(MessagePad.Header header, BagManagerOuterClass.BagManager bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class BasicInfoReq extends BaseInfo {
|
||||
public final MessagePad.BasicInfoReq bean;
|
||||
|
||||
public BasicInfoReq(MessagePad.Header header, MessagePad.BasicInfoReq bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class CarConfigResp extends BaseInfo {
|
||||
public final MessagePad.CarConfigResp bean;
|
||||
|
||||
public CarConfigResp(MessagePad.Header header, MessagePad.CarConfigResp bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class ChassisStates extends BaseInfo {
|
||||
public final ChassisStatesOuterClass.ChassisStates bean;
|
||||
|
||||
public ChassisStates(MessagePad.Header header, ChassisStatesOuterClass.ChassisStates bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import function_state_management.FunctionStates;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class FSMFunctionStates extends BaseInfo {
|
||||
public final FunctionStates.FSMFunctionStates bean;
|
||||
|
||||
public FSMFunctionStates(MessagePad.Header header, FunctionStates.FSMFunctionStates bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class GlobalPathResp extends BaseInfo {
|
||||
public final MessagePad.GlobalPathResp bean;
|
||||
|
||||
public GlobalPathResp(MessagePad.Header header, MessagePad.GlobalPathResp bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class GnssInfo extends BaseInfo {
|
||||
public final MessagePad.GnssInfo bean;
|
||||
|
||||
public GnssInfo(MessagePad.Header header, MessagePad.GnssInfo bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
|
||||
public class MogoReportMessage extends BaseInfo {
|
||||
public final MogoReportMsg.MogoReportMessage bean;
|
||||
|
||||
public MogoReportMessage(MessagePad.Header header, MogoReportMsg.MogoReportMessage bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class ObuMap extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class ObuRsi extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class ObuRsm extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class ObuSpat extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.v2x.ObuWarningEvent;
|
||||
|
||||
public class ObuWarningData extends BaseInfo {
|
||||
public final ObuWarningEvent.ObuWarningData bean;
|
||||
|
||||
public ObuWarningData(MessagePad.Header header, ObuWarningEvent.ObuWarningData bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class PerceptionTrafficLight extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class PlanningDecisionState extends BaseInfo {
|
||||
public final MessagePad.PlanningActionMsg bean;
|
||||
|
||||
public PlanningDecisionState(MessagePad.Header header, MessagePad.PlanningActionMsg bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class PlanningObjects extends BaseInfo {
|
||||
public final MessagePad.PlanningObjects bean;
|
||||
|
||||
public PlanningObjects(MessagePad.Header header, MessagePad.PlanningObjects bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import prediction.Prediction;
|
||||
|
||||
public class PredictionObstacleTrajectory extends BaseInfo {
|
||||
public final Prediction.mPredictionObjects bean;
|
||||
|
||||
public PredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.GeneratedMessageV3;
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class ReceiveData extends BaseInfo {
|
||||
public final GeneratedMessageV3 bean;
|
||||
|
||||
public ReceiveData(MessagePad.Header header, GeneratedMessageV3 bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class RecordDataConfig extends BaseInfo {
|
||||
public final MessagePad.RecordDataConfig bean;
|
||||
|
||||
public RecordDataConfig(MessagePad.Header header, MessagePad.RecordDataConfig bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
|
||||
public class RecordPanel extends BaseInfo {
|
||||
public final RecordPanelOuterClass.RecordPanel bean;
|
||||
|
||||
public RecordPanel(MessagePad.Header header, RecordPanelOuterClass.RecordPanel bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import planning.RoboSweeperTaskIndexOuterClass;
|
||||
|
||||
public class RoboSweeperTaskIndex extends BaseInfo {
|
||||
public final RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex bean;
|
||||
|
||||
public RoboSweeperTaskIndex(MessagePad.Header header, RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import system_master.SystemStatusInfo;
|
||||
|
||||
public class StatusInfo extends BaseInfo {
|
||||
public final SystemStatusInfo.StatusInfo bean;
|
||||
|
||||
public StatusInfo(MessagePad.Header header, SystemStatusInfo.StatusInfo bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class TrackedObjects extends BaseInfo {
|
||||
private MessagePad.TrackedObjects bean;
|
||||
|
||||
public TrackedObjects(MessagePad.Header header, MessagePad.TrackedObjects bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class Trajectory extends BaseInfo {
|
||||
public final MessagePad.Trajectory bean;
|
||||
|
||||
public Trajectory(MessagePad.Header header, MessagePad.Trajectory bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class VehicleState extends BaseInfo {
|
||||
public final VehicleStateOuterClass.VehicleState bean;
|
||||
|
||||
public VehicleState(MessagePad.Header header, VehicleStateOuterClass.VehicleState bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class Warn extends BaseInfo {
|
||||
public final MessagePad.Warn bean;
|
||||
|
||||
public Warn(MessagePad.Header header, MessagePad.Warn bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -43,11 +43,7 @@ import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.mogo.telematic.MogoProtocolMsg;
|
||||
import com.mogo.telematic.NSDNettyManager;
|
||||
import com.mogo.telematic.client.listener.NettyClientListener;
|
||||
import com.mogo.telematic.client.status.ConnectState;
|
||||
import com.mogo.telematic.server.netty.NettyServerListener;
|
||||
import com.zhidao.adas.client.App;
|
||||
import com.zhidao.adas.client.BuildConfig;
|
||||
import com.zhidao.adas.client.DataDistribution;
|
||||
import com.zhidao.adas.client.R;
|
||||
@@ -55,36 +51,16 @@ import com.zhidao.adas.client.adapter.InfoTitleAdapter;
|
||||
import com.zhidao.adas.client.base.BaseActivity;
|
||||
import com.zhidao.adas.client.base.BaseAdapter;
|
||||
import com.zhidao.adas.client.base.BaseFragment;
|
||||
import com.zhidao.adas.client.bean.ArrivalNotification;
|
||||
import com.zhidao.adas.client.bean.AutopilotState;
|
||||
import com.zhidao.adas.client.bean.BagManagerCmd;
|
||||
import com.zhidao.adas.client.bean.BasicInfoReq;
|
||||
import com.zhidao.adas.client.bean.CarConfigResp;
|
||||
import com.zhidao.adas.client.bean.ChassisStates;
|
||||
import com.zhidao.adas.client.bean.ErrorData;
|
||||
import com.zhidao.adas.client.bean.FSMFunctionStates;
|
||||
import com.zhidao.adas.client.bean.GlobalPathResp;
|
||||
import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.IPCConnectState;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.ObuMap;
|
||||
import com.zhidao.adas.client.bean.ObuRsi;
|
||||
import com.zhidao.adas.client.bean.ObuRsm;
|
||||
import com.zhidao.adas.client.bean.ObuSpat;
|
||||
import com.zhidao.adas.client.bean.OriginalPointCloudData;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PlanningDecisionState;
|
||||
import com.zhidao.adas.client.bean.PlanningObjects;
|
||||
import com.zhidao.adas.client.bean.PredictionObstacleTrajectory;
|
||||
import com.zhidao.adas.client.bean.RecordDataConfig;
|
||||
import com.zhidao.adas.client.bean.RecordPanel;
|
||||
import com.zhidao.adas.client.bean.RoboSweeperTaskIndex;
|
||||
import com.zhidao.adas.client.bean.ReceiveData;
|
||||
import com.zhidao.adas.client.bean.SpecialVehicleBean;
|
||||
import com.zhidao.adas.client.bean.StatusInfo;
|
||||
import com.zhidao.adas.client.bean.TrackedObjects;
|
||||
import com.zhidao.adas.client.bean.Trajectory;
|
||||
import com.zhidao.adas.client.bean.VehicleState;
|
||||
import com.zhidao.adas.client.bean.Warn;
|
||||
import com.zhidao.adas.client.log.ConnectStatusSave;
|
||||
import com.zhidao.adas.client.log.LogSave;
|
||||
import com.zhidao.adas.client.other.permission.BackgrounderPermission;
|
||||
@@ -97,14 +73,12 @@ import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.AdasOptions;
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.OnMultiDeviceListener;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
@@ -123,7 +97,6 @@ import bag_manager.BagManagerOuterClass;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import function_state_management.FunctionStates;
|
||||
import io.netty.channel.Channel;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import perception.TrafficLightOuterClass;
|
||||
@@ -878,44 +851,46 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onTrajectory(MessagePad.Header header, MessagePad.Trajectory trajectory) {
|
||||
Trajectory base = new Trajectory(header, trajectory, sdf);
|
||||
ReceiveData base = new ReceiveData(header, trajectory, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrackedObjects(MessagePad.Header header, MessagePad.TrackedObjects trackedObjects) {
|
||||
TrackedObjects base = new TrackedObjects(header, trackedObjects, sdf);
|
||||
ReceiveData base = new ReceiveData(header, trackedObjects, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGnssInfo(MessagePad.Header header, MessagePad.GnssInfo gnssInfo) {
|
||||
GnssInfo base = new GnssInfo(header, gnssInfo, sdf);
|
||||
ReceiveData base = new ReceiveData(header, gnssInfo, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVehicleState(MessagePad.Header header, VehicleStateOuterClass.VehicleState vehicleState) {
|
||||
VehicleState base = new VehicleState(header, vehicleState, sdf);
|
||||
App.INSTANCE.gear = vehicleState.getGear();
|
||||
ReceiveData base = new ReceiveData(header, vehicleState, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onChassisStates(MessagePad.Header header, ChassisStatesOuterClass.ChassisStates chassisStates) {
|
||||
ChassisStates base = new ChassisStates(header, chassisStates, sdf);
|
||||
App.INSTANCE.gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
ReceiveData base = new ReceiveData(header, chassisStates, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotState(MessagePad.Header header, MessagePad.AutopilotState autopilotState) {
|
||||
AutopilotState base = new AutopilotState(header, autopilotState, sdf);
|
||||
ReceiveData base = new ReceiveData(header, autopilotState, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReportMessage(MessagePad.Header header, MogoReportMsg.MogoReportMessage mogoReportMessage) {
|
||||
MogoReportMessage base = new MogoReportMessage(header, mogoReportMessage, sdf);
|
||||
ReceiveData base = new ReceiveData(header, mogoReportMessage, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@@ -927,7 +902,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onPredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects predictionObjects) {
|
||||
PredictionObstacleTrajectory base = new PredictionObstacleTrajectory(header, predictionObjects, sdf);
|
||||
ReceiveData base = new ReceiveData(header, predictionObjects, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@@ -966,32 +941,32 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onPlanningObjects(MessagePad.Header header, MessagePad.PlanningObjects planningObjects) {
|
||||
PlanningObjects base = new PlanningObjects(header, planningObjects, sdf);
|
||||
ReceiveData base = new ReceiveData(header, planningObjects, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBasicInfoReq(MessagePad.Header header, MessagePad.BasicInfoReq basicInfoReq) {
|
||||
BasicInfoReq info = new BasicInfoReq(header, basicInfoReq, sdf);
|
||||
DataDistribution.getInstance().addData(info);
|
||||
ReceiveData base = new ReceiveData(header, basicInfoReq, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
AdasManager.getInstance().sendBasicInfoResp("", 0, com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.DEBUG);
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showToastCenter("收到车机基础信息请求:" + info.toString());
|
||||
showToastCenter("收到车机基础信息请求:" + base.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarConfigResp(MessagePad.Header header, MessagePad.CarConfigResp carConfigResp) {
|
||||
CarConfigResp base = new CarConfigResp(header, carConfigResp, sdf);
|
||||
ReceiveData base = new ReceiveData(header, carConfigResp, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecordResult(MessagePad.Header header, RecordPanelOuterClass.RecordPanel recordPanel) {
|
||||
RecordPanel base = new RecordPanel(header, recordPanel, sdf);
|
||||
ReceiveData base = new ReceiveData(header, recordPanel, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
recordKey = recordPanel.getKey();
|
||||
recordFileName = recordPanel.getFilename();
|
||||
@@ -999,37 +974,37 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onGlobalPathResp(MessagePad.Header header, MessagePad.GlobalPathResp globalPathResp) {
|
||||
GlobalPathResp base = new GlobalPathResp(header, globalPathResp, sdf);
|
||||
ReceiveData base = new ReceiveData(header, globalPathResp, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWarn(MessagePad.Header header, MessagePad.Warn warn) {
|
||||
Warn base = new Warn(header, warn, sdf);
|
||||
ReceiveData base = new ReceiveData(header, warn, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification arrivalNotification) {
|
||||
ArrivalNotification base = new ArrivalNotification(header, arrivalNotification, sdf);
|
||||
ReceiveData base = new ReceiveData(header, arrivalNotification, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusQueryResp(MessagePad.Header header, SystemStatusInfo.StatusInfo statusInfo) {
|
||||
StatusInfo base = new StatusInfo(header, statusInfo, sdf);
|
||||
ReceiveData base = new ReceiveData(header, statusInfo, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecordDataConfigResp(MessagePad.Header header, MessagePad.RecordDataConfig config) {
|
||||
RecordDataConfig base = new RecordDataConfig(header, config, sdf);
|
||||
ReceiveData base = new ReceiveData(header, config, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlanningActionMsg(MessagePad.Header header, MessagePad.PlanningActionMsg planningActionMsg) {
|
||||
PlanningDecisionState base = new PlanningDecisionState(header, planningActionMsg, sdf);
|
||||
ReceiveData base = new ReceiveData(header, planningActionMsg, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@@ -1060,19 +1035,19 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onFunctionStates(MessagePad.Header header, FunctionStates.FSMFunctionStates functionStates) {
|
||||
FSMFunctionStates base = new FSMFunctionStates(header, functionStates, sdf);
|
||||
ReceiveData base = new ReceiveData(header, functionStates, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSweeperTaskIndexData(MessagePad.Header header, RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex roboSweeperTaskIndex) {
|
||||
RoboSweeperTaskIndex base = new RoboSweeperTaskIndex(header, roboSweeperTaskIndex, sdf);
|
||||
ReceiveData base = new ReceiveData(header, roboSweeperTaskIndex, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerCmd(MessagePad.Header header, BagManagerOuterClass.BagManager bagManager) {
|
||||
BagManagerCmd base = new BagManagerCmd(header, bagManager, sdf);
|
||||
ReceiveData base = new ReceiveData(header, bagManager, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import com.zhidao.adas.client.App;
|
||||
import com.zhidao.adas.client.BuildConfig;
|
||||
import com.zhidao.adas.client.R;
|
||||
import com.zhidao.adas.client.adapter.ConfigAdapter;
|
||||
@@ -36,6 +37,7 @@ import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.MessageType;
|
||||
import com.zhidao.support.adas.high.common.autopilot.ability.AutopilotAbilityManager;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -45,6 +47,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import chassis.Chassis;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
@@ -65,7 +68,7 @@ public class VersionFragment extends BaseFragment {
|
||||
private ConfigAdapter adapter;
|
||||
private InterfaceAdapter unregisteredAdapter;
|
||||
private InterfaceAdapter registeredAdapter;
|
||||
|
||||
private Set[] unableGears;
|
||||
|
||||
private int role = Constants.TERMINAL_ROLE.DEBUG;//角色 默认调试屏
|
||||
|
||||
@@ -216,9 +219,48 @@ public class VersionFragment extends BaseFragment {
|
||||
list.add(new Config("ADAS LIB版本:", AdasManager.getInstance().getAdasVersion()));
|
||||
list.add(new Config("APP构建时间:", BuildConfig.BUILD_TIME));
|
||||
list.add(getAutopilotAbilityConfig(""));
|
||||
list.add(gear());
|
||||
adapter.setData(list);
|
||||
}
|
||||
|
||||
private Config gear() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
Chassis.GearPosition gear = App.INSTANCE.gear;
|
||||
if (gear != null) {
|
||||
if (unableGears == null) {
|
||||
unableGears = new Set[6];
|
||||
unableGears[0] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS;
|
||||
unableGears[1] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_M1;
|
||||
unableGears[2] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_M2;
|
||||
unableGears[3] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_SWEEPER;
|
||||
unableGears[4] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI;
|
||||
unableGears[5] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_VAN;
|
||||
}
|
||||
for (int j = 0; j < unableGears.length; j++) {
|
||||
String type = "";
|
||||
if (j == 0) {
|
||||
type = "BUS";
|
||||
} else if (j == 1) {
|
||||
type = "M1";
|
||||
} else if (j == 2) {
|
||||
type = "M2";
|
||||
} else if (j == 3) {
|
||||
type = "SWEEPER";
|
||||
} else if (j == 4) {
|
||||
type = "TAXI";
|
||||
} else if (j == 5) {
|
||||
type = "VAN";
|
||||
}
|
||||
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(unableGears[j]);
|
||||
boolean b = AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear);
|
||||
builder.append("车型:").append(type);
|
||||
builder.append(" 当前档位:").append(gear.name());
|
||||
builder.append(" 是否可以启动自驾:").append(b).append('\n');
|
||||
}
|
||||
}
|
||||
return new Config("档位影响:", builder.toString());
|
||||
}
|
||||
|
||||
private Config getAutopilotAbilityConfig(String value) {
|
||||
return new Config("能否启动自动驾驶:", value);
|
||||
}
|
||||
@@ -226,32 +268,34 @@ public class VersionFragment extends BaseFragment {
|
||||
public void autopilotAbility(boolean isAutopilotAbility, String unableAutopilotReason) {
|
||||
List<Config> list = adapter.getData();
|
||||
if (list != null) {
|
||||
Config temp = getAutopilotAbilityConfig(isAutopilotAbility + ",原因:" + unableAutopilotReason);
|
||||
int index = list.indexOf(temp);
|
||||
if (index < 0) {
|
||||
list.add(temp);
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemInserted(list.size() - 1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Config config = list.get(index);
|
||||
config.cover(temp);
|
||||
config.color = RandomColor.randomColor();
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemChanged(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
updateRefreshConfig(list, getAutopilotAbilityConfig(isAutopilotAbility + ",原因:" + unableAutopilotReason));
|
||||
updateRefreshConfig(list, gear());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void updateRefreshConfig(List<Config> list, Config temp) {
|
||||
int index = list.indexOf(temp);
|
||||
if (index < 0) {
|
||||
list.add(temp);
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemInserted(list.size() - 1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Config config = list.get(index);
|
||||
config.cover(temp);
|
||||
config.color = RandomColor.randomColor();
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemChanged(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<color name="connect_status_search_address">#1E90FF</color>
|
||||
<color name="color1">#FFC0CB</color>
|
||||
<color name="color2">#FF8F00</color>
|
||||
<color name="color3">#FFE500</color>
|
||||
<color name="color4">#B9ED3E</color>
|
||||
<color name="color3">#FF33FF</color>
|
||||
<color name="color4">#669900</color>
|
||||
<color name="color5">#2EEDEB</color>
|
||||
</resources>
|
||||
|
||||
@@ -105,7 +105,7 @@ class MoGoAutopilotControlProvider :
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.FIXATION)
|
||||
.setIpcFixationIP(AdasManager.getInstance().getIPCFixationIPList(mContext))
|
||||
.setClient(false)
|
||||
.setIdentityMode(FunctionBuildConfig.appIdentityMode)
|
||||
.setUnableLaunchAutopilotGear(FunctionBuildConfig.unableLaunchAutopilotGear)
|
||||
// .setSubscribeInterfaceOptions(subscribeInterfaceOptions)//
|
||||
.build()
|
||||
|
||||
@@ -196,7 +196,7 @@ class MoGoAutopilotControlProvider :
|
||||
val options = AdasOptions
|
||||
.Builder()
|
||||
.setClient(true)
|
||||
.setIdentityMode(FunctionBuildConfig.appIdentityMode)
|
||||
.setUnableLaunchAutopilotGear(FunctionBuildConfig.unableLaunchAutopilotGear)
|
||||
.build()
|
||||
AdasManager.getInstance()
|
||||
.create(options, MoGoAdasMsgConnectStatusListenerImpl())
|
||||
@@ -224,7 +224,7 @@ class MoGoAutopilotControlProvider :
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.FIXATION)
|
||||
.setIpcFixationIP(AdasManager.getInstance().getIPCFixationIPList(mContext))
|
||||
.setClient(false)// 乘客端直连工控机改为false
|
||||
.setIdentityMode(FunctionBuildConfig.appIdentityMode)
|
||||
.setUnableLaunchAutopilotGear(FunctionBuildConfig.unableLaunchAutopilotGear)
|
||||
.build()
|
||||
AdasManager.getInstance().create(options, MoGoAdasMsgConnectStatusListenerImpl())
|
||||
//////////////////////////////////注意先后顺序,AdasManager.getInstance().create后才可以设置监听/////////////////////////////////////////////
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.data.config
|
||||
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.data.deva.net.UrlConfig
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
|
||||
@@ -213,4 +214,10 @@ object FunctionBuildConfig {
|
||||
@JvmField
|
||||
var urlJson: UrlConfig = GsonUtils.fromJson("{\"och_url\":\"https://tech.zhidaohulian.com\"}", UrlConfig::class.java)
|
||||
|
||||
/**
|
||||
* 最外层设置的Url
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var unableLaunchAutopilotGear: Set<Chassis.GearPosition>? = null
|
||||
}
|
||||
@@ -4,6 +4,9 @@ import com.zhidao.support.adas.high.common.autopilot.ability.AutopilotAbilityMan
|
||||
import com.zhidao.support.adas.high.subscribe.SubscribeInterfaceOptions;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import chassis.Chassis;
|
||||
|
||||
/**
|
||||
* Date:2019/5/31。
|
||||
@@ -126,13 +129,13 @@ public class AdasOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份/车型
|
||||
* 不能启动自驾的档位
|
||||
*
|
||||
* @param identityMode 车型
|
||||
* @param unableLaunchAutopilotGear 档位
|
||||
* @return
|
||||
*/
|
||||
public Builder setIdentityMode(String identityMode) {
|
||||
options.setIdentityMode(identityMode);
|
||||
public Builder setUnableLaunchAutopilotGear(Set<Chassis.GearPosition> unableLaunchAutopilotGear) {
|
||||
options.setUnableLaunchAutopilotGear(unableLaunchAutopilotGear);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -153,7 +156,7 @@ public class AdasOptions {
|
||||
options.ipcAssignIP = null;
|
||||
options.ipcFixationIP = null;
|
||||
options.subscribeInterfaceOptions = null;
|
||||
options.setIdentityMode("");
|
||||
options.setUnableLaunchAutopilotGear(null);
|
||||
return options;
|
||||
}
|
||||
|
||||
@@ -197,7 +200,7 @@ public class AdasOptions {
|
||||
this.subscribeInterfaceOptions = subscribeInterfaceOptions;
|
||||
}
|
||||
|
||||
public void setIdentityMode(String identityMode) {
|
||||
AutopilotAbilityManager.getInstance().setIdentityMode(identityMode);
|
||||
public void setUnableLaunchAutopilotGear(Set<Chassis.GearPosition> unableLaunchAutopilotGear) {
|
||||
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(unableLaunchAutopilotGear);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
package com.zhidao.support.adas.high.common.autopilot.ability;
|
||||
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import chassis.Chassis;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
@@ -31,10 +28,6 @@ public class AutopilotAbility230 {
|
||||
}
|
||||
|
||||
private void onCallback() {
|
||||
//金旅、开沃小巴乘客端 不能启动自动驾驶
|
||||
if (AutopilotAbilityManager.getInstance().isBusPassenger()) {
|
||||
return;
|
||||
}
|
||||
boolean isAutopilotAbility = true;//是否能启动自动驾驶
|
||||
String unableAutopilotReason = null;//不能启动自动驾驶原因
|
||||
//检测底盘相关
|
||||
@@ -47,36 +40,14 @@ public class AutopilotAbility230 {
|
||||
}
|
||||
}
|
||||
if (isAutopilotAbility) {
|
||||
/**
|
||||
* 档位状态判断 目前判断的车型包括 东风Taxi 红旗Taxi 金旅Bus 金旅M1 金旅M1 福田清扫车 开沃
|
||||
* TODO 如果 identityMode 未赋值以及目前已知其他车型判断逻辑跟东风Taxi和红旗 走
|
||||
*/
|
||||
//开沃任何档位都能启动自驾
|
||||
if (!AutopilotAbilityManager.getInstance().isBusDriverVan()) {
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
//金旅Bus和清扫车 档位不正常
|
||||
if (AutopilotAbilityManager.getInstance().isBusDriver()) {
|
||||
if (gear == Chassis.GearPosition.GEAR_N || gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
} else if (AutopilotAbilityManager.getInstance().isSweeperDriverFutian()) {
|
||||
if (gear == Chassis.GearPosition.GEAR_N) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
} else {
|
||||
//东风Taxi和红旗 司机端和乘客端 档位不正常
|
||||
if (gear == Chassis.GearPosition.GEAR_P || gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
}
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
if (!AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear)) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO 关于手刹:不同车型的实现不同所以目前没法使用此字段
|
||||
// if (isAutopilotAbility) {
|
||||
// //电子驻车制动系统
|
||||
@@ -88,9 +59,7 @@ public class AutopilotAbility230 {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (AutopilotAbilityManager.getInstance().getListener() != null) {
|
||||
AutopilotAbilityManager.getInstance().getListener().onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
AutopilotAbilityManager.getInstance().onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
|
||||
public synchronized void start() {
|
||||
@@ -114,5 +83,4 @@ public class AutopilotAbility230 {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -45,10 +45,6 @@ public class AutopilotAbility250 {
|
||||
}
|
||||
|
||||
private void onCallback(SystemStatusInfo.StatusInfo statusInfo) {
|
||||
//金旅、开沃小巴乘客端 不能启动自动驾驶
|
||||
if (AutopilotAbilityManager.getInstance().isBusPassenger()) {
|
||||
return;
|
||||
}
|
||||
boolean isAutopilotAbility = true;//是否能启动自动驾驶
|
||||
String unableAutopilotReason = null;//不能启动自动驾驶原因
|
||||
//检测节点状态相关
|
||||
@@ -122,36 +118,14 @@ public class AutopilotAbility250 {
|
||||
}
|
||||
}
|
||||
if (isAutopilotAbility) {
|
||||
/**
|
||||
* 档位状态判断 目前判断的车型包括 东风Taxi 红旗Taxi 金旅Bus 金旅M1 金旅M1 福田清扫车 开沃
|
||||
* TODO 如果 identityMode 未赋值以及目前已知其他车型判断逻辑跟东风Taxi和红旗 走
|
||||
*/
|
||||
//开沃任何档位都能启动自驾
|
||||
if (!AutopilotAbilityManager.getInstance().isBusDriverVan()) {
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
//金旅Bus和清扫车 档位不正常
|
||||
if (AutopilotAbilityManager.getInstance().isBusDriver()) {
|
||||
if (gear == Chassis.GearPosition.GEAR_N || gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
} else if (AutopilotAbilityManager.getInstance().isSweeperDriverFutian()) {
|
||||
if (gear == Chassis.GearPosition.GEAR_N) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
} else {
|
||||
//东风Taxi和红旗 司机端和乘客端 档位不正常
|
||||
if (gear == Chassis.GearPosition.GEAR_P || gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
}
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
if (!AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear)) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO 关于手刹:不同车型的实现不同所以目前没法使用此字段
|
||||
// if (isAutopilotAbility) {
|
||||
// //电子驻车制动系统
|
||||
@@ -163,9 +137,7 @@ public class AutopilotAbility250 {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (AutopilotAbilityManager.getInstance().getListener() != null) {
|
||||
AutopilotAbilityManager.getInstance().getListener().onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
AutopilotAbilityManager.getInstance().onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
|
||||
public synchronized void start() {
|
||||
|
||||
@@ -10,11 +10,13 @@ import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import chassis.Chassis;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import system_master.SystemStatusInfo;
|
||||
@@ -38,37 +40,14 @@ public class AutopilotAbilityManager {
|
||||
private AutopilotAbility250 autopilotAbility250;
|
||||
private Timer startTimer;
|
||||
/**
|
||||
* 身份/车型
|
||||
* 不能启动自动驾驶的档位
|
||||
*/
|
||||
private String identityMode;
|
||||
private Set<Chassis.GearPosition> unableLaunchAutopilotGear;
|
||||
|
||||
public interface OnAutopilotAbilityListener {
|
||||
void onStatusQuery();//查询是被调用
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份规则定义根据app/productFlavors/README.md
|
||||
* * taxi司机屏 Taxi_Driver_Base (东风、红旗司机端)
|
||||
* * taxi乘客屏 Taxi_Passenger_Base (东风、红旗乘客端)
|
||||
* * bus司机屏 Bus_Driver_Base (金旅小巴司机端)
|
||||
* * Bus_Driver_Van (开沃小巴司机端)
|
||||
* * bus乘客屏 Bus_Passenger_Base (金旅、开沃小巴乘客端)
|
||||
* * Bus_Passenger_M1 (M1小巴乘客端)
|
||||
* * Bus_Passenger_M2 (M2小巴乘客端)
|
||||
* * 清扫车 Sweeper_Driver_FT (福田清扫车司机端)
|
||||
* <p>
|
||||
* 此定义不区分角色,只区分业务线和车型
|
||||
*/
|
||||
private interface IDENTITY_MODE {
|
||||
String TAXI_DRIVER_BASE = "Taxi_Driver_Base";//(东风、红旗司机端)
|
||||
String TAXI_PASSENGER_BASE = "Taxi_Passenger_Base";//(东风、红旗乘客端)
|
||||
String BUS_DRIVER_BASE = "Bus_Driver_Base";//(金旅小巴司机端)
|
||||
String BUS_DRIVER_VAN = "Bus_Driver_Van";//(开沃小巴司机端)
|
||||
String BUS_PASSENGER_BASE = "Bus_Passenger_Base";//(金旅、开沃小巴乘客端)
|
||||
String BUS_PASSENGER_M1 = "Bus_Passenger_M1";//(M1小巴乘客端)
|
||||
String BUS_PASSENGER_M2 = "Bus_Passenger_M2";//(M2小巴乘客端)
|
||||
String SWEEPER_DRIVER_FT = "Sweeper_Driver_FT";//(福田清扫车司机端)
|
||||
}
|
||||
|
||||
private AutopilotAbilityManager() {
|
||||
}
|
||||
@@ -84,8 +63,22 @@ public class AutopilotAbilityManager {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public void setIdentityMode(String identityMode) {
|
||||
this.identityMode = identityMode;
|
||||
public void setUnableLaunchAutopilotGear(Set<Chassis.GearPosition> unableLaunchAutopilotGear) {
|
||||
this.unableLaunchAutopilotGear = unableLaunchAutopilotGear;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前档位是否能启动自动驾驶 如果不传递默认可以启动
|
||||
* 不能启动自驾档位规则:app/README.md/不能启动自动驾驶的档位
|
||||
*
|
||||
* @param currentGear 当前档位
|
||||
* @return 是否能启动自驾
|
||||
*/
|
||||
public boolean isLaunchAutopilot(Chassis.GearPosition currentGear) {
|
||||
if (unableLaunchAutopilotGear != null && !unableLaunchAutopilotGear.isEmpty()) {
|
||||
return !unableLaunchAutopilotGear.contains(currentGear);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setCarConfig(MessagePad.CarConfigResp carConfig) {
|
||||
@@ -105,8 +98,10 @@ public class AutopilotAbilityManager {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public OnAdasListener getListener() {
|
||||
return listener;
|
||||
public void onAutopilotAbility(boolean isAutopilotAbility, String unableAutopilotReason) {
|
||||
if (listener != null) {
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
}
|
||||
|
||||
public void setHandler(Handler handler) {
|
||||
@@ -243,32 +238,4 @@ public class AutopilotAbilityManager {
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅、开沃小巴乘客端
|
||||
*/
|
||||
public boolean isBusPassenger() {
|
||||
return IDENTITY_MODE.BUS_PASSENGER_BASE.equalsIgnoreCase(identityMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开沃小巴司机端
|
||||
*/
|
||||
public boolean isBusDriverVan() {
|
||||
return IDENTITY_MODE.BUS_DRIVER_VAN.equalsIgnoreCase(identityMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅小巴司机端
|
||||
*/
|
||||
public boolean isBusDriver() {
|
||||
return IDENTITY_MODE.BUS_DRIVER_BASE.equalsIgnoreCase(identityMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 福田清扫车司机端
|
||||
*/
|
||||
public boolean isSweeperDriverFutian() {
|
||||
return IDENTITY_MODE.SWEEPER_DRIVER_FT.equalsIgnoreCase(identityMode);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user