| | |
| | | } |
| | | // 重启机场时清redis视频直播地址,机场重启不掉线。但是流停了。 |
| | | if(RemoteControlMethodEnum.DEVICE_REBOOT == controlMethodEnum) { |
| | | DeviceDTO device = (DeviceDTO) RedisOpsUtils.get(RedisConst.DEVICE_ONLINE_PREFIX + sn); |
| | | // 重启机场时,读取舱盖状态,开舱盖不让重启,关舱盖重启 |
| | | Integer cover_state = (Integer)RedisOpsUtils.get(RedisConst.COVER_STATE_OSD_PREFIX + device.getDeviceSn()); |
| | | if(cover_state != null && cover_state != 0) { |
| | | return ResponseResult.error(111111,"请关闭舱盖再执行重启操作!"); |
| | | } |
| | | RedisOpsUtils.del(RedisConst.WEBSOCKET_VIDEO_ADDRESS_PREFIX + sn); |
| | | RedisOpsUtils.del(RedisConst.COVER_STATE_PREFIX + sn); |
| | | // 重启机场时,关闭飞行器 |
| | | this.controlDock(sn,"drone_close",null); |
| | | RedisOpsUtils.del(RedisConst.WEBSOCKET_VIDEO_ADDRESS_PREFIX + device.getChildDeviceSn()); |
| | | } |
| | | String topic = TopicConst.THING_MODEL_PRE + TopicConst.PRODUCT + sn + TopicConst.SERVICES_SUF; |
| | | String bid = UUID.randomUUID().toString(); |
| | |
| | | //关闭,摄像头为舱外;将摄像头状态存到redis,格式为:CONVERSTATE:设备SN:1(舱外)或0(舱内) |
| | | _deviceService.setRedisCameraPosition(sn,1); |
| | | } |
| | | |
| | | |
| | | return ResponseResult.success(); |
| | | } |
| | |
| | | _deviceService.updateWorkType(device.getChildDeviceSn(), 7L); |
| | | RedisOpsUtils.set(RedisConst.OSD_STATUS_PREFIX + device.getChildDeviceSn(), 7); |
| | | } |
| | | // 机场重启状态--ok后删除redis状态 |
| | | if(method.equals("device_reboot")){ |
| | | if(eventsReceiver.getOutput().getProgress().getPercent() == 100){ |
| | | RedisOpsUtils.del(RedisConst.WEBSOCKET_VIDEO_ADDRESS_PREFIX + sn); |
| | | RedisOpsUtils.del(RedisConst.COVER_STATE_PREFIX + sn); |
| | | RedisOpsUtils.del(RedisConst.WEBSOCKET_VIDEO_ADDRESS_PREFIX + device.getChildDeviceSn()); |
| | | } |
| | | } |
| | | |
| | | |
| | | String dockProgress =""; |
| | | try { |