修改Gateway_YT消息的订阅的解析

This commit is contained in:
lixiaoyuan
2025-10-14 09:28:25 +08:00
parent b317a03f35
commit 5f6511a3f0
3 changed files with 7 additions and 1 deletions

View File

@@ -151,6 +151,11 @@ void SysPolicy::getGatewayJsonPeriods(njson& json)
{
int h = 0; int m = 0;
PeriodsTimeStrToInt(item.first, h, m);
if (jsonArray.size() == 0 && h!=0)
{
jsonArray.push_back({0, 0, 0});
}
int p = 1;
if (item.second == "") p = 1;
else if (item.second == "") p = 2;

View File

@@ -292,7 +292,7 @@ int MqttClient::onMessageArrived(char* topic, int topicLen, MQTTAsync_message* m
{
int deviceNo = -1;
JSON::read(json, "no", deviceNo);
if (command == "Gateway_YC")
if (command == "Gateway_YC" || command == "Gateway_YT")
{
int mode = -1;
std::string param1;