diff --git a/ESP-IDF_Robot/main/mqtt.c b/ESP-IDF_Robot/main/mqtt.c index d21919530..c933270a9 100644 --- a/ESP-IDF_Robot/main/mqtt.c +++ b/ESP-IDF_Robot/main/mqtt.c @@ -30,8 +30,8 @@ static void mqtt_publish_task(void *arg) { } } -void mqtt_publish_temp (float temp) { - esp_mqtt_client_handle_t client = (esp_mqtt_client_handle_t); +void mqtt_publish_temp (void *arg, float temp) { + esp_mqtt_client_handle_t client = (esp_mqtt_client_handle_t)arg; 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);_