Fix SSDR usermod if SN_Photoresistor mod is not included

This commit is contained in:
cschwinne 2022-02-10 19:48:13 +01:00
parent 83416ee2e0
commit b211d8b085

View File

@ -86,7 +86,7 @@ private:
static const char _str_minBrightness[]; static const char _str_minBrightness[];
static const char _str_maxBrightness[]; static const char _str_maxBrightness[];
#ifdef USERMOD_ID_SN_PHOTORESISTOR #ifdef USERMOD_SN_PHOTORESISTOR
Usermod_SN_Photoresistor *ptr; Usermod_SN_Photoresistor *ptr;
#else #else
void* ptr = nullptr; void* ptr = nullptr;
@ -371,7 +371,7 @@ public:
} }
_setAllFalse(); _setAllFalse();
#ifdef USERMOD_ID_SN_PHOTORESISTOR #ifdef USERMOD_SN_PHOTORESISTOR
ptr = (Usermod_SN_Photoresistor*) usermods.lookup(USERMOD_ID_SN_PHOTORESISTOR); ptr = (Usermod_SN_Photoresistor*) usermods.lookup(USERMOD_ID_SN_PHOTORESISTOR);
#endif #endif
DEBUG_PRINTLN(F("Setup done")); DEBUG_PRINTLN(F("Setup done"));