mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 14:20:51 +00:00
ESPNOW + WiFi
This commit is contained in:
@@ -30,8 +30,8 @@ static void mqtt_publish_task(void *arg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mqtt_publish_temp (float temp) {
|
void mqtt_publish_temp (void *arg, float temp) {
|
||||||
esp_mqtt_client_handle_t client = (esp_mqtt_client_handle_t);
|
esp_mqtt_client_handle_t client = (esp_mqtt_client_handle_t)arg;
|
||||||
char temp_str[6];
|
char temp_str[6];
|
||||||
snprintf(temp_str, sizeof(temp_str), "%.02f", temp);
|
snprintf(temp_str, sizeof(temp_str), "%.02f", temp);
|
||||||
esp_mqtt_client_publish(mqtt_client, "/bitrider/temp", temp_str, 0, 1, 0);_
|
esp_mqtt_client_publish(mqtt_client, "/bitrider/temp", temp_str, 0, 1, 0);_
|
||||||
|
Reference in New Issue
Block a user