Commit 793734a6 authored by Eric Duminil's avatar Eric Duminil
Browse files

Moving preinit wifioff to util

parent 4e57a418
Pipeline #3643 passed with stage
in 1 minute and 49 seconds
...@@ -56,17 +56,6 @@ ...@@ -56,17 +56,6 @@
* and define your credentials and parameters in 'config.h'. * and define your credentials and parameters in 'config.h'.
*/ */
/*****************************************************************
* PreInit *
*****************************************************************/
void preinit() {
#if !defined(AMPEL_WIFI) && defined(ESP8266)
// WiFi would be initialized otherwise (on ESP8266), even if unused.
// see https://github.com/esp8266/Arduino/issues/2111#issuecomment-224251391
ESP8266WiFiClass::preinitWiFiOff();
#endif
}
/***************************************************************** /*****************************************************************
* Setup * * Setup *
*****************************************************************/ *****************************************************************/
...@@ -132,7 +121,6 @@ void checkSerialInput(); ...@@ -132,7 +121,6 @@ void checkSerialInput();
/***************************************************************** /*****************************************************************
* Main loop * * Main loop *
*****************************************************************/ *****************************************************************/
void loop() { void loop() {
#if defined(AMPEL_LORAWAN) && defined(ESP32) #if defined(AMPEL_LORAWAN) && defined(ESP32)
//LMIC Library seems to be very sensitive to timing issues, so run it first. //LMIC Library seems to be very sensitive to timing issues, so run it first.
......
...@@ -7,6 +7,13 @@ namespace config { ...@@ -7,6 +7,13 @@ namespace config {
#if defined(ESP8266) #if defined(ESP8266)
const char *current_board = "ESP8266"; const char *current_board = "ESP8266";
# if !defined(AMPEL_WIFI)
void preinit() {
// WiFi would be initialized otherwise (on ESP8266), even if unused.
// see https://github.com/esp8266/Arduino/issues/2111#issuecomment-224251391
ESP8266WiFiClass::preinitWiFiOff();
}
# endif
#elif defined(ESP32) #elif defined(ESP32)
const char *current_board = "ESP32"; const char *current_board = "ESP32";
#else #else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment