mirror of
https://github.com/wled/WLED.git
synced 2025-04-19 12:27:17 +00:00
usermods: Fix MQTT checks
- Check after including wled.h - Use WLED_DISABLE_MQTT instead of WLED_ENABLE_MQTT
This commit is contained in:
parent
2b07be1d09
commit
44a1a1ebde
@ -1,13 +1,13 @@
|
||||
// force the compiler to show a warning to confirm that this file is included
|
||||
#warning **** Included USERMOD_BH1750 ****
|
||||
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
#include <BH1750.h>
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
// the max frequency to check photoresistor, 10 seconds
|
||||
#ifndef USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL
|
||||
#define USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL 10000
|
||||
|
@ -1,15 +1,15 @@
|
||||
// force the compiler to show a warning to confirm that this file is included
|
||||
#warning **** Included USERMOD_BME280 version 2.0 ****
|
||||
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
#include <Arduino.h>
|
||||
#include <BME280I2C.h> // BME280 sensor
|
||||
#include <EnvironmentCalculations.h> // BME280 extended measurements
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
class UsermodBME280 : public Usermod
|
||||
{
|
||||
private:
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "wled.h"
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
#include <Arduino.h>
|
||||
#include <U8x8lib.h> // from https://github.com/olikraus/u8g2/
|
||||
#include <DallasTemperature.h> //Dallastemperature sensor
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
//The SCL and SDA pins are defined here.
|
||||
//Lolin32 boards use SCL=5 SDA=4
|
||||
#define U8X8_PIN_SCL 5
|
||||
|
@ -1,13 +1,13 @@
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
#include <Arduino.h>
|
||||
#include <U8x8lib.h> // from https://github.com/olikraus/u8g2/
|
||||
#include <Wire.h>
|
||||
#include <BME280I2C.h> //BME280 sensor
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
void UpdateBME280Data();
|
||||
|
||||
#define Celsius // Show temperature measurement in Celsius otherwise is in Fahrenheit
|
||||
|
@ -1,12 +1,10 @@
|
||||
#warning **** Included USERMOD_LD2410 ****
|
||||
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
#include <ld2410.h>
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
class LD2410Usermod : public Usermod {
|
||||
|
||||
private:
|
||||
|
@ -1,7 +1,3 @@
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
// this is remixed from usermod_v2_SensorsToMqtt.h (sensors_to_mqtt usermod)
|
||||
// and usermod_multi_relay.h (multi_relay usermod)
|
||||
|
||||
@ -9,6 +5,10 @@
|
||||
#include <Adafruit_Si7021.h>
|
||||
#include <EnvironmentCalculations.h> // EnvironmentCalculations::HeatIndex(), ::DewPoint(), ::AbsoluteHumidity()
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
Adafruit_Si7021 si7021;
|
||||
|
||||
class Si7021_MQTT_HA : public Usermod
|
||||
|
@ -1,7 +1,7 @@
|
||||
#warning "This usermod is deprecated and no longer maintained. It will be removed in a future WLED release. Please use usermod multi_relay which has more features."
|
||||
|
||||
#include "wled.h"
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_Sensor.h>
|
||||
@ -9,6 +5,10 @@
|
||||
#include <Adafruit_CCS811.h>
|
||||
#include <Adafruit_Si7021.h>
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
Adafruit_BMP280 bmp;
|
||||
Adafruit_Si7021 si7021;
|
||||
Adafruit_CCS811 ccs811;
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#include "wled.h"
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
|
||||
class SevenSegmentDisplay : public Usermod
|
||||
{
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#include "wled.h"
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
|
||||
class UsermodSSDR : public Usermod {
|
||||
|
||||
//#define REFRESHTIME 497
|
||||
|
@ -1,9 +1,10 @@
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#include "wled.h"
|
||||
#include "SHT85.h"
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "SHT85.h"
|
||||
|
||||
#define USERMOD_SHT_TYPE_SHT30 0
|
||||
#define USERMOD_SHT_TYPE_SHT31 1
|
||||
#define USERMOD_SHT_TYPE_SHT35 2
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef WLED_ENABLE_MQTT
|
||||
#include "wled.h"
|
||||
|
||||
#ifdef WLED_DISABLE_MQTT
|
||||
#error "This user mod requires MQTT to be enabled."
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
|
||||
class Smartnest : public Usermod
|
||||
{
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user