mirror of
https://github.com/wled/WLED.git
synced 2025-07-24 03:06:36 +00:00
Convert usermods from header to library
This commit is contained in:
parent
a5575bc3a0
commit
6e76a72d78
@ -252,4 +252,7 @@ class ADS1115Usermod : public Usermod {
|
||||
int16_t results = ads.getLastConversionResults();
|
||||
readings[activeChannel] = ads.computeVolts(results);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
static ADS1115Usermod ads1115_v2;
|
||||
REGISTER_USERMOD(ads1115_v2);
|
9
usermods/ADS1115_v2/library.json
Normal file
9
usermods/ADS1115_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "ADS1115_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -324,4 +324,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
const char UsermodAHT10::_name[] PROGMEM = "AHTxx";
|
||||
const char UsermodAHT10::_name[] PROGMEM = "AHTxx";
|
||||
|
||||
static UsermodAHT10 aht10_v2;
|
||||
REGISTER_USERMOD(aht10_v2);
|
9
usermods/AHT10_v2/library.json
Normal file
9
usermods/AHT10_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "AHT10_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -250,3 +250,7 @@ const char Usermod_BH1750::_maxReadInterval[] PROGMEM = "max-read-interval-ms";
|
||||
const char Usermod_BH1750::_minReadInterval[] PROGMEM = "min-read-interval-ms";
|
||||
const char Usermod_BH1750::_HomeAssistantDiscovery[] PROGMEM = "HomeAssistantDiscoveryLux";
|
||||
const char Usermod_BH1750::_offset[] PROGMEM = "offset-lx";
|
||||
|
||||
|
||||
static Usermod_BH1750 bh1750_v2;
|
||||
REGISTER_USERMOD(bh1750_v2);
|
9
usermods/BH1750_v2/library.json
Normal file
9
usermods/BH1750_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "BH1750_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -479,3 +479,7 @@ public:
|
||||
|
||||
const char UsermodBME280::_name[] PROGMEM = "BME280/BMP280";
|
||||
const char UsermodBME280::_enabled[] PROGMEM = "enabled";
|
||||
|
||||
|
||||
static UsermodBME280 bme280_v2;
|
||||
REGISTER_USERMOD(bme280_v2);
|
9
usermods/BME280_v2/library.json
Normal file
9
usermods/BME280_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "BME280_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -1112,3 +1112,7 @@ void UsermodBME68X::saveState() {
|
||||
if (WLED_MQTT_CONNECTED) mqtt->publish(charbuffer, 0, false, contbuffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static UsermodBME68X bme68x_v2;
|
||||
REGISTER_USERMOD(bme68x_v2);
|
9
usermods/BME68X_v2/library.json
Normal file
9
usermods/BME68X_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "BME68X_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -554,3 +554,7 @@ public:
|
||||
};
|
||||
|
||||
const char UsermodINA226::_name[] PROGMEM = "INA226";
|
||||
|
||||
|
||||
static UsermodINA226 ina226_v2;
|
||||
REGISTER_USERMOD(ina226_v2);
|
9
usermods/INA226_v2/library.json
Normal file
9
usermods/INA226_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "INA226_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -193,4 +193,7 @@ void InternalTemperatureUsermod::publishMqtt(const char *state, bool retain)
|
||||
mqtt->publish(subuf, 0, retain, state);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static InternalTemperatureUsermod internal_temperature_v2;
|
||||
REGISTER_USERMOD(internal_temperature_v2);
|
9
usermods/Internal_Temperature_v2/library.json
Normal file
9
usermods/Internal_Temperature_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "Internal_Temperature_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -235,3 +235,7 @@ void LD2410Usermod::publishMqtt(const char* topic, const char* state, bool retai
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static LD2410Usermod ld2410_v2;
|
||||
REGISTER_USERMOD(ld2410_v2);
|
9
usermods/LD2410_v2/library.json
Normal file
9
usermods/LD2410_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "LD2410_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -279,3 +279,7 @@ const char Usermod_MAX17048::_enabled[] PROGMEM = "enabled";
|
||||
const char Usermod_MAX17048::_maxReadInterval[] PROGMEM = "max-read-interval-ms";
|
||||
const char Usermod_MAX17048::_minReadInterval[] PROGMEM = "min-read-interval-ms";
|
||||
const char Usermod_MAX17048::_HomeAssistantDiscovery[] PROGMEM = "HomeAssistantDiscovery";
|
||||
|
||||
|
||||
static Usermod_MAX17048 max17048_v2;
|
||||
REGISTER_USERMOD(max17048_v2);
|
9
usermods/MAX17048_v2/library.json
Normal file
9
usermods/MAX17048_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "MAX17048_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -42,4 +42,7 @@ class MY9291Usermod : public Usermod {
|
||||
uint16_t getId() {
|
||||
return USERMOD_ID_MY9291;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
static MY9291Usermod my9291;
|
||||
REGISTER_USERMOD(my9291);
|
9
usermods/MY9291/library.json
Normal file
9
usermods/MY9291/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "MY9291",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -250,3 +250,7 @@ public:
|
||||
return USERMOD_ID_TETRISAI;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static TetrisAIUsermod tetrisai_v2;
|
||||
REGISTER_USERMOD(tetrisai_v2);
|
9
usermods/TetrisAI_v2/library.json
Normal file
9
usermods/TetrisAI_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "TetrisAI_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
9
usermods/mqtt_switch_v2/library.json
Normal file
9
usermods/mqtt_switch_v2/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "mqtt_switch_v2",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -157,3 +157,7 @@ inline void UsermodMqttSwitch::updateState(uint8_t pinNr)
|
||||
mqtt->publish(buf, 0, false, "OFF");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static UsermodMqttSwitc mqtt_switch_v2;
|
||||
REGISTER_USERMOD(mqtt_switch_v2);
|
9
usermods/sensors_to_mqtt/library.json
Normal file
9
usermods/sensors_to_mqtt/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "sensors_to_mqtt",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -276,3 +276,7 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static UserMod_SensorsToMQTT sensors_to_mqtt;
|
||||
REGISTER_USERMOD(sensors_to_mqtt);
|
9
usermods/seven_segment_display_reloaded/library.json
Normal file
9
usermods/seven_segment_display_reloaded/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "seven_segment_display_reloaded",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -571,3 +571,7 @@ const char UsermodSSDR::_str_years[] PROGMEM = "LED-Numbers-Year";
|
||||
const char UsermodSSDR::_str_ldrEnabled[] PROGMEM = "enable-auto-brightness";
|
||||
const char UsermodSSDR::_str_minBrightness[] PROGMEM = "auto-brightness-min";
|
||||
const char UsermodSSDR::_str_maxBrightness[] PROGMEM = "auto-brightness-max";
|
||||
|
||||
|
||||
static UsermodSSDR seven_segment_display_reloaded;
|
||||
REGISTER_USERMOD(seven_segment_display_reloaded);
|
9
usermods/stairway_wipe_basic/library.json
Normal file
9
usermods/stairway_wipe_basic/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "stairway_wipe_basic",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -126,3 +126,7 @@ void setup() {
|
||||
//More methods can be added in the future, this example will then be extended.
|
||||
//Your usermod will remain compatible as it does not need to implement all methods from the Usermod base class!
|
||||
};
|
||||
|
||||
|
||||
static StairwayWipeUsermod stairway_wipe_basic;
|
||||
REGISTER_USERMOD(stairway_wipe_basic);
|
9
usermods/word-clock-matrix/library.json
Normal file
9
usermods/word-clock-matrix/library.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name:": "word-clock-matrix",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
}
|
||||
}
|
@ -336,3 +336,7 @@ public:
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
static WordClockMatrix word-clock-matrix;
|
||||
REGISTER_USERMOD(word-clock-matrix);
|
Loading…
x
Reference in New Issue
Block a user