[fea]
[driver]
[启动自驾添加startPosType参数]
This commit is contained in:
yangyakun
2025-01-06 10:46:38 +08:00
parent 8997550c18
commit 93121ec923
3 changed files with 15 additions and 5 deletions

View File

@@ -411,15 +411,20 @@ class MoGoAutopilotControlProvider :
}
private fun startAutoPilot(controlParameters: AutopilotControlParameters, source: Int): Long {
val startPosType = if(controlParameters.firstStationFlag==null){
null
}else{
MessagePad.StartPosType.forNumber(controlParameters.firstStationFlag!!)
}
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
val invokeResult = AdasManager.getInstance()
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo(), controlParameters.toAutoPilotCmdInfo(), null)
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo(), controlParameters.toAutoPilotCmdInfo(), startPosType)
invokeAutoPilotResult(if (invokeResult > -1) "自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
return invokeResult
} else {
if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) {
val invokeResult = AdasManager.getInstance()
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo(), controlParameters.toAutoPilotCmdInfo(), null)
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo(), controlParameters.toAutoPilotCmdInfo(), startPosType)
invokeAutoPilotResult(if (invokeResult > -1) "自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
return invokeResult
} else {