Skip to content

Commit 88d07a9

Browse files
committed
Fix compiling on modules with no LAMP_PIN (easytarget#138)
1 parent fb2fc1b commit 88d07a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

esp32-cam-webserver.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,9 @@ void setup() {
649649
ledcSetup(lampChannel, pwmfreq, pwmresolution); // configure LED PWM channel
650650
if (autoLamp) setLamp(0); // set default value
651651
else setLamp(lampVal);
652-
ledcAttachPin(LAMP_PIN, lampChannel); // attach the GPIO pin to the channel
652+
#if defined(LAMP_PIN)
653+
ledcAttachPin(LAMP_PIN, lampChannel); // attach the GPIO pin to the channel
654+
#endif
653655
} else {
654656
Serial.println("No lamp, or lamp disabled in config");
655657
}

0 commit comments

Comments
 (0)