This commit is contained in:
2025-10-07 00:37:51 -04:00
parent e8a9c97ca9
commit e8120b9bea
2 changed files with 8 additions and 3 deletions

View File

@@ -13,7 +13,9 @@
#include "mqtt_client.h"
#include "mqttronix.h"
//static const char* MQTT_TAG = "MQTTronix";
static float temp_value = 0.0f;
static float battery_voltage = 0.0f;
static float sys_current = 0.0f;
static void mqtt_publish_task(void *arg) {
esp_mqtt_client_handle_t client = (esp_mqtt_client_handle_t)arg;
@@ -75,4 +77,6 @@ void mqttronix_start(void) {
esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg);
esp_mqtt_client_register_event(client, ESP_EVENT_ANY_ID, mqtt_event_handler, NULL);
esp_mqtt_client_start(client);
}
}
void mqttronix_update_temp (float temp) { temp_value = temp; }