forked from wled/WLED
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusermods_list.cpp
More file actions
489 lines (372 loc) · 11.1 KB
/
Copy pathusermods_list.cpp
File metadata and controls
489 lines (372 loc) · 11.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
#include "wled.h"
/*
* Register your v2 usermods here!
* (for v1 usermods using just usermod.cpp, you can ignore this file)
*/
/*
* Add/uncomment your usermod filename here (and once more below)
* || || ||
* \/ \/ \/
*/
//#include "../usermods/EXAMPLE_v2/usermod_v2_example.h"
#ifdef USERMOD_BATTERY
#include "../usermods/Battery/usermod_v2_Battery.h"
#endif
#ifdef USERMOD_DALLASTEMPERATURE
#include "../usermods/Temperature/usermod_temperature.h"
#endif
#ifdef USERMOD_SHT
#include "../usermods/sht/usermod_sht.h"
#endif
#ifdef USERMOD_SN_PHOTORESISTOR
#include "../usermods/SN_Photoresistor/usermod_sn_photoresistor.h"
#endif
#ifdef USERMOD_PWM_FAN
// requires DALLASTEMPERATURE or SHT included before it
#include "../usermods/PWM_fan/usermod_PWM_fan.h"
#endif
#ifdef USERMOD_BUZZER
#include "../usermods/buzzer/usermod_v2_buzzer.h"
#endif
#ifdef USERMOD_SENSORSTOMQTT
#include "../usermods/sensors_to_mqtt/usermod_v2_SensorsToMqtt.h"
#endif
#ifdef USERMOD_PIRSWITCH
#include "../usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h"
#endif
#ifdef USERMOD_BH1750
#include "../usermods/BH1750_v2/usermod_bh1750.h"
#endif
// BME280 v2 usermod. Define "USERMOD_BME280" in my_config.h
#ifdef USERMOD_BME280
#include "../usermods/BME280_v2/usermod_bme280.h"
#endif
#ifdef USERMOD_BME68X
#include "../usermods/BME68X_v2/usermod_bme68x.h"
#endif
#ifdef USERMOD_FOUR_LINE_DISPLAY
#include "../usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h"
#endif
#ifdef USERMOD_ROTARY_ENCODER_UI
#include "../usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h"
#endif
#ifdef USERMOD_AUTO_SAVE
#include "../usermods/usermod_v2_auto_save/usermod_v2_auto_save.h"
#endif
#ifdef USERMOD_DHT
#include "../usermods/DHT/usermod_dht.h"
#endif
#ifdef USERMOD_VL53L0X_GESTURES
#include "../usermods/VL53L0X_gestures/usermod_vl53l0x_gestures.h"
#endif
#ifdef USERMOD_ANIMATED_STAIRCASE
#include "../usermods/Animated_Staircase/Animated_Staircase.h"
#endif
#ifdef USERMOD_MULTI_RELAY
#include "../usermods/multi_relay/usermod_multi_relay.h"
#endif
#ifdef USERMOD_RTC
#include "../usermods/RTC/usermod_rtc.h"
#endif
#ifdef USERMOD_ELEKSTUBE_IPS
#include "../usermods/EleksTube_IPS/usermod_elekstube_ips.h"
#endif
#ifdef USERMOD_ROTARY_ENCODER_BRIGHTNESS_COLOR
#include "../usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.h"
#endif
#ifdef RGB_ROTARY_ENCODER
#include "../usermods/rgb-rotary-encoder/rgb-rotary-encoder.h"
#endif
#ifdef USERMOD_ST7789_DISPLAY
#include "../usermods/ST7789_display/ST7789_Display.h"
#endif
#ifdef USERMOD_PIXELS_DICE_TRAY
#include "../usermods/pixels_dice_tray/pixels_dice_tray.h"
#endif
#ifdef USERMOD_SEVEN_SEGMENT
#include "../usermods/seven_segment_display/usermod_v2_seven_segment_display.h"
#endif
#ifdef USERMOD_SSDR
#include "../usermods/seven_segment_display_reloaded/usermod_seven_segment_reloaded.h"
#endif
#ifdef USERMOD_CRONIXIE
#include "../usermods/Cronixie/usermod_cronixie.h"
#endif
#ifdef QUINLED_AN_PENTA
#include "../usermods/quinled-an-penta/quinled-an-penta.h"
#endif
#ifdef USERMOD_WIZLIGHTS
#include "../usermods/wizlights/wizlights.h"
#endif
#ifdef USERMOD_WIREGUARD
#include "../usermods/wireguard/wireguard.h"
#endif
#ifdef USERMOD_WORDCLOCK
#include "../usermods/usermod_v2_word_clock/usermod_v2_word_clock.h"
#endif
#ifdef USERMOD_MY9291
#include "../usermods/MY9291/usermode_MY9291.h"
#endif
#ifdef USERMOD_SI7021_MQTT_HA
#include "../usermods/Si7021_MQTT_HA/usermod_si7021_mqtt_ha.h"
#endif
#ifdef USERMOD_SMARTNEST
#include "../usermods/smartnest/usermod_smartnest.h"
#endif
#ifdef USERMOD_AUDIOREACTIVE
#include "../usermods/audioreactive/audio_reactive.h"
#endif
#ifdef USERMOD_ANALOG_CLOCK
#include "../usermods/Analog_Clock/Analog_Clock.h"
#endif
#ifdef USERMOD_PING_PONG_CLOCK
#include "../usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.h"
#endif
#ifdef USERMOD_ADS1115
#include "../usermods/ADS1115_v2/usermod_ads1115.h"
#endif
#ifdef USERMOD_KLIPPER_PERCENTAGE
#include "../usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.h"
#endif
#ifdef USERMOD_BOBLIGHT
#include "../usermods/boblight/boblight.h"
#endif
#ifdef USERMOD_ANIMARTRIX
#include "../usermods/usermod_v2_animartrix/usermod_v2_animartrix.h"
#endif
#ifdef USERMOD_INTERNAL_TEMPERATURE
#include "../usermods/Internal_Temperature_v2/usermod_internal_temperature.h"
#endif
#if defined(WLED_USE_SD_MMC) || defined(WLED_USE_SD_SPI)
// This include of SD.h and SD_MMC.h must happen here, else they won't be
// resolved correctly (when included in mod's header only)
#ifdef WLED_USE_SD_MMC
#include "SD_MMC.h"
#elif defined(WLED_USE_SD_SPI)
#include "SD.h"
#include "SPI.h"
#endif
#include "../usermods/sd_card/usermod_sd_card.h"
#endif
#ifdef USERMOD_PWM_OUTPUTS
#include "../usermods/pwm_outputs/usermod_pwm_outputs.h"
#endif
#ifdef USERMOD_HTTP_PULL_LIGHT_CONTROL
#include "../usermods/usermod_v2_HttpPullLightControl/usermod_v2_HttpPullLightControl.h"
#endif
#ifdef USERMOD_MPU6050_IMU
#include "../usermods/mpu6050_imu/usermod_mpu6050_imu.h"
#endif
#ifdef USERMOD_MPU6050_IMU
#include "../usermods/mpu6050_imu/usermod_gyro_surge.h"
#endif
#ifdef USERMOD_LDR_DUSK_DAWN
#include "../usermods/LDR_Dusk_Dawn_v2/usermod_LDR_Dusk_Dawn_v2.h"
#endif
#ifdef USERMOD_POV_DISPLAY
#include "../usermods/pov_display/usermod_pov_display.h"
#endif
#ifdef USERMOD_STAIRCASE_WIPE
#include "../usermods/stairway_wipe_basic/stairway-wipe-usermod-v2.h"
#endif
#ifdef USERMOD_MAX17048
#include "../usermods/MAX17048_v2/usermod_max17048.h"
#endif
#ifdef USERMOD_TETRISAI
#include "../usermods/TetrisAI_v2/usermod_v2_tetrisai.h"
#endif
#ifdef USERMOD_AHT10
#include "../usermods/AHT10_v2/usermod_aht10.h"
#endif
#ifdef USERMOD_INA226
#include "../usermods/INA226_v2/usermod_ina226.h"
#endif
#ifdef USERMOD_LD2410
#include "../usermods/LD2410_v2/usermod_ld2410.h"
#endif
#ifdef USERMOD_DEEP_SLEEP
#include "../usermods/deep_sleep/usermod_deep_sleep.h"
#endif
#ifdef USERMOD_USER_FX
#include "../usermods/user_fx/usermod_user_fx.h"
#endif
void registerUsermods()
{
/*
* Add your usermod class name here
* || || ||
* \/ \/ \/
*/
//UsermodManager::add(new MyExampleUsermod());
#ifdef USERMOD_BATTERY
UsermodManager::add(new UsermodBattery());
#endif
#ifdef USERMOD_DALLASTEMPERATURE
UsermodManager::add(new UsermodTemperature());
#endif
#ifdef USERMOD_SN_PHOTORESISTOR
UsermodManager::add(new Usermod_SN_Photoresistor());
#endif
#ifdef USERMOD_PWM_FAN
UsermodManager::add(new PWMFanUsermod());
#endif
#ifdef USERMOD_BUZZER
UsermodManager::add(new BuzzerUsermod());
#endif
#ifdef USERMOD_BH1750
UsermodManager::add(new Usermod_BH1750());
#endif
#ifdef USERMOD_BME280
UsermodManager::add(new UsermodBME280());
#endif
#ifdef USERMOD_BME68X
UsermodManager::add(new UsermodBME68X());
#endif
#ifdef USERMOD_SENSORSTOMQTT
UsermodManager::add(new UserMod_SensorsToMQTT());
#endif
#ifdef USERMOD_PIRSWITCH
UsermodManager::add(new PIRsensorSwitch());
#endif
#ifdef USERMOD_FOUR_LINE_DISPLAY
UsermodManager::add(new FourLineDisplayUsermod());
#endif
#ifdef USERMOD_ROTARY_ENCODER_UI
UsermodManager::add(new RotaryEncoderUIUsermod()); // can use USERMOD_FOUR_LINE_DISPLAY
#endif
#ifdef USERMOD_AUTO_SAVE
UsermodManager::add(new AutoSaveUsermod()); // can use USERMOD_FOUR_LINE_DISPLAY
#endif
#ifdef USERMOD_DHT
UsermodManager::add(new UsermodDHT());
#endif
#ifdef USERMOD_VL53L0X_GESTURES
UsermodManager::add(new UsermodVL53L0XGestures());
#endif
#ifdef USERMOD_ANIMATED_STAIRCASE
UsermodManager::add(new Animated_Staircase());
#endif
#ifdef USERMOD_MULTI_RELAY
UsermodManager::add(new MultiRelay());
#endif
#ifdef USERMOD_RTC
UsermodManager::add(new RTCUsermod());
#endif
#ifdef USERMOD_ELEKSTUBE_IPS
UsermodManager::add(new ElekstubeIPSUsermod());
#endif
#ifdef USERMOD_ROTARY_ENCODER_BRIGHTNESS_COLOR
UsermodManager::add(new RotaryEncoderBrightnessColor());
#endif
#ifdef RGB_ROTARY_ENCODER
UsermodManager::add(new RgbRotaryEncoderUsermod());
#endif
#ifdef USERMOD_ST7789_DISPLAY
UsermodManager::add(new St7789DisplayUsermod());
#endif
#ifdef USERMOD_PIXELS_DICE_TRAY
UsermodManager::add(new PixelsDiceTrayUsermod());
#endif
#ifdef USERMOD_SEVEN_SEGMENT
UsermodManager::add(new SevenSegmentDisplay());
#endif
#ifdef USERMOD_SSDR
UsermodManager::add(new UsermodSSDR());
#endif
#ifdef USERMOD_CRONIXIE
UsermodManager::add(new UsermodCronixie());
#endif
#ifdef QUINLED_AN_PENTA
UsermodManager::add(new QuinLEDAnPentaUsermod());
#endif
#ifdef USERMOD_WIZLIGHTS
UsermodManager::add(new WizLightsUsermod());
#endif
#ifdef USERMOD_WIREGUARD
UsermodManager::add(new WireguardUsermod());
#endif
#ifdef USERMOD_WORDCLOCK
UsermodManager::add(new WordClockUsermod());
#endif
#ifdef USERMOD_MY9291
UsermodManager::add(new MY9291Usermod());
#endif
#ifdef USERMOD_SI7021_MQTT_HA
UsermodManager::add(new Si7021_MQTT_HA());
#endif
#ifdef USERMOD_SMARTNEST
UsermodManager::add(new Smartnest());
#endif
#ifdef USERMOD_AUDIOREACTIVE
UsermodManager::add(new AudioReactive());
#endif
#ifdef USERMOD_ANALOG_CLOCK
UsermodManager::add(new AnalogClockUsermod());
#endif
#ifdef USERMOD_PING_PONG_CLOCK
UsermodManager::add(new PingPongClockUsermod());
#endif
#ifdef USERMOD_ADS1115
UsermodManager::add(new ADS1115Usermod());
#endif
#ifdef USERMOD_KLIPPER_PERCENTAGE
UsermodManager::add(new klipper_percentage());
#endif
#ifdef USERMOD_BOBLIGHT
UsermodManager::add(new BobLightUsermod());
#endif
#ifdef SD_ADAPTER
UsermodManager::add(new UsermodSdCard());
#endif
#ifdef USERMOD_PWM_OUTPUTS
UsermodManager::add(new PwmOutputsUsermod());
#endif
#ifdef USERMOD_SHT
UsermodManager::add(new ShtUsermod());
#endif
#ifdef USERMOD_ANIMARTRIX
UsermodManager::add(new AnimartrixUsermod("Animartrix", false));
#endif
#ifdef USERMOD_INTERNAL_TEMPERATURE
UsermodManager::add(new InternalTemperatureUsermod());
#endif
#ifdef USERMOD_HTTP_PULL_LIGHT_CONTROL
UsermodManager::add(new HttpPullLightControl());
#endif
#ifdef USERMOD_MPU6050_IMU
static MPU6050Driver mpu6050; UsermodManager::add(&mpu6050);
#endif
#ifdef USERMOD_GYRO_SURGE
static GyroSurge gyro_surge; UsermodManager::add(&gyro_surge);
#endif
#ifdef USERMOD_LDR_DUSK_DAWN
UsermodManager::add(new LDR_Dusk_Dawn_v2());
#endif
#ifdef USERMOD_STAIRCASE_WIPE
UsermodManager::add(new StairwayWipeUsermod());
#endif
#ifdef USERMOD_MAX17048
UsermodManager::add(new Usermod_MAX17048());
#endif
#ifdef USERMOD_TETRISAI
UsermodManager::add(new TetrisAIUsermod());
#endif
#ifdef USERMOD_AHT10
UsermodManager::add(new UsermodAHT10());
#endif
#ifdef USERMOD_INA226
UsermodManager::add(new UsermodINA226());
#endif
#ifdef USERMOD_LD2410
UsermodManager::add(new LD2410Usermod());
#endif
#ifdef USERMOD_POV_DISPLAY
UsermodManager::add(new PovDisplayUsermod());
#endif
#ifdef USERMOD_DEEP_SLEEP
usermods.add(new DeepSleepUsermod());
#endif
#ifdef USERMOD_USER_FX
UsermodManager::add(new UserFxUsermod());
#endif
}