Browse Source

Update DeviceServiceImpl.java

v1.3.1
DJIsean 2 years ago committed by GitHub
parent
commit
8077e8b67b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/main/java/com/dji/sample/manage/service/impl/DeviceServiceImpl.java

4
src/main/java/com/dji/sample/manage/service/impl/DeviceServiceImpl.java

@ -902,7 +902,7 @@ public class DeviceServiceImpl implements IDeviceService {
} }
String topic = THING_MODEL_PRE + PRODUCT + dockSn + PROPERTY_SUF + SET_SUF; String topic = THING_MODEL_PRE + PRODUCT + dockSn + PROPERTY_SUF + SET_SUF;
// OsdSubDeviceReceiver osd = (OsdSubDeviceReceiver) RedisOpsUtils.get(RedisConst.OSD_PREFIX + deviceDTO.getChildDeviceSn()); OsdSubDeviceReceiver osd = (OsdSubDeviceReceiver) RedisOpsUtils.get(RedisConst.OSD_PREFIX + deviceDTO.getChildDeviceSn());
if (!param.isObject()) { if (!param.isObject()) {
this.deviceOnePropertySet(topic, propertyEnum, Map.entry(propertyEnum.getProperty(), param)); this.deviceOnePropertySet(topic, propertyEnum, Map.entry(propertyEnum.getProperty(), param));
return; return;
@ -910,7 +910,7 @@ public class DeviceServiceImpl implements IDeviceService {
// If there are multiple parameters, set them separately. // If there are multiple parameters, set them separately.
for (Iterator<Map.Entry<String, JsonNode>> filed = param.fields(); filed.hasNext(); ) { for (Iterator<Map.Entry<String, JsonNode>> filed = param.fields(); filed.hasNext(); ) {
Map.Entry<String, JsonNode> node = filed.next(); Map.Entry<String, JsonNode> node = filed.next();
boolean isPublish = basicDeviceProperty.canPublish(node.getKey(), null); boolean isPublish = basicDeviceProperty.canPublish(node.getKey(), osd);
if (!isPublish) { if (!isPublish) {
continue; continue;
} }

Loading…
Cancel
Save