Skip to content

Commit

Permalink
fix 周期归档
Browse files Browse the repository at this point in the history
  • Loading branch information
iioter committed Jun 14, 2022
1 parent 0985cb5 commit b93bbc4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Plugins/Plugin/MyMqttClient.cs
Expand Up @@ -448,7 +448,7 @@ private bool CanPubTelemetry(Device device, Dictionary<string, List<PayLoad>> Se
//是否变化
else
{
if (JsonConvert.SerializeObject(SendModel[device.DeviceName]) != JsonConvert.SerializeObject(LastTelemetrys[device.DeviceName]))
if (JsonConvert.SerializeObject(SendModel[device.DeviceName][0].Values) != JsonConvert.SerializeObject(LastTelemetrys[device.DeviceName][0].Values))
canPub = true;

}
Expand All @@ -463,7 +463,8 @@ private bool CanPubTelemetry(Device device, Dictionary<string, List<PayLoad>> Se
canPub = true;
Console.WriteLine(e);
}
LastTelemetrys[device.DeviceName] = SendModel[device.DeviceName];
if(canPub)
LastTelemetrys[device.DeviceName] = SendModel[device.DeviceName];
return canPub;
}
public void PublishTelemetry(Device device, Dictionary<string, List<PayLoad>> SendModel)
Expand Down

1 comment on commit b93bbc4

@iioter
Copy link
Owner Author

@iioter iioter commented on b93bbc4 Jun 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#13 已解决

Please sign in to comment.