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:
Will Miles
2025-01-31 23:59:37 +00:00
parent b3f9983f44
commit 7a40ef74c6
13 changed files with 220 additions and 195 deletions

View File

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