[Routing dev]
1、删除isAutoRouting
This commit is contained in:
@@ -11,8 +11,7 @@ data class GrayLineBean(
|
||||
var lineFailCount: Int?, //线路累计反馈不可用次数
|
||||
var isChoosed: Boolean = false, //当前是否选中
|
||||
var startSite: RoutingSite?,
|
||||
var endSite: RoutingSite?,
|
||||
var isAutoRouting: Boolean = true //是否进行自动算路,true--使用车端自动算路,false--不使用自动算路,使用轨迹循迹
|
||||
var endSite: RoutingSite?
|
||||
)
|
||||
|
||||
data class RoutingSite(
|
||||
|
||||
@@ -33,11 +33,7 @@ class TaxiRoutingChooseLineAdapter(
|
||||
val currentPosition = holder.bindingAdapterPosition
|
||||
val data = mData[currentPosition]
|
||||
// 区分Routing和循迹
|
||||
holder.lineNameTextView.text = if (data.isAutoRouting) {
|
||||
"Routing-" + data.lineName
|
||||
} else {
|
||||
data.lineName
|
||||
}
|
||||
holder.lineNameTextView.text = data.lineName
|
||||
holder.todayVerifyNumTextView.text = "本车今日已验证:${data.carVerificationCount}次"
|
||||
holder.historyVerifyNumTextView.text =
|
||||
"路线累计反馈${data.lineSuccessCount}可用,${data.lineFailCount}不可用"
|
||||
|
||||
@@ -211,10 +211,6 @@ object TaxiRoutingModel {
|
||||
DebugView.printInfoMsg("[查询灰度路线] 请求success,dataSize=${data?.data?.size}")
|
||||
val result = mutableListOf<GrayLineBean>()
|
||||
data.data?.also {
|
||||
//TODO Routing 临时修改,这里后面从接口数据直接获取,需要配合运营平台一起修改灰度路线数据
|
||||
it.forEach {
|
||||
it.isAutoRouting = true
|
||||
}
|
||||
result.addAll(it)
|
||||
}
|
||||
mTaxiRoutingCallbackMap.forEach {
|
||||
@@ -496,8 +492,6 @@ object TaxiRoutingModel {
|
||||
CallerLogger.e(TAG, "AutopilotControlParameters is empty.")
|
||||
return
|
||||
}
|
||||
// 使用云端配置的Routing灰度路线
|
||||
parameters.isAutoRouting = grayLineBean.isAutoRouting
|
||||
|
||||
OchAutoPilotManager.startAutoPilot(parameters);
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,6 @@ class AutopilotControlParameters {
|
||||
@JvmField
|
||||
var autoPilotLine: AutoPilotLine? = null // 自动驾驶路线
|
||||
|
||||
var isAutoRouting = false//是否进行自动算路,true--使用车端自动算路,false--不使用自动算路,使用轨迹循迹
|
||||
|
||||
class AutoPilotLine {
|
||||
var lineId = 0L
|
||||
@@ -229,8 +228,7 @@ class AutopilotControlParameters {
|
||||
"routeID=$routeID, " +
|
||||
"routeName='$routeName', " +
|
||||
"isSpeakVoice=$isSpeakVoice, " +
|
||||
"autoPilotLine=$autoPilotLine, " +
|
||||
"isAutoRouting=$isAutoRouting)"
|
||||
"autoPilotLine=$autoPilotLine)"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -56,17 +56,16 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
|
||||
/**
|
||||
* 发送 轨迹下载请求
|
||||
*/
|
||||
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, isAutoRouting: Boolean, routeInfo: MessagePad.RouteInfo?)
|
||||
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, routeInfo: MessagePad.RouteInfo?)
|
||||
|
||||
/**
|
||||
* 发送 轨迹下载请求
|
||||
*
|
||||
* @param autoPilotLine 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param downloadType 下载类型: 0:正常下载 1:预下载
|
||||
* @param isAutoRouting 20240523 是否进行自动算路
|
||||
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
|
||||
*/
|
||||
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, isAutoRouting: Boolean, routeInfo: MessagePad.RouteInfo?)
|
||||
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, routeInfo: MessagePad.RouteInfo?)
|
||||
/**
|
||||
* 结束自动驾驶
|
||||
*/
|
||||
|
||||
@@ -182,8 +182,8 @@ object CallerAutoPilotControlManager {
|
||||
*/
|
||||
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine) {
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//TODO Routing 需要传参 isAutoRouting, routeInfo
|
||||
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, false, null)
|
||||
//TODO Routing 需要传参 routeInfo
|
||||
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, null)
|
||||
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, 0)
|
||||
}
|
||||
}
|
||||
@@ -194,8 +194,8 @@ object CallerAutoPilotControlManager {
|
||||
*/
|
||||
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) {
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//TODO Routing 需要传参 isAutoRouting, routeInfo
|
||||
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType, false, null)
|
||||
//TODO Routing 需要传参 routeInfo
|
||||
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType, null)
|
||||
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, downloadType)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1192,20 +1192,18 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* @param mode 1: enter autopilot mode, 0: quit autopilot mode
|
||||
* @param source 命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线)
|
||||
* @param routeInfo 自动驾驶路径信息
|
||||
* @param isAutoRouting 20240523 是否进行自动算路
|
||||
* @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID
|
||||
* * >=0:表示添加到WS发送消息队列
|
||||
* * =0:表示乘客屏模式添加到WS发送消息队列
|
||||
* * -1L:添加到WS发送消息队列失败
|
||||
*/
|
||||
@Override
|
||||
public long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo, boolean isAutoRouting) {
|
||||
public long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo) {
|
||||
MessagePad.SetAutopilotModeReq.Builder builder = MessagePad.SetAutopilotModeReq.newBuilder();
|
||||
builder.setMode(mode);
|
||||
builder.setSource(source);
|
||||
if (routeInfo != null)
|
||||
builder.setRouteInfo(routeInfo);
|
||||
builder.setIsAutoRouting(isAutoRouting);
|
||||
MessagePad.SetAutopilotModeReq req = builder.build();
|
||||
if (autopilotReview != null) autopilotReview.onAutopilotCommandTrigger(req);
|
||||
return sendPBMessage(MessageType.TYPE_SEND_SET_AUTOPILOT_MODE_REQ, req.toByteArray());
|
||||
@@ -1659,7 +1657,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
*
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param downloadType 下载类型: 0:正常下载 1:预下载
|
||||
* @param isAutoRouting 20240523 是否进行自动算路
|
||||
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
|
||||
* @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID
|
||||
* * >=0:表示添加到WS发送消息队列
|
||||
@@ -1673,7 +1670,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
paramIndexes = {0}
|
||||
)
|
||||
@Override
|
||||
public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, boolean isAutoRouting, MessagePad.RouteInfo routeInfo) {
|
||||
public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, MessagePad.RouteInfo routeInfo) {
|
||||
MessagePad.TrajectoryDownloadReq.Builder builder = MessagePad.TrajectoryDownloadReq.newBuilder();
|
||||
builder.setSource(1);//指令来源: 0: default, 1:pad, 2:aicloud
|
||||
if (line != null) {
|
||||
@@ -1682,7 +1679,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
if (downloadType > -1) {
|
||||
builder.setDownloadType(downloadType);
|
||||
}
|
||||
builder.setIsAutoRouting(isAutoRouting);
|
||||
if (routeInfo != null) {
|
||||
builder.setRouteInfo(routeInfo);
|
||||
}
|
||||
|
||||
@@ -396,15 +396,14 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* @param mode 1: enter autopilot mode, 0: quit autopilot mode
|
||||
* @param source 命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线)
|
||||
* @param routeInfo 自动驾驶路径信息
|
||||
* @param isAutoRouting 20240523 是否进行自动算路
|
||||
* @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID
|
||||
* * >=0:表示添加到WS发送消息队列
|
||||
* * =0:表示乘客屏模式添加到WS发送消息队列
|
||||
* * -1L:添加到WS发送消息队列失败
|
||||
*/
|
||||
@Override
|
||||
public long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo, boolean isAutoRouting) {
|
||||
return mChannel == null ? -1L : mChannel.sendAutoPilotModeReq(mode, source, routeInfo, isAutoRouting);
|
||||
public long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo) {
|
||||
return mChannel == null ? -1L : mChannel.sendAutoPilotModeReq(mode, source, routeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -760,15 +759,14 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* 此方法存在域控回执,监听{@link OnAdasListener#onReceiveReceivedAck(ReceivedAck)}回调.使用方法:将此方法的返回值与{@link ReceivedAck#getMsgId()}进行比较,如果相同判断{@link ReceivedAck#getStatus()}是否等于{@link ReceivedAck.Status#NORMAL},详情参见CheckSystemView中的onReceiveReceivedAck
|
||||
*
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param isAutoRouting 20240523 是否进行自动算路
|
||||
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
|
||||
* @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID
|
||||
* * >=0:表示添加到WS发送消息队列
|
||||
* * =0:表示乘客屏模式添加到WS发送消息队列
|
||||
* * -1L:添加到WS发送消息队列失败
|
||||
*/
|
||||
public long sendTrajectoryDownloadReq(MessagePad.Line line, boolean isAutoRouting, MessagePad.RouteInfo routeInfo) {
|
||||
return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, -1, isAutoRouting, routeInfo);
|
||||
public long sendTrajectoryDownloadReq(MessagePad.Line line, MessagePad.RouteInfo routeInfo) {
|
||||
return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, -1, routeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -777,7 +775,6 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
*
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param downloadType 下载类型: 0:正常下载 1:预下载
|
||||
* @param isAutoRouting 20240523 是否进行自动算路
|
||||
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
|
||||
* @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID
|
||||
* * >=0:表示添加到WS发送消息队列
|
||||
@@ -785,8 +782,8 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* * -1L:添加到WS发送消息队列失败
|
||||
*/
|
||||
@Override
|
||||
public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, boolean isAutoRouting, MessagePad.RouteInfo routeInfo) {
|
||||
return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, downloadType, isAutoRouting, routeInfo);
|
||||
public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, MessagePad.RouteInfo routeInfo) {
|
||||
return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, downloadType, routeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -176,13 +176,12 @@ public interface IAdasNetCommApi {
|
||||
* @param mode 1: enter autopilot mode, 0: quit autopilot mode
|
||||
* @param source 命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线)
|
||||
* @param routeInfo 自动驾驶路径信息
|
||||
* @param isAutoRouting 20240523 是否进行自动算路
|
||||
* @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID
|
||||
* * >=0:表示添加到WS发送消息队列
|
||||
* * =0:表示乘客屏模式添加到WS发送消息队列
|
||||
* * -1L:添加到WS发送消息队列失败
|
||||
*/
|
||||
long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo, boolean isAutoRouting);
|
||||
long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo);
|
||||
|
||||
|
||||
/**
|
||||
@@ -478,14 +477,13 @@ public interface IAdasNetCommApi {
|
||||
*
|
||||
* @param line 线路相关参数详情见PB message_pad.proto -> Line
|
||||
* @param downloadType 下载类型: 0:正常下载 1:预下载
|
||||
* @param isAutoRouting 20240523 是否进行自动算路
|
||||
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
|
||||
* @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID
|
||||
* * >=0:表示添加到WS发送消息队列
|
||||
* * =0:表示乘客屏模式添加到WS发送消息队列
|
||||
* * -1L:添加到WS发送消息队列失败
|
||||
*/
|
||||
long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, boolean isAutoRouting, MessagePad.RouteInfo routeInfo);
|
||||
long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, MessagePad.RouteInfo routeInfo);
|
||||
|
||||
/**
|
||||
* 发送 状态查询请求
|
||||
|
||||
Reference in New Issue
Block a user