Skip to content

Commit

Permalink
Correct merge of wifi persistence code, make 2.x builds platformio co…
Browse files Browse the repository at this point in the history
…mpatible
  • Loading branch information
easytarget committed Sep 25, 2020
1 parent a002d46 commit 14133af
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions esp32-cam-webserver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ void setup() {

// We need a working Wifi before we can start the http handlers
Serial.println("Starting WiFi");

#if defined(WIFI_AP_ENABLE)
WifiSetup();
#else
Expand Down Expand Up @@ -404,30 +403,6 @@ void setup() {
}
}

// Notification LED
void flashLED(int flashtime) {
#ifdef LED_PIN // If we have it; flash it.
digitalWrite(LED_PIN, LED_ON); // On at full power.
delay(flashtime); // delay
digitalWrite(LED_PIN, LED_OFF); // turn Off
#else
return; // No notifcation LED, do nothing, no delay
#endif
}

// Lamp Control
void setLamp(int newVal) {
if (newVal != -1) {
// Apply a logarithmic function to the scale.
int brightness = round((pow(2,(1+(newVal*0.02)))-2)/6*pwmMax);
ledcWrite(lampChannel, brightness);
Serial.print("Lamp: ");
Serial.print(newVal);
Serial.print("%, pwm = ");
Serial.println(brightness);
}
}

void loop() {
// Just loop forever, reconnecting Wifi As necesscary.
// The stream and URI handler processes initiated by the startCameraServer() call at the
Expand Down

0 comments on commit 14133af

Please sign in to comment.