Fix up PWM_fan
Use a custom setup script to check for the dependencies and pass along the required compile flags to the module; also split the object definitions for the target modules from their source so as to allow #including them.
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
#if !defined(USERMOD_DALLASTEMPERATURE) && !defined(USERMOD_SHT)
|
||||
#include "wled.h"
|
||||
|
||||
#if defined(USERMOD_DALLASTEMPERATURE)
|
||||
#include "UsermodTemperature.h"
|
||||
#elif defined(USERMOD_SHT)
|
||||
#include "ShtUsermod.h"
|
||||
#else
|
||||
#error The "PWM fan" usermod requires "Dallas Temeprature" or "SHT" usermod to function properly.
|
||||
#endif
|
||||
|
||||
#include "wled.h"
|
||||
|
||||
|
||||
// PWM & tacho code curtesy of @KlausMu
|
||||
// https://github.com/KlausMu/esp32-fan-controller/tree/main/src
|
||||
|
||||
Reference in New Issue
Block a user