Commit 2a240639 by gdj

修复无人机和机场相对高度低于0时无法返航的bug

parent d2ce3446
...@@ -21,7 +21,8 @@ public class ReturnHomeState extends RemoteDebugHandler { ...@@ -21,7 +21,8 @@ public class ReturnHomeState extends RemoteDebugHandler {
return deviceRedisService.getDeviceOnline(sn) return deviceRedisService.getDeviceOnline(sn)
.map(DeviceDTO::getChildDeviceSn) .map(DeviceDTO::getChildDeviceSn)
.flatMap(deviceSn -> deviceRedisService.getDeviceOsd(deviceSn, OsdDockDrone.class)) .flatMap(deviceSn -> deviceRedisService.getDeviceOsd(deviceSn, OsdDockDrone.class))
.map(osd -> osd.getElevation() > 0 && modeCodeCanReturnHome(osd.getModeCode())) //.map(osd -> osd.getElevation() > 0 && modeCodeCanReturnHome(osd.getModeCode()))
.map(osd -> modeCodeCanReturnHome(osd.getModeCode()))
.orElse(false); .orElse(false);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment