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. 6
      src/main/java/com/dji/sample/manage/service/impl/DeviceServiceImpl.java

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

@ -902,7 +902,7 @@ public class DeviceServiceImpl implements IDeviceService { @@ -902,7 +902,7 @@ public class DeviceServiceImpl implements IDeviceService {
}
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()) {
this.deviceOnePropertySet(topic, propertyEnum, Map.entry(propertyEnum.getProperty(), param));
return;
@ -910,7 +910,7 @@ public class DeviceServiceImpl implements IDeviceService { @@ -910,7 +910,7 @@ public class DeviceServiceImpl implements IDeviceService {
// If there are multiple parameters, set them separately.
for (Iterator<Map.Entry<String, JsonNode>> filed = param.fields(); filed.hasNext(); ) {
Map.Entry<String, JsonNode> node = filed.next();
boolean isPublish = basicDeviceProperty.canPublish(node.getKey(), null);
boolean isPublish = basicDeviceProperty.canPublish(node.getKey(), osd);
if (!isPublish) {
continue;
}
@ -1074,4 +1074,4 @@ public class DeviceServiceImpl implements IDeviceService { @@ -1074,4 +1074,4 @@ public class DeviceServiceImpl implements IDeviceService {
return true;
}
}
}

Loading…
Cancel
Save