注释心跳上报
This commit is contained in:
parent
adb6723a74
commit
700c4bf9fb
8
main.c
8
main.c
@ -175,7 +175,7 @@ void report_lightbar_login(uint32_t tagCode) {
|
||||
LOG_I("Lightbar login report - payload: %s\n", payload);
|
||||
|
||||
// 发送MQTT消息
|
||||
mqtt_utils_publish(&mqtt_config, topic, 0, payload, strlen(payload));
|
||||
//mqtt_utils_publish(&mqtt_config, topic, 0, payload, strlen(payload));
|
||||
}
|
||||
|
||||
/*================================================================================*/
|
||||
@ -217,7 +217,7 @@ void report_lightbar_logout(uint32_t tagCode) {
|
||||
LOG_I("Lightbar logout report - payload: %s\n", payload);
|
||||
|
||||
// 发送MQTT消息
|
||||
mqtt_utils_publish(&mqtt_config, topic, 0, payload, strlen(payload));
|
||||
//mqtt_utils_publish(&mqtt_config, topic, 0, payload, strlen(payload));
|
||||
}
|
||||
|
||||
/*================================================================================*/
|
||||
@ -237,7 +237,7 @@ void update_lightbar_heartbeat(uint32_t tagCode) {
|
||||
time_t now = time(NULL);
|
||||
|
||||
if (found >= 0) {
|
||||
// 更新已存在灯条的心跳时间
|
||||
// 心跳丢失后心跳返回,更新已存在灯条的心跳时间
|
||||
lightbarHeartbeat[found].lastHeartbeat = now;
|
||||
if (!lightbarHeartbeat[found].isOnline) {
|
||||
lightbarHeartbeat[found].isOnline = true;
|
||||
@ -245,7 +245,7 @@ void update_lightbar_heartbeat(uint32_t tagCode) {
|
||||
report_lightbar_login(tagCode);
|
||||
}
|
||||
} else if (lightbarHeartbeatCount < MAX_LIGHTBAR_NUM) {
|
||||
// 添加新灯条
|
||||
// 新灯条心跳存储
|
||||
lightbarHeartbeat[lightbarHeartbeatCount].tagCode = tagCode;
|
||||
lightbarHeartbeat[lightbarHeartbeatCount].lastHeartbeat = now;
|
||||
lightbarHeartbeat[lightbarHeartbeatCount].isOnline = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user