From 7c78d73d5c039bac101bf1e01ae0f3835b179889 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Thu, 25 Nov 2021 19:33:27 +0800 Subject: [PATCH] =?UTF-8?q?[Upload]=20=E5=AF=B9=E4=BC=A0=E5=85=A5=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=A9=BE=E9=A9=B6=E7=9A=84=E5=8F=82=E6=95=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=BC=80=E5=A7=8B=E5=92=8C=E7=BB=93=E6=9D=9F=E7=9A=84?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E5=90=8D=E7=A7=B0=EF=BC=8C=E6=96=B9=E4=BE=BF?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=A9=BE=E9=A9=B6=E5=8A=A0=E8=BD=BD=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../hmi/ui/widget/AutoPilotStatusView.kt | 17 +++++------ .../autopilot/AutopilotControlParameters.java | 28 +++++++++++++++++-- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/AutoPilotStatusView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/AutoPilotStatusView.kt index a527cd53a3..da20f084a8 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/AutoPilotStatusView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/AutoPilotStatusView.kt @@ -13,7 +13,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager -import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.utilcode.util.LogUtils import com.mogo.eagle.core.utilcode.util.ToastUtils @@ -27,11 +26,11 @@ import kotlinx.android.synthetic.main.view_autopilot_status.view.* * 自动驾驶状态按钮 */ class AutoPilotStatusView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet + context: Context, + attrs: AttributeSet ) : ConstraintLayout(context, attrs), - View.OnClickListener, - IMoGoAutopilotStatusListener { + View.OnClickListener, + IMoGoAutopilotStatusListener { private val TAG = "AutopilotStatusView" @@ -81,12 +80,14 @@ class AutoPilotStatusView @JvmOverloads constructor( private fun startAutoPilot() { // TODO 测试数据,真实情况需要业务自己传入控制数据 val currentAutopilot = - AutopilotControlParameters() + AutopilotControlParameters() + currentAutopilot.startName = "HYKXC" + currentAutopilot.endName = "HYJC" currentAutopilot.isSpeakVoice = false currentAutopilot.startLatLon = - AutopilotControlParameters.AutoPilotLonLat(MogoApisHandler.getInstance().apis.adasControllerApi.lastLat, MogoApisHandler.getInstance().apis.adasControllerApi.lastLon) + AutopilotControlParameters.AutoPilotLonLat(MogoApisHandler.getInstance().apis.adasControllerApi.lastLat, MogoApisHandler.getInstance().apis.adasControllerApi.lastLon) currentAutopilot.endLatLon = - AutopilotControlParameters.AutoPilotLonLat(26.82355278566775, 112.57001723522112) + AutopilotControlParameters.AutoPilotLonLat(26.819716071924688, 112.57715442110867) currentAutopilot.vehicleType = 10 CallerAutoPilotManager.startAutoPilot(currentAutopilot) diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotControlParameters.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotControlParameters.java index c1757319b5..02cc528ab2 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotControlParameters.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotControlParameters.java @@ -7,10 +7,31 @@ import java.util.List; * @since 2021/09/22 *

* 启动自动驾驶参数 - * + *

+ * { + * "action": "aiCloudToStartAutopilot", + * "result": { + * "endLatLon": { + * "lat": 40.2023065, + * "lon": 116.7328583 + * }, + * "isSpeakVoice": false, + * "speedLimit": 0.0, + * "startLatLon": { + * "lat": 40.20070823669507, + * "lon": 116.73264342448671 + * }, + * "startName": "HYKXC", + * "endName": "HYJC", + * "vehicleType": 10, + * "wayLatLons": null + * } + * } */ public class AutopilotControlParameters { + public String startName; + public String endName; public AutoPilotLonLat startLatLon; public List wayLatLons; public AutoPilotLonLat endLatLon; @@ -45,11 +66,14 @@ public class AutopilotControlParameters { @Override public String toString() { return "AutopilotControlParameters{" + - "startLatLon=" + startLatLon + + "startName='" + startName + '\'' + + ", endName='" + endName + '\'' + + ", startLatLon=" + startLatLon + ", wayLatLons=" + wayLatLons + ", endLatLon=" + endLatLon + ", speedLimit=" + speedLimit + ", vehicleType=" + vehicleType + + ", isSpeakVoice=" + isSpeakVoice + '}'; } }