浏览代码

修改数据寄存器读取地址 从2800开始读取

wanxl 1 年之前
父节点
当前提交
69f1d85951

+ 1 - 1
src/main/java/com/template/common/mqtt/PushCallback.java

@@ -108,7 +108,7 @@ public class PushCallback implements MqttCallback {
             switch (arr[i]){
                 case "Temperature":
                     records.setType("Temperature");
-                    double tem=(double) Integer.parseInt(content.substring(10,14), 16)/100;
+                    double tem=(double) Integer.parseInt(content.substring(10,14), 16)/10;
                     records.setValue(tem);
                     records.setCreateAt(now);
                     records.setUpdateAt(now);

+ 1 - 1
src/main/java/com/template/controller/DevicePublicController.java

@@ -74,7 +74,7 @@ public class DevicePublicController  {
             String topicOld="";
             String topicNew="";
             for (Devices devices:devicesList){
-                String command = devices.getDeviceNo()+"030AF1000E";
+                String command = devices.getDeviceNo()+"030AF0000E";
                 topicOld=topicNew;
                 String topic = devices.getTopic()+"_GET";
                 topicNew=topic;