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