Skip to content

Commit 14133af

Browse files
committed
Correct merge of wifi persistence code, make 2.x builds platformio compatible
1 parent a002d46 commit 14133af

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

esp32-cam-webserver.ino

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ void setup() {
364364

365365
// We need a working Wifi before we can start the http handlers
366366
Serial.println("Starting WiFi");
367-
368367
#if defined(WIFI_AP_ENABLE)
369368
WifiSetup();
370369
#else
@@ -404,30 +403,6 @@ void setup() {
404403
}
405404
}
406405

407-
// Notification LED
408-
void flashLED(int flashtime) {
409-
#ifdef LED_PIN // If we have it; flash it.
410-
digitalWrite(LED_PIN, LED_ON); // On at full power.
411-
delay(flashtime); // delay
412-
digitalWrite(LED_PIN, LED_OFF); // turn Off
413-
#else
414-
return; // No notifcation LED, do nothing, no delay
415-
#endif
416-
}
417-
418-
// Lamp Control
419-
void setLamp(int newVal) {
420-
if (newVal != -1) {
421-
// Apply a logarithmic function to the scale.
422-
int brightness = round((pow(2,(1+(newVal*0.02)))-2)/6*pwmMax);
423-
ledcWrite(lampChannel, brightness);
424-
Serial.print("Lamp: ");
425-
Serial.print(newVal);
426-
Serial.print("%, pwm = ");
427-
Serial.println(brightness);
428-
}
429-
}
430-
431406
void loop() {
432407
// Just loop forever, reconnecting Wifi As necesscary.
433408
// The stream and URI handler processes initiated by the startCameraServer() call at the

0 commit comments

Comments
 (0)