[Upload] 对传入自动驾驶的参数增加开始和结束的站点名称,方便自动驾驶加载地图
Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -7,10 +7,31 @@ import java.util.List;
|
||||
* @since 2021/09/22
|
||||
* <p>
|
||||
* 启动自动驾驶参数
|
||||
*
|
||||
* <p>
|
||||
* {
|
||||
* "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<AutoPilotLonLat> 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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user