mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
修改Gateway_YT消息的订阅的解析
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user