[自动滑动出发+部分跳站]
This commit is contained in:
yangyakun
2026-03-18 11:19:16 +08:00
parent df373cec15
commit cf10a6a706
24 changed files with 211 additions and 39 deletions

View File

@@ -7,6 +7,7 @@ import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
import com.mogo.och.bridge.autopilot.line.LineManager
import com.mogo.och.bridge.autopilot.location.OchLocationManager
import com.mogo.och.bridge.distance.TrajectoryAndDistanceManager
import com.mogo.och.bridge.bridge.OchBridgeManager
@@ -68,6 +69,15 @@ class BridgeProvider : BridgeService, CallerBase<BridgeListener>() {
removeListener(tag)
}
override fun startAutopilot(type: Int) {
when (type) {
0 -> {LineManager.unmannedStartAutopilot(false)}
1 -> {LineManager.unmanneAutopilotContinue(false)}
else -> {}
}
}
override fun doSomeAfterAddListener(tag: String, listener: BridgeListener) {
// 轨迹和距离回调
TrajectoryManager.doSomeAfterBridgeListener()

View File

@@ -3,6 +3,9 @@ package com.mogo.och.bridge.autopilot.autopilot;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.och.bridge.autopilot.autopilot.bean.ArrivedStation;
import com.zhjt.mogo.adas.data.AdasConstants;
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification;
import org.jetbrains.annotations.Nullable;
import mogo.telematics.pad.MessagePad;
import mogo_msg.MogoReportMsg;
@@ -40,6 +43,14 @@ public interface IOchAutopilotStatusListener {
default void onAutopilotArriveAtStation(ArrivedStation arrivalNotification) {
}
/**
* 自动驾驶离站
* @param taskId
* @param taskStartNotification
*/
default void onAutopilotLeaveStation(Long taskId, TaskStartNotification taskStartNotification){
}
/**
* 工控机获取SN
*/

View File

@@ -122,8 +122,8 @@ object OchAutoPilotManager {
* 继续启动自驾
*/
@JvmStatic
fun unmannedAutoPilotContinue(taskId: Long, traj: Trajectory, vehicleSite : VehicleSite, parameters: AutopilotControlParameters): Long {
val sessionId = CallerAutoPilotControlManager.unmannedAutoPilotContinue(taskId, traj,vehicleSite, parameters)
fun unmannedAutoPilotContinue(taskId: Long, traj: Trajectory, startStation : VehicleSite,endStation : VehicleSite, parameters: AutopilotControlParameters): Long {
val sessionId = CallerAutoPilotControlManager.unmannedAutoPilotContinue(taskId, traj,startStation,endStation, parameters)
globalSessionId.set(SessionWithTime(sessionId, System.currentTimeMillis(), -1L))
OchAutoPilotStatusListenerManager.fsmBackSessionId.set(-1L)
OchAutopilotAnalytics.triggerStartAutopilotParameters(traj, parameters, sessionId)

View File

@@ -23,6 +23,7 @@ import com.zhjt.mogo.adas.common.MessageType
import com.zhjt.mogo.adas.data.AdasConstants
import com.zhjt.mogo.adas.data.bean.ReceivedAck
import com.zhjt.mogo.adas.data.bean.ReceivedAck.Status
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification
import fsm.Fsm2024
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
@@ -239,6 +240,13 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
}
}
override fun invokeLeaveStation(taskId: Long?, taskStartNotification: TaskStartNotification?) {
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotLeaveStation(taskId,taskStartNotification)
}
}
/**
* 距离终点10m 向地盘查询是否到站地盘的返回值
* [LineManager.mMapLocationListener]

View File

@@ -793,10 +793,10 @@ object LineManager : CallerBase<ILineCallback>() {
return
}
_lineInfos?.let { lineInfo ->
startStation?.let { start->
getStations { start, end ->
val wayPoints = ArrayList<VehicleSite>()
val blackPoints = ArrayList<VehicleSite>()
val vehicleSite = VehicleSite.builder()
val startStation = VehicleSite.builder()
.coordinateType(AutopilotCoordinateTypeEnum.WGS84.code)
.point(AutopilotPoint.builder().x(start.lon).y(start.lat).build())
.station(StationEnum.SITE.code)
@@ -805,7 +805,17 @@ object LineManager : CallerBase<ILineCallback>() {
.stationSeq(start.seq)
.tag(start.tag)
.build()
wayPoints.add(vehicleSite)
val endStation = VehicleSite.builder()
.coordinateType(AutopilotCoordinateTypeEnum.WGS84.code)
.point(AutopilotPoint.builder().x(end.lon).y(end.lat).build())
.station(StationEnum.SITE.code)
.stationId(end.siteId.toLong())
.stationName(end.name)
.stationSeq(end.seq)
.tag(end.tag)
.build()
wayPoints.add(startStation)
wayPoints.add(endStation)
val traj = Trajectory.builder()
.id(lineInfo.lineId)
.name(lineInfo.lineName)
@@ -817,7 +827,7 @@ object LineManager : CallerBase<ILineCallback>() {
.wayPoints(wayPoints)
.blackPoints(blackPoints)
.build()
val sessionId = OchAutoPilotManager.unmannedAutoPilotContinue(lineInfo.taskId, traj,vehicleSite, parameters)
val sessionId = OchAutoPilotManager.unmannedAutoPilotContinue(lineInfo.taskId, traj,startStation, endStation,parameters)
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId, true)
d(
TAG,

View File

@@ -86,6 +86,7 @@ object DebugDataDispatch {
const val pncAction = "pncAction"
const val collisionRisk = "CollisionRisk"
const val mediaStationMedia = "stationMedia"
const val startAutopilot = "startAutopilot"
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "video" --ei add 2 --es url "rtmp://liteavapp.qcloud.com/live/liteavdemoplayerstreamid"
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "location" --es path "1111/11111"
@@ -108,6 +109,7 @@ object DebugDataDispatch {
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "vlmMessage" --es message "前方100米有道路施工施工长度100米影响第1、2车道通行。" --ei id 128 --ef time 1880.0
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "vlmImage" --ef time 1880.0
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "stationMedia"
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "stationMedia" --ei startType 0
// adb shell am broadcast -a com.hmi.v2x.trafficlight -f 0x011000000 --ei trafficLightCheckType 1 --ei trafficLightCountDown 0 --ez trafficLightIsShow true // 红绿灯
@@ -122,6 +124,10 @@ object DebugDataDispatch {
}
when (type) {
startAutopilot -> {
val type = intent.getIntExtra("startType", 0)
BridgeManager.debugStartAutopilot(type)
}
mediaStationMedia -> {
val introductionList = mutableListOf<MediaItem>()
introductionList.add(

View File

@@ -35,4 +35,8 @@ object BridgeManager {
bridgeService?.removeBridgeListener(tag)
}
fun debugStartAutopilot(type:Int){
bridgeService?.startAutopilot(type)
}
}

View File

@@ -13,4 +13,6 @@ interface BridgeService : IProvider {
fun addBridgeListener(tag:String, listener:BridgeListener)
fun removeBridgeListener(tag: String)
fun startAutopilot(type: Int)
}

View File

@@ -46,6 +46,7 @@ import com.mogo.och.unmanned.repository.RepositoryManager
import com.mogo.och.unmanned.repository.db.bean.TaskSiteDataBean
import com.mogo.och.unmanned.repository.exception.DataException
import com.mogo.och.unmanned.util.ShuttleVoiceManager
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification
import io.reactivex.Observer
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
@@ -130,6 +131,31 @@ object OrderModel {
onArriveAt(arrivedStation, "底盘触发进站",false)
}
override fun onAutopilotLeaveStation(
taskId: Long?,
taskStartNotification: TaskStartNotification?
) {
OchChainLogManager.writeChainLog("触发滑动出发,","taskId:$taskId taskStartNotification:${taskStartNotification}")
if(taskStartNotification?.isCloseDoorStartAuto==true){
val curStation = taskStartNotification.curStation
val nextStation = taskStartNotification.nextStation
LineModel.currentTask?.let { task ->
if(task.taskId==taskId){
LineManager.getStations { start, end ->
if(start.siteId.toLong()==curStation.stationId&&end.siteId.toLong()==nextStation.stationId){
OchChainLogManager.writeChainLog("触发滑动出发,","触发成功")
driveToNextStation()
}else{
OchChainLogManager.writeChainLog("触发滑动出发,","起始终点id不同触发失败")
}
}
}else{
OchChainLogManager.writeChainLog("触发滑动出发,","taskId不同触发失败")
}
}
}
}
}
private val ochTransform = object : OchTransformDispatch {

View File

@@ -49,6 +49,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm;
import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume;
import com.zhjt.mogo.adas.data.sweeper.task.status.SweeperTaskStatus;
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop;
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification;
import java.io.IOException;
import java.math.BigDecimal;
@@ -803,4 +804,9 @@ public class SweeperCloudTaskModel implements IMoGoSweeperFutianCloudTaskListene
@Override
public void onAutoPilotStation(long token, long timestamp, @Nullable SsmInfo.AutoPilotStation autoPilotStation) {
}
@Override
public void invokeLeaveStation(@Nullable Long taskId, @Nullable TaskStartNotification taskStartNotification) {
}
}

View File

@@ -42,6 +42,7 @@ import com.mogo.och.sweeper.operate.model.SweeperOperateTaskModel;
import com.mogo.och.sweeper.common.util.SweeperFutianCmdUtil;
import com.mogo.och.sweeper.operate.util.SweeperTrajectoryManager;
import com.zhjt.mogo.adas.data.AdasConstants;
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification;
import java.math.BigDecimal;
import java.math.RoundingMode;
@@ -483,4 +484,9 @@ public class SweeperOperatePresenter extends Presenter<SweeperOperateFragment>
public void onAutoPilotStation(long token, long timestamp, @Nullable SsmInfo.AutoPilotStation autoPilotStation) {
}
@Override
public void invokeLeaveStation(@Nullable Long taskId, @Nullable TaskStartNotification taskStartNotification) {
}
}

View File

@@ -84,6 +84,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm
import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop
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 io.netty.channel.Channel
import mogo.telematics.pad.MessagePad
@@ -467,9 +468,9 @@ class MoGoAutopilotControlProvider :
}
}
override fun sendTaskManagerAutopilotContinue(trackId: Long, taskId: Long, stationId: Long, stationName: String, stationSeq: Int, lon: Double, lat: Double): Long {
override fun sendTaskManagerAutopilotContinue(trackId: Long, taskId: Long, startStation : VehicleSite, endStation:VehicleSite ): Long {
return if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) {
val invokeResult = AdasManager.getInstance().sendTaskManagerAutopilotContinue(trackId, taskId, stationId, stationName, stationSeq, lon, lat)
val invokeResult = AdasManager.getInstance().sendTaskManagerAutopilotContinue(trackId, taskId, startStation, endStation)
invokeAutoPilotResult(if (invokeResult > -1) "无人化 取消自动驾驶调用成功:${invokeResult}" else "无人化 取消自动驾驶调用失败, socket 或者 rawPack 可能为空")
invokeResult
} else {

View File

@@ -38,6 +38,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SO
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_VEHICLE
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_STATUS
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.inVokeLeaveStation
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeArriveAtStation
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutoPilotInfo
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutoPilotStation
@@ -133,6 +134,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume
import com.zhjt.mogo.adas.data.sweeper.task.status.SweeperTaskStatus
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskLocationQueryResponse
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification
import com.zhjt.mogo.adas.utils.ByteUtil
import com.zhjt.service.chain.ChainLog
import fault_management.FmInfo
@@ -1693,7 +1695,11 @@ class MoGoAdasListenerImpl : OnAdasListener {
CallerLogger.i("$M_D_C$TAG", "任务管理数据:$data")
}
override fun onAdasTaskManagerDeparture(taskId: Long?, siteId: Long?, sequence: Int?, ack: Boolean, reason: String?, stationTimeLeft: Double) {
override fun onAdasTaskManagerDeparture(
taskId: Long?,
taskStartNotification: TaskStartNotification?
) {
inVokeLeaveStation(taskId,taskStartNotification)
}
override fun onAdasTaskManagerArrival(taskId: Long?, siteId: Long?, sequence: Int?, mileage: BigDecimal?) {

View File

@@ -16,6 +16,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm.TaskConfi
import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume.SuspendResumeTaskReq
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop.StopTaskResp
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.Trajectory
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.VehicleSite
import mogo.telematics.pad.MessagePad
import mogo.yycp.paralleldriving.protocol.ParallelDrivingRequest
import system_master.SsmInfo
@@ -49,7 +50,7 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
fun sendTaskManagerAutopilotStart(taskId: Long, traj: Trajectory): Long
fun sendTaskManagerAutopilotContinue(trackId: Long, taskId: Long, stationId: Long, stationName: String, stationSeq: Int, lon: Double, lat: Double): Long
fun sendTaskManagerAutopilotContinue(trackId: Long, taskId: Long, startStation : VehicleSite, endStation: VehicleSite): Long
/**
* 开启自动驾驶(魔方)

View File

@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.api.autopilot
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.zhjt.mogo.adas.data.AdasConstants
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
import system_master.*
@@ -67,6 +68,11 @@ interface IMoGoAutopilotStatusListener {
*/
fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {}
/**
* 自动驾驶 离站触发
*/
fun invokeLeaveStation(taskId: Long?, taskStartNotification: TaskStartNotification?) {}
/**
* 工控机获取SN
*/

View File

@@ -122,12 +122,12 @@ object CallerAutoPilotControlManager {
/**
* 自驾成功后再次启动自驾时
*/
fun unmannedAutoPilotContinue(taskId: Long, traj: Trajectory?, vehicleSite : VehicleSite, controlParameters: AutopilotControlParameters): Long {
fun unmannedAutoPilotContinue(taskId: Long, traj: Trajectory?, startStation : VehicleSite,endStation : 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
val sessionId = providerApi?.sendTaskManagerAutopilotContinue(traj.id, taskId, startStation,endStation) ?: -1L
// 更新记录在全局的控制参数
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(controlParameters)
return sessionId

View File

@@ -12,6 +12,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils
import com.zhjt.mogo.adas.data.AdasConstants
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
import system_master.SsmInfo
@@ -271,6 +272,13 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
}
}
fun inVokeLeaveStation(taskId: Long?, taskStartNotification: TaskStartNotification?){
M_LISTENERS.forEach {
val listener = it.value
listener.invokeLeaveStation(taskId,taskStartNotification)
}
}
/**
* 工控机获取SN 回调
*/

View File

@@ -9,12 +9,22 @@ public class TaskContinueNotification {
* 当前站点
*/
private VehicleSite curStation;
private VehicleSite nextStation;
public TaskContinueNotification() {
}
public TaskContinueNotification(VehicleSite curStation) {
public VehicleSite getNextStation() {
return nextStation;
}
public void setNextStation(VehicleSite nextStation) {
this.nextStation = nextStation;
}
public TaskContinueNotification(VehicleSite curStation, VehicleSite nextStation) {
this.curStation = curStation;
this.nextStation = nextStation;
}
public VehicleSite getCurStation() {
@@ -38,14 +48,20 @@ public class TaskContinueNotification {
public static class Builder {
private VehicleSite curStation;
private VehicleSite nextStation;
public Builder curStation(VehicleSite curStation) {
this.curStation = curStation;
return this;
}
public Builder nextStation(VehicleSite nextStation) {
this.nextStation = nextStation;
return this;
}
public TaskContinueNotification build() {
return new TaskContinueNotification(curStation);
return new TaskContinueNotification(curStation, nextStation);
}
}
}

View File

@@ -1,6 +1,12 @@
package com.zhjt.mogo.adas.unmanned.task.dto.cmd;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.zhjt.mogo.adas.unmanned.task.enums.MessageCmdEnum;
import java.util.List;
import java.util.Objects;
/**
* 车端发送车辆启动结果
@@ -26,17 +32,20 @@ public class TaskStartNotification {
* 错误码
*/
private List<Integer> errCodes;
/**
* 当前站点
*/
private VehicleSite curStation;
/**
* 下一个站点
*/
private VehicleSite nextStation;
/**
* 前一个任务名称
*/
private String lastTaskCmdType;
public TaskStartNotification() {
}
public TaskStartNotification(VehicleSite curLocation, boolean autopilotResult, double stationTimeLeft, String errMsg, List<Integer> errCodes) {
this.curLocation = curLocation;
this.autopilotResult = autopilotResult;
this.stationTimeLeft = stationTimeLeft;
this.errMsg = errMsg;
this.errCodes = errCodes;
}
public TaskStartNotification() {}
public VehicleSite getCurLocation() {
return curLocation;
@@ -78,6 +87,30 @@ public class TaskStartNotification {
this.errCodes = errCodes;
}
public VehicleSite getCurStation() {
return curStation;
}
public void setCurStation(VehicleSite curStation) {
this.curStation = curStation;
}
public VehicleSite getNextStation() {
return nextStation;
}
public void setNextStation(VehicleSite nextStation) {
this.nextStation = nextStation;
}
public String getLastTaskCmdType() {
return lastTaskCmdType;
}
public void setLastTaskCmdType(String lastTaskCmdType) {
this.lastTaskCmdType = lastTaskCmdType;
}
@Override
public String toString() {
return "TaskStartNotification{" +
@@ -86,6 +119,19 @@ public class TaskStartNotification {
", stationTimeLeft=" + stationTimeLeft +
", errMsg='" + errMsg + '\'' +
", errCodes=" + errCodes +
", curStation=" + curStation +
", nextStation=" + nextStation +
", lastTaskCmdType=" + lastTaskCmdType +
'}';
}
public boolean isCloseDoorStartAuto(){
if(Objects.equals(lastTaskCmdType, MessageCmdEnum.TaskStartNotification.getCode()) ||
Objects.equals(lastTaskCmdType, MessageCmdEnum.TaskContinueNotification.getCode()) ){
return false;
}
return true;
}
}

View File

@@ -3436,19 +3436,13 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
*
* @param trackId
* @param taskId
* @param stationId
* @param stationName
* @param stationSeq
* @param lon
* @param lat
* @param startStation
* @param endStation
* @return
*/
@Override
public long sendTaskManagerAutopilotContinue(Long trackId, Long taskId, Long stationId, String stationName, Integer stationSeq, double lon, double lat) {
VehicleSite vehicleSite = VehicleSite.builder().stationId(stationId).stationName(stationName)
.station(StationEnum.SITE.getCode()).stationSeq(stationSeq)
.point(AutopilotPoint.builder().x(lon).y(lat).build()).coordinateType(AutopilotCoordinateTypeEnum.WGS84.getCode()).build();
TaskContinueNotification taskContinueNotification = TaskContinueNotification.builder().curStation(vehicleSite).build();
public long sendTaskManagerAutopilotContinue(Long trackId, Long taskId,VehicleSite startStation,VehicleSite endStation) {
TaskContinueNotification taskContinueNotification = TaskContinueNotification.builder().curStation(startStation).nextStation(endStation).build();
CmdDto<TaskContinueNotification> cmdDto = CmdDto.<TaskContinueNotification>builder().cmdType(MessageCmdEnum.TaskContinueNotification.getCode()).taskId(taskId).lineId(trackId).timestamp(System.currentTimeMillis()).data(taskContinueNotification).build();
return sendTaskManager(cmdDto);
}

View File

@@ -29,6 +29,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm;
import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume;
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop;
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.Trajectory;
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.VehicleSite;
import java.util.HashSet;
import java.util.List;
@@ -2098,8 +2099,8 @@ public class AdasManager implements IAdasNetCommApi {
}
@Override
public long sendTaskManagerAutopilotContinue(Long trackId, Long taskId, Long stationId, String stationName, Integer stationSeq, double lon, double lat) {
return mChannel == null ? -1L : mChannel.sendTaskManagerAutopilotContinue(trackId, taskId, stationId, stationName, stationSeq, lon, lat);
public long sendTaskManagerAutopilotContinue(Long trackId, Long taskId, VehicleSite startStation, VehicleSite endStation) {
return mChannel == null ? -1L : mChannel.sendTaskManagerAutopilotContinue(trackId, taskId, startStation, endStation);
}
@Override

View File

@@ -17,6 +17,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm;
import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume;
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop;
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.Trajectory;
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.VehicleSite;
import java.util.List;
import java.util.Map;
@@ -1547,7 +1548,7 @@ public interface IAdasNetCommApi {
long sendTaskManagerRunningInfo();
long sendTaskManagerAutopilotStart(Long taskId, Trajectory traj);
long sendTaskManagerAutopilotContinue(Long trackId, Long taskId, Long stationId, String stationName, Integer stationSeq, double lon, double lat);
long sendTaskManagerAutopilotContinue(Long trackId, Long taskId, VehicleSite startStation, VehicleSite endStation);
long sendTaskManagerAutopilotCancel(Long taskId);

View File

@@ -34,6 +34,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume;
import com.zhjt.mogo.adas.data.sweeper.task.status.SweeperTaskStatus;
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop;
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskLocationQueryResponse;
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -816,8 +817,9 @@ public interface OnAdasListener {
* @param ack
* @param reason
* @param stationTimeLeft
* @param closeDoorStartAuto
*/
void onAdasTaskManagerDeparture(Long taskId, Long siteId, Integer sequence, boolean ack, String reason, double stationTimeLeft);
void onAdasTaskManagerDeparture(Long taskId, TaskStartNotification taskStartNotification);
/**
* 域控任务管理到站通知

View File

@@ -3,6 +3,7 @@ package com.zhidao.support.adas.high.msg;
import android.os.SystemClock;
import android.util.Log;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
@@ -66,7 +67,7 @@ public class TaskManagerMessage extends MyAbstractMessageHandler {
TaskStartNotification taskStartNotification = cmdDto.getData();
VehicleSite vehicleSite = taskStartNotification.getCurLocation();
adasListener.onAdasTaskManagerDeparture(cmdDto.getTaskId(), vehicleSite.getStationId(), vehicleSite.getStationSeq(), taskStartNotification.isAutopilotResult(), taskStartNotification.getErrMsg(), taskStartNotification.getStationTimeLeft());
adasListener.onAdasTaskManagerDeparture(cmdDto.getTaskId(), taskStartNotification);
}
} else if (messageCmdEnum == MessageCmdEnum.TaskArrivalNotification) {//到站通知