Fix sensor usermod globals

These can be static locals instead; allows these usermods to build and
link together.
pull/4480/head
Will Miles 2025-02-06 22:26:45 -05:00
rodzic e6910f732f
commit c57be77039
3 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -9,7 +9,7 @@
#error "This user mod requires MQTT to be enabled."
#endif
Adafruit_Si7021 si7021;
static Adafruit_Si7021 si7021;
class Si7021_MQTT_HA : public Usermod
{

Wyświetl plik

@ -1,6 +1,7 @@
{
"name:": "Si7021_MQTT_HA",
"dependencies": {
"finitespace/BME280":"3.0.0"
"finitespace/BME280":"3.0.0",
"adafruit/Adafruit Si7021 Library" : "1.5.3"
}
}

Wyświetl plik

@ -9,9 +9,9 @@
#error "This user mod requires MQTT to be enabled."
#endif
Adafruit_BMP280 bmp;
Adafruit_Si7021 si7021;
Adafruit_CCS811 ccs811;
static Adafruit_BMP280 bmp;
static Adafruit_Si7021 si7021;
static Adafruit_CCS811 ccs811;
class UserMod_SensorsToMQTT : public Usermod
{