main/task_mqtt.c

changeset 24
64078aa15512
parent 23
58a328e91881
child 28
6d825e2962e4
equal deleted inserted replaced
23:58a328e91881 24:64078aa15512
207 xSemaphoreGive(xSemaphoreDS18B20); 207 xSemaphoreGive(xSemaphoreDS18B20);
208 } else { 208 } else {
209 ESP_LOGE(TAG, "publishNode() lock DS18B20 error"); 209 ESP_LOGE(TAG, "publishNode() lock DS18B20 error");
210 } 210 }
211 211
212 if (xSemaphoreTake(xSemaphoreWiFi, 10) == pdTRUE) { 212 if (xSemaphoreTake(xSemaphoreWiFi, 25) == pdTRUE) {
213 payload = xstrcat(payload, (char *)",\"net\":{\"address\":\""); 213 payload = xstrcat(payload, (char *)",\"net\":{\"address\":\"");
214 payload = xstrcat(payload, wifi_state->STA_ip); 214 payload = xstrcat(payload, wifi_state->STA_ip);
215 payload = xstrcat(payload, (char *)"\",\"ifname\":\"sta\",\"rssi\":"); 215 payload = xstrcat(payload, (char *)"\",\"ifname\":\"sta\",\"rssi\":");
216 sprintf(buf, "%d", wifi_state->STA_rssi); 216 sprintf(buf, "%d", wifi_state->STA_rssi);
217 payload = xstrcat(payload, buf); 217 payload = xstrcat(payload, buf);

mercurial