Bug: Fix bug that back wave and job status did not send back to frontend
This commit is contained in:
parent
d262796fbd
commit
5c28a9c14e
@ -283,17 +283,23 @@ public class JmJobStatusServiceImpl implements JmJobStatusService {
|
||||
return;
|
||||
}
|
||||
endAirline(jobId, jobVo, uavVo, airlineVo, wsVo, nextAirline == null);
|
||||
} else if (isBoot == 1 && aStatus == ExecStatusEnum.PROCESSING && overButSending) {
|
||||
} else if (isBoot == 1 && aStatus == ExecStatusEnum.PROCESSING) {
|
||||
if (overButSending) {
|
||||
// 前一航线的图片没传完,就开始了新航线
|
||||
endAirline(jobId, jobVo, uavVo, airlineVo, wsVo, nextAirline == null);
|
||||
if (nextAirline != null) {
|
||||
startAirline(nextAirline, wsVo);
|
||||
}
|
||||
}
|
||||
|
||||
// simpMessageingTemplate.convertAndSend(WebSocketKey.JM_JOB_STATUS, wsVo);
|
||||
simpMessageingTemplate.convertAndSend(WebSocketKey.JM_JOB_STATUS, curr);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
// 4.将更新后的状态推送到前端
|
||||
simpMessageingTemplate.convertAndSend(WebSocketKey.JM_JOB_STATUS, wsVo);
|
||||
// simpMessageingTemplate.convertAndSend(WebSocketKey.JM_JOB_STATUS, wsVo);
|
||||
}
|
||||
|
||||
// 开启新航线
|
||||
|
||||
@ -83,30 +83,30 @@ public class CacheKey {
|
||||
/**
|
||||
* 运动规划响应,1秒
|
||||
*/
|
||||
public static final String SMP_WAYPOINT_RES = "skyeye:smp:waypoint:";
|
||||
//public static final String SMP_WAYPOINT_RES = "skyeye:smp:waypoint:";
|
||||
|
||||
/**
|
||||
* 飞行控制响应,1秒
|
||||
*/
|
||||
public static final String SMP_FLIGHT_RES = "skyeye:smp:flight:";
|
||||
//public static final String SMP_FLIGHT_RES = "skyeye:smp:flight:";
|
||||
|
||||
/**
|
||||
* 云台控制响应,1秒
|
||||
*/
|
||||
public static final String SMP_GIMBALMGR_RES = "skyeye:smp:gimbalmgr:";
|
||||
//public static final String SMP_GIMBALMGR_RES = "skyeye:smp:gimbalmgr:";
|
||||
|
||||
/**
|
||||
* 数据订阅响应,1秒
|
||||
*/
|
||||
public static final String SMP_SUBSCRIPT_RES = "skyeye:smp:subscript:";
|
||||
//public static final String SMP_SUBSCRIPT_RES = "skyeye:smp:subscript:";
|
||||
|
||||
/**
|
||||
* 数据订阅回传数据,1秒
|
||||
*/
|
||||
public static final String SMP_SUBSCRIPT_DATA = "skyeye:smp:subscript:";
|
||||
//public static final String SMP_SUBSCRIPT_DATA = "skyeye:smp:subscript:";
|
||||
|
||||
/**
|
||||
* 相机视频流响应,1秒
|
||||
*/
|
||||
public static final String SMP_VIDEO_RES = "skyeye:smp:video:";
|
||||
//public static final String SMP_VIDEO_RES = "skyeye:smp:video:";
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.zhangy.skyeye.sar.service.impl;
|
||||
import com.zhangy.skyeye.jm.dto.JmAirlineStatusDTO;
|
||||
import com.zhangy.skyeye.jm.dto.JmUavStatusDTO;
|
||||
import com.zhangy.skyeye.jm.entity.JmImage;
|
||||
import com.zhangy.skyeye.jm.service.JmJobStatusService;
|
||||
import com.zhangy.skyeye.publics.consts.WebSocketKey;
|
||||
import com.zhangy.skyeye.sar.context.SarTaskContextProvider;
|
||||
import com.zhangy.skyeye.sar.dto.JmSarWaveWsDTO;
|
||||
@ -33,6 +34,9 @@ public class SarBackWsServiceImpl implements ISarBackWsService {
|
||||
@Autowired
|
||||
private SarTaskContextProvider taskContextProvider;
|
||||
|
||||
@Autowired
|
||||
private JmJobStatusService jobStatusService;
|
||||
|
||||
@Override
|
||||
public void sendWave(String payloadIp, SarBackWaveFrameDTO frame, byte[] frameData) {
|
||||
JmSarWaveWsDTO wsVo = loadJobDetail(payloadIp, frame.getChannel(), frameData);
|
||||
@ -55,7 +59,8 @@ public class SarBackWsServiceImpl implements ISarBackWsService {
|
||||
* @return
|
||||
*/
|
||||
private JmSarWaveWsDTO loadJobDetail(String payloadIp, JmSarWaveWsDTO ws, byte[] frameData) {
|
||||
JmUavStatusDTO uav = taskContextProvider.getCurrentUav(payloadIp);
|
||||
// JmUavStatusDTO uav = taskContextProvider.getCurrentUav(payloadIp);
|
||||
JmUavStatusDTO uav = jobStatusService.getCurrUav(payloadIp);
|
||||
if (uav == null) { // 如果没有执行中的任务则忽略
|
||||
log.debug("IP={} 无正在执行的任务,忽略波形推送", payloadIp);
|
||||
return null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user