Fix sensor usermod globals

These can be static locals instead; allows these usermods to build and
link together.
This commit is contained in:
Will Miles 2025-02-06 22:26:45 -05:00
parent e6910f732f
commit c57be77039
3 changed files with 6 additions and 5 deletions

View File

@ -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
{

View File

@ -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"
}
}

View File

@ -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
{