首次启动自驾参数传递

继续启动自驾
This commit is contained in:
yangyakun
2026-03-05 15:38:30 +08:00
parent 13c8808659
commit 30e6e132d7
4 changed files with 81 additions and 37 deletions

View File

@@ -36,6 +36,7 @@ import com.zhjt.mogo.adas.data.AdasConstants
import com.zhjt.mogo.adas.data.bean.NodeStateInfo
import com.zhjt.mogo.adas.data.sweeper.task.cloud.s_r.SweeperTaskCloudSuspendResume.BigTaskActionResp
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.Trajectory
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.VehicleSite
import com.zhjt.service.chain.ChainLog
import com.zhjt.service_biz.BizConfig
import kotlinx.coroutines.launch
@@ -106,17 +107,20 @@ object CallerAutoPilotControlManager {
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(controlParameters)
return sessionId
}
//TODO 任务管理继续
// fun unmannedAutoPilotContinue(trackId: Long, taskId: Long, stationId: Long, stationName: String, stationSeq: Int, lon: Double, lat: Double): Long {
// if (traj == null) {
// //LogUtils.eTag(TAG, "自动驾驶控制参数异常,请检查参数信息")
// return -1L
// }
// val sessionId = providerApi?.sendTaskManagerAutopilotContinue(trackId, taskId, stationId, stationName, stationSeq, lon, lat) ?: -1L
// // 更新记录在全局的控制参数
// CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(controlParameters)
// return sessionId
// }
/**
* 自驾成功后再次启动自驾时
*/
fun unmannedAutoPilotContinue(taskId: Long, traj: Trajectory?, vehicleSite : VehicleSite, controlParameters: AutopilotControlParameters): Long {
if (traj == null) {
//LogUtils.eTag(TAG, "自动驾驶控制参数异常,请检查参数信息")
return -1L
}
val sessionId = providerApi?.sendTaskManagerAutopilotContinue(traj.id, taskId, vehicleSite.stationId, vehicleSite.stationName, vehicleSite.stationSeq, vehicleSite.point.x, vehicleSite.point.y) ?: -1L
// 更新记录在全局的控制参数
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(controlParameters)
return sessionId
}
/**
* 启自驾前,是否要拦截
* @param isShowTip true: 展示Toast+语音提示; false:不展示Toast+语音提示