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 + '}'; } }