From f333f867c5d338f60550e4e39d51374586bae8ad Mon Sep 17 00:00:00 2001 From: k7bbr Date: Sat, 20 Feb 2021 01:54:54 -0700 Subject: [PATCH] Updated platformio.ini to reference esp32_eth env change default ethernet type to none add macro option to change default eth board at compile time --- platformio.ini | 8 ++++---- wled00/wled.h | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/platformio.ini b/platformio.ini index 113216fb..4c78f09a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ # ------------------------------------------------------------------------------ # Travis CI binaries (comment this out with a ';' when building for your own board) -; default_envs = travis_esp8266, travis_esp32 +default_envs = travis_esp8266, travis_esp32 # Release binaries ; default_envs = nodemcuv2, esp01_1m_full, esp32dev, custom_WS2801, custom_APA102, custom_LEDPIN_16, custom_LEDPIN_4, custom_LEDPIN_3, custom32_LEDPIN_16, custom32_APA102 @@ -30,7 +30,7 @@ ; default_envs = d1_mini_5CH_Shojo_PCB ; default_envs = wemos_shield_esp32 ; default_envs = m5atom -default_envs = esp32_poe +; default_envs = esp32_eth src_dir = ./wled00 data_dir = ./wled00/data @@ -279,12 +279,12 @@ lib_ignore = ESPAsyncTCP ESPAsyncUDP -[env:esp32_poe] +[env:esp32_eth] board = esp32-poe platform = espressif32@2.0 upload_speed = 921600 build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 +build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 lib_ignore = ESPAsyncTCP ESPAsyncUDP diff --git a/wled00/wled.h b/wled00/wled.h index b4a8a87f..29780a22 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -205,7 +205,11 @@ WLED_GLOBAL IPAddress staticGateway _INIT_N((( 0, 0, 0, 0))); // gateway (r WLED_GLOBAL IPAddress staticSubnet _INIT_N(((255, 255, 255, 0))); // most common subnet in home networks WLED_GLOBAL bool noWifiSleep _INIT(false); // disabling modem sleep modes will increase heat output and power usage, but may help with connection issues #ifdef WLED_USE_ETHERNET -WLED_GLOBAL int ethernetType _INIT(WLED_ETH_ESP32_POE); // ethernet board type + #ifdef WLED_ETH_DEFAULT // use none for ethernet board type if default not defined + WLED_GLOBAL int ethernetType _INIT(WLED_ETH_DEFAULT); // ethernet board type + #else + WLED_GLOBAL int ethernetType _INIT(WLED_ETH_NONE); //default ethernet board type if specified + #endif #endif // LED CONFIG