[Routing dev]

1、删除isAutoRouting
This commit is contained in:
donghongyu
2024-05-31 14:17:23 +08:00
parent c51e4aa6b9
commit 03c922249a
10 changed files with 29 additions and 53 deletions

View File

@@ -388,12 +388,12 @@ class MoGoAutopilotControlProvider :
private fun startAutoPilotWithNoParameter(source: Int) {
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
val invokeResult = AdasManager.getInstance()
.sendAutoPilotModeReq(1, source, null, false)
.sendAutoPilotModeReq(1, source, null)
invokeAutoPilotResult(if (invokeResult > -1) "无参自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
} else {
if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) {
val invokeResult = AdasManager.getInstance()
.sendAutoPilotModeReq(1, source, null, false)
.sendAutoPilotModeReq(1, source, null)
invokeAutoPilotResult(if (invokeResult > -1) "无参自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
} else {
invokeAutoPilotResult("车机与工控机链接失败,无法开启自动驾驶 无参")
@@ -405,12 +405,12 @@ class MoGoAutopilotControlProvider :
private fun startAutoPilot(controlParameters: AutopilotControlParameters, source: Int) {
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
val invokeResult = AdasManager.getInstance()
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo(), controlParameters.isAutoRouting)
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo())
invokeAutoPilotResult(if (invokeResult > -1) "自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
} else {
if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) {
val invokeResult = AdasManager.getInstance()
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo(), controlParameters.isAutoRouting)
.sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo())
invokeAutoPilotResult(if (invokeResult > -1) "自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空")
} else {
invokeAutoPilotResult("车机与工控机链接失败,无法开启自动驾驶")
@@ -446,21 +446,20 @@ class MoGoAutopilotControlProvider :
)
}
override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, isAutoRouting: Boolean, routeInfo: MessagePad.RouteInfo?) {
AdasManager.getInstance().sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine(),isAutoRouting,routeInfo)
override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, routeInfo: MessagePad.RouteInfo?) {
AdasManager.getInstance().sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine(),routeInfo)
}
override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, isAutoRouting: Boolean, routeInfo: MessagePad.RouteInfo?) {
override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, routeInfo: MessagePad.RouteInfo?) {
AdasManager.getInstance().sendTrajectoryDownloadReq(
autoPilotLine.toAutoPilotLine(),
downloadType,
isAutoRouting,
routeInfo)
}
override fun cancelAutoPilot() {
if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) {
AdasManager.getInstance().sendAutoPilotModeReq(0, 1, null, false)
AdasManager.getInstance().sendAutoPilotModeReq(0, 1, null)
} else {
CallerLogger.e("$M_D_C$TAG", "车机与工控机链接失败,无法断开自动驾驶")
}
@@ -930,11 +929,11 @@ class MoGoAutopilotControlProvider :
*/
override fun setControlAutopilotCarAuto(isEnable: Boolean) {
if (isEnable) {
AdasManager.getInstance().sendAutoPilotModeReq(1, 0, null, false)
AdasManager.getInstance().sendAutoPilotModeReq(1, 0, null)
} else {
// 司机屏才可关闭自动驾驶
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
AdasManager.getInstance().sendAutoPilotModeReq(0, 0, null, false)
AdasManager.getInstance().sendAutoPilotModeReq(0, 0, null)
}
}
}