update
This commit is contained in:
parent
9998dfa5e2
commit
180f3ad4d1
@ -316,7 +316,12 @@ bool CRYDevice::publish_sensor_data(const std::string traceId, const char* comma
|
|||||||
std::string outputConfig = Json::writeString(builder, jsonRoot);
|
std::string outputConfig = Json::writeString(builder, jsonRoot);
|
||||||
if (traceId != "")
|
if (traceId != "")
|
||||||
{
|
{
|
||||||
vLog(LOG_DEBUG, "send cmd: %s, payload: %d, %128s\n", command, outputConfig.length(), outputConfig.c_str());
|
vLog(LOG_DEBUG, "send cmd: %s, payload: %d\n", command, outputConfig.length());
|
||||||
|
} else {
|
||||||
|
std::string com = command;
|
||||||
|
if (com == "deviceEvent") {
|
||||||
|
vLog(LOG_DEBUG, "send cmd: %s, payload: %d\n", command, outputConfig.length());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int rc = websocket_write(outputConfig.c_str(), outputConfig.length());
|
int rc = websocket_write(outputConfig.c_str(), outputConfig.length());
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
@ -2014,7 +2019,7 @@ bool CRYDevice::publishdeviceEventData(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (root.size()) {
|
if (root.size()) {
|
||||||
//return publish_sensor_data("", "deviceEvent", root);
|
return publish_sensor_data("", "deviceEvent", root);
|
||||||
//vLog(LOG_DEBUG, "%s", root.toStyledString().c_str());
|
//vLog(LOG_DEBUG, "%s", root.toStyledString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user