[6.9.0]
[fea] [driver] [启动自驾添加startPosType参数]
This commit is contained in:
@@ -44,9 +44,9 @@ import kotlin.properties.Delegates
|
||||
object LineManager : CallerBase<ILineCallback>() {
|
||||
const val TAG = M_OCHCOMMON+"LineManager"
|
||||
|
||||
const val firstStationFirstStartAutopilotFlag = 1
|
||||
const val middleStationFirstStartAutopilotFlag = 2
|
||||
const val norFirstStartAutopilotFlag = 3
|
||||
const val firstStationFirstStartAutopilotFlag = 0
|
||||
const val middleStationFirstStartAutopilotFlag = 1
|
||||
const val norFirstStartAutopilotFlag = 2
|
||||
|
||||
/**
|
||||
* 线路信息
|
||||
@@ -393,6 +393,7 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
parameters?.endLatLon = AutoPilotLonLat(end.lat, end.lon)
|
||||
parameters?.vehicleType = 10
|
||||
parameters?.orderId = this.teleOrderId
|
||||
parameters?.firstStationFlag = autopilotFlag
|
||||
parameters?.firstAutopilotFlag = teleIsFirstStartAutopilot
|
||||
|
||||
if (parameters?.autoPilotLine == null) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -166,6 +166,9 @@ class AutopilotControlParameters {
|
||||
@JvmField
|
||||
var orderId = ""//订单号
|
||||
|
||||
@JvmField
|
||||
var firstStationFlag: Int? = null
|
||||
|
||||
|
||||
class AutoPilotLine {
|
||||
var lineId = 0L
|
||||
@@ -284,6 +287,7 @@ class AutopilotControlParameters {
|
||||
"isSpeakVoice=$isSpeakVoice, " +
|
||||
"orderId=$orderId, " +
|
||||
"firstAutopilotFlag=$firstAutopilotFlag, " +
|
||||
"firstStationFlag=$firstStationFlag, " +
|
||||
"autoPilotLine=$autoPilotLine)"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user