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:
@@ -26,6 +26,7 @@
|
||||
"Cooling_YX": {"deviceType":14, "polling":1, "enabled": 1},
|
||||
"Gateway_YX": {"deviceType":15, "polling":1, "enabled": 1},
|
||||
"Gateway_YC": {"deviceType":15, "polling":1, "enabled": 1},
|
||||
"Gateway_YT": {"deviceType":15, "polling":0, "enabled": 1},
|
||||
"Charger_YC": {"deviceType":106, "polling":0, "enabled": 1}
|
||||
},
|
||||
"view": {"latitude":0,"longitude":0,"altitude":0},
|
||||
|
||||
@@ -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