1
0

Refactor MqttVerticle and GPS implementations: add stop method, update GPS serial handling, and improve WiFi connection logic with LED feedback

This commit is contained in:
Jose
2025-05-08 07:24:28 +02:00
parent 383202709e
commit 5665cb3e5e
8 changed files with 98 additions and 31 deletions

View File

@@ -1,14 +1,12 @@
#include "main.hpp"
#define DEBUG
const uint32_t DEVICE_ID = getChipID();
const char ALL_VEHICLES[] = "Todo tipo de vehiculos";
const char ELECTRIC_VEHICLES[] = "Solo vehiculos electricos/hibridos";
const char* currentMessage = nullptr;
TaskTimer matrixTimer{0, 25};
TaskTimer globalTimer{0, 30000};
TaskTimer globalTimer{0, 60000};
extern HTTPClient httpClient;
extern MD_Parola display;
@@ -23,6 +21,9 @@ void setup()
Serial.begin(115200);
Serial.println("Iniciando...");
setupWifi();
BME280_Init();
Serial.println("Sensor BME280 inicializado");
GPS_Init();
@@ -51,9 +52,13 @@ void loop()
readBME280();
readGPS();
readMQ7();
#ifdef DEBUG
printAllData();
#endif
globalTimer.lastRun = now;
}
}