Add ESP32 WiFi interface (#11209)
This commit is contained in:
committed by
Scott Lahteine
parent
c03df89921
commit
0278ad0a6d
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
#if ENABLED(OTASUPPORT)
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <ESPmDNS.h>
|
||||
@@ -30,15 +30,6 @@
|
||||
#include "driver/timer.h"
|
||||
|
||||
void OTA_init() {
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin(WIFI_SSID, WIFI_PWD);
|
||||
|
||||
while (WiFi.waitForConnectResult() != WL_CONNECTED) {
|
||||
Serial.println("Connection Failed! Rebooting...");
|
||||
delay(5000);
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
ArduinoOTA
|
||||
.onStart([]() {
|
||||
timer_pause(TIMER_GROUP_0, TIMER_0);
|
||||
@@ -76,6 +67,6 @@ void OTA_handle() {
|
||||
ArduinoOTA.handle();
|
||||
}
|
||||
|
||||
#endif // WIFISUPPORT
|
||||
#endif // OTASUPPORT
|
||||
|
||||
#endif // ARDUINO_ARCH_ESP32
|
||||
|
||||
Reference in New Issue
Block a user