update
This commit is contained in:
parent
865291842f
commit
23d24127c1
@ -2804,7 +2804,7 @@ void CRYDevice::heart_beat(int status)
|
|||||||
Json::Value jsonDevice;
|
Json::Value jsonDevice;
|
||||||
Json::Value jsonValue;
|
Json::Value jsonValue;
|
||||||
for (int i = 0; i < PROCESSES_NUM; i++) {
|
for (int i = 0; i < PROCESSES_NUM; i++) {
|
||||||
if (config.processes[i].state == TRUE) {
|
if ((config.processes[i].state & 0x01) == TRUE) {
|
||||||
char linkId[32];
|
char linkId[32];
|
||||||
if (config.processes[i].irn == 0) continue;
|
if (config.processes[i].irn == 0) continue;
|
||||||
#ifdef NOPOLL_64BIT_PLATFORM
|
#ifdef NOPOLL_64BIT_PLATFORM
|
||||||
@ -2814,7 +2814,7 @@ void CRYDevice::heart_beat(int status)
|
|||||||
#endif
|
#endif
|
||||||
jsonValue["linkId"] = linkId;
|
jsonValue["linkId"] = linkId;
|
||||||
jsonValue["online"] = (config.processes[i].softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
jsonValue["online"] = (config.processes[i].softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
||||||
vLog(LOG_DEBUG, "link %s, %d\n", linkId, (config.processes[i].softdog >= PROCESS_WATCHDOG_TIME) ? 0 : 1);
|
//vLog(LOG_DEBUG, "link %s, %d\n", linkId, (config.processes[i].softdog >= PROCESS_WATCHDOG_TIME) ? 0 : 1);
|
||||||
jsonLink.append(jsonValue);
|
jsonLink.append(jsonValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2823,7 +2823,8 @@ void CRYDevice::heart_beat(int status)
|
|||||||
payload["links"] = jsonLink;
|
payload["links"] = jsonLink;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < UNIT_NUM; i++) {
|
for (int i = 0; i < UNIT_NUM; i++) {
|
||||||
if (config.units[i].state == TRUE) {
|
//vLog(LOG_DEBUG, "unit (%d), state is: %d\n", i, config.units[i].state);
|
||||||
|
if ((config.units[i].state & 0x01) == TRUE) {
|
||||||
char deviceId[32];
|
char deviceId[32];
|
||||||
if (config.units[i].irn == 0) continue;
|
if (config.units[i].irn == 0) continue;
|
||||||
#ifdef NOPOLL_64BIT_PLATFORM
|
#ifdef NOPOLL_64BIT_PLATFORM
|
||||||
@ -2833,7 +2834,7 @@ void CRYDevice::heart_beat(int status)
|
|||||||
#endif
|
#endif
|
||||||
jsonValue["deviceId"] = deviceId;
|
jsonValue["deviceId"] = deviceId;
|
||||||
jsonValue["online"] = (config.units[i].softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
jsonValue["online"] = (config.units[i].softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
||||||
vLog(LOG_DEBUG, "unit %s, %d\n", deviceId, (config.units[i].softdog >= PROCESS_WATCHDOG_TIME) ? 0 : 1);
|
//vLog(LOG_DEBUG, "unit %s, %d\n", deviceId, (config.units[i].softdog >= PROCESS_WATCHDOG_TIME) ? 0 : 1);
|
||||||
jsonDevice.append(jsonValue);
|
jsonDevice.append(jsonValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user