From e7eb453359c1c59c6fb05f4fce66c04aa0ec86b5 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Fri, 19 Nov 2021 12:26:06 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=E5=8D=87=E7=BA=A7ADAS=E7=89=88?= =?UTF-8?q?=E6=9C=AC=EF=BC=8C=E5=A2=9E=E5=8A=A0Docker=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=EF=BC=8C=E8=87=AA=E5=8A=A8=E9=A9=BE=E9=A9=B6?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- config.gradle | 2 +- .../core/data/autopilot/AutopilotStatus.java | 66 ++++++++++++++++--- .../data/autopilot/AutopilotStatusInfo.kt | 10 +++ .../module/adas/OnAdasListenerAdapter.java | 2 + 4 files changed, 71 insertions(+), 9 deletions(-) diff --git a/config.gradle b/config.gradle index c8a8db0f31..18ae8f664c 100644 --- a/config.gradle +++ b/config.gradle @@ -114,7 +114,7 @@ ext { obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3", mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.17', mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.4', - adasHigh : 'com.zhidao.support.adas:high:1.2.0.11', + adasHigh : 'com.zhidao.support.adas:high:1.2.0.14', // google googlezxing : "com.google.zxing:core:3.3.3", diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatus.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatus.java index a60de52967..4c1727adfc 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatus.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatus.java @@ -64,7 +64,10 @@ public class AutopilotStatus implements Serializable { * 自动驾驶状态 0非自动驾驶,1自动驾驶 */ private int pilotmode; - + /** + * 自动驾驶车控状态,0-人工驾驶, 1-自动驾驶 + */ + private int control_pilotmode; public int getState() { return state; @@ -74,6 +77,14 @@ public class AutopilotStatus implements Serializable { this.state = state; } + public float getSpeed() { + return speed; + } + + public void setSpeed(float speed) { + this.speed = speed; + } + public String getReason() { return reason; } @@ -82,27 +93,66 @@ public class AutopilotStatus implements Serializable { this.reason = reason; } - public float getSpeed() { - return speed; - } - - public void setSpeed(float speed) { - this.speed = speed; - } public int getCamera() { return camera; } + public void setCamera(int camera) { + this.camera = camera; + } + public int getRadar() { return radar; } + public void setRadar(int radar) { + this.radar = radar; + } + public int getRtk() { return rtk; } + public void setRtk(int rtk) { + this.rtk = rtk; + } + public int getPilotmode() { return pilotmode; } + + public void setPilotmode(int pilotmode) { + this.pilotmode = pilotmode; + } + + public int getControl_pilotmode() { + return control_pilotmode; + } + + public void setControl_pilotmode(int control_pilotmode) { + this.control_pilotmode = control_pilotmode; + } + + @Override + public String toString() { + return "ValuesBean{" + + "state=" + state + + ", speed=" + speed + + ", reason='" + reason + '\'' + + ", camera=" + camera + + ", radar=" + radar + + ", rtk=" + rtk + + ", pilotmode=" + pilotmode + + ", control_pilotmode=" + control_pilotmode + + '}'; + } + } + + @Override + public String toString() { + return "AutopilotStatus{" + + "action='" + action + '\'' + + ", values=" + values + + '}'; } } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt index 276b8f62d8..1b828d14fd 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt @@ -17,6 +17,11 @@ class AutopilotStatusInfo : Serializable { var connectStatus = false var version: String = "v0.0" + /** + * 工控机镜像版本 + */ + var dockVersion: String = "v0.0" + /** * 定位是否可用 */ @@ -59,4 +64,9 @@ class AutopilotStatusInfo : Serializable { */ var pilotmode = 0 + /** + * 自动驾驶状态 0非自动驾驶,1自动驾驶 + */ + var control_pilotmode = 0 + } \ No newline at end of file diff --git a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java index bf21126538..80040e80c6 100644 --- a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java +++ b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java @@ -70,6 +70,7 @@ public class OnAdasListenerAdapter implements OnAdasListener { AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); autopilotStatusInfo.setState(autopilotStatusValues.getState()); autopilotStatusInfo.setPilotmode(autopilotStatusValues.getPilotmode()); + autopilotStatusInfo.setControl_pilotmode(autopilotStatusValues.getControl_pilotmode()); autopilotStatusInfo.setReason(autopilotStatusValues.getReason()); autopilotStatusInfo.setCamera(autopilotStatusValues.getCamera()); autopilotStatusInfo.setRtk(autopilotStatusValues.getRtk()); @@ -78,6 +79,7 @@ public class OnAdasListenerAdapter implements OnAdasListener { // 初始化自动驾驶状态信息 autopilotStatusInfo.setVersion(AdasManager.getInstance().getAdasConfig().getVersion()); autopilotStatusInfo.setConnectIP(AdasManager.getInstance().getAdasConfig().getAddress()); + autopilotStatusInfo.setDockVersion(AdasManager.getInstance().getAdasConfig().getDockVersion()); CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatus(); }