[6.0.0][adas-data]轨迹下载请求接口更新添加下载类型字段,用于轨迹预下载场景(taxi无人化场景)
This commit is contained in:
@@ -405,6 +405,10 @@ class MoGoAutopilotControlProvider :
|
||||
AdasManager.getInstance().sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine())
|
||||
}
|
||||
|
||||
override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) {
|
||||
AdasManager.getInstance().sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine(), downloadType)
|
||||
}
|
||||
|
||||
override fun cancelAutoPilot() {
|
||||
if (AdasManager.getInstance().ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
AdasManager.getInstance().sendAutoPilotModeReq(0, 1, null)
|
||||
|
||||
@@ -55,6 +55,11 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
|
||||
*/
|
||||
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine)
|
||||
|
||||
/**
|
||||
* 发送 轨迹下载请求
|
||||
* @param downloadType 下载类型: 0:正常下载 1:预下载
|
||||
*/
|
||||
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int)
|
||||
/**
|
||||
* 结束自动驾驶
|
||||
*/
|
||||
|
||||
@@ -106,6 +106,16 @@ object CallerAutoPilotControlManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送 轨迹下载请求
|
||||
* @param downloadType 下载类型: 0:正常下载 1:预下载
|
||||
*/
|
||||
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) {
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束自动驾驶
|
||||
*/
|
||||
|
||||
@@ -253,6 +253,7 @@ message TrajectoryDownloadReq
|
||||
{
|
||||
Line line = 1; //路线
|
||||
uint32 source = 2; //指令来源: 0: default, 1:pad, 2:aicloud
|
||||
uint32 downloadType = 3; //下载类型: 0:正常下载 1:预下载
|
||||
}
|
||||
|
||||
// message definition for MessageType: MsgTypeBasicInfoReq
|
||||
|
||||
@@ -1090,7 +1090,8 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
/**
|
||||
* 发送 轨迹下载请求
|
||||
*
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param downloadType 下载类型: 0:正常下载 1:预下载
|
||||
* @return boolean
|
||||
*/
|
||||
@ChainLog(
|
||||
@@ -1100,10 +1101,13 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
paramIndexes = {0}
|
||||
)
|
||||
@Override
|
||||
public boolean sendTrajectoryDownloadReq(MessagePad.Line line) {
|
||||
public boolean sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType) {
|
||||
MessagePad.TrajectoryDownloadReq.Builder builder = MessagePad.TrajectoryDownloadReq.newBuilder();
|
||||
builder.setSource(1);//指令来源: 0: default, 1:pad, 2:aicloud
|
||||
builder.setLine(line);
|
||||
if (downloadType > -1) {
|
||||
builder.setDownloadType(downloadType);
|
||||
}
|
||||
MessagePad.TrajectoryDownloadReq req = builder.build();
|
||||
return sendPBMessage(MessageType.TYPE_SEND_TRAJECTORY_DOWNLOAD_REQ.typeCode, req.toByteArray());
|
||||
}
|
||||
|
||||
@@ -514,9 +514,20 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendTrajectoryDownloadReq(MessagePad.Line line) {
|
||||
return mChannel != null && mChannel.sendTrajectoryDownloadReq(line);
|
||||
return mChannel != null && mChannel.sendTrajectoryDownloadReq(line, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送 轨迹下载请求
|
||||
*
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param downloadType 下载类型: 0:正常下载 1:预下载
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType) {
|
||||
return mChannel != null && mChannel.sendTrajectoryDownloadReq(line, downloadType);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -251,10 +251,11 @@ public interface IAdasNetCommApi {
|
||||
/**
|
||||
* 发送 轨迹下载请求
|
||||
*
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param downloadType 下载类型: 0:正常下载 1:预下载
|
||||
* @return 加入WS发送消息队列是否成功
|
||||
*/
|
||||
boolean sendTrajectoryDownloadReq(MessagePad.Line line);
|
||||
boolean sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType);
|
||||
|
||||
/**
|
||||
* 发送 状态查询请求
|
||||
|
||||
Reference in New Issue
Block a user