Skip to content

Commit

Permalink
fix(mqttClient): AlarmTopic upload failure
Browse files Browse the repository at this point in the history
fix: 报警主题中文名称错误

fix: 报警事件订阅漏写
  • Loading branch information
kimdiego2098 committed Apr 29, 2024
1 parent f548c27 commit c22dde8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public override void Init(IChannel? channel = null)
_exTTimerTick = new(_businessPropertyWithCacheInterval.BusinessInterval);
_exT2TimerTick = new(_businessPropertyWithCacheInterval.BusinessInterval);

HostedServiceUtil.AlarmHostedService.OnAlarmChanged -= AlarmValueChange;
HostedServiceUtil.AlarmHostedService.OnAlarmChanged += AlarmValueChange;

// 根据业务属性的缓存是否为间隔上传来决定事件绑定
if (!_businessPropertyWithCacheInterval.IsInterval)
{
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ThingsGateway.Plugin.Mqtt/Locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"IsAlarmList": "报警列表上传",
"DeviceTopic": "设备主题",
"VariableTopic": "变量主题",
"AlarmTopic": "比较主题",
"AlarmTopic": "报警主题",

"IsInterval": "启用定时上传",
"BusinessInterval": "定时上传间隔",
Expand Down

0 comments on commit c22dde8

Please sign in to comment.