diff --git a/src/configuration.h b/src/configuration.h index d263d9ae1..a31198346 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -561,5 +561,9 @@ along with this program. If not, see . #define HAS_SCREEN 0 #endif +#ifndef USE_ETHERNET_DEFAULT +#define USE_ETHERNET_DEFAULT 0 +#endif + #include "DebugConfiguration.h" #include "RF95Configuration.h" diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 8660aefae..868421516 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -961,6 +961,10 @@ void NodeDB::installDefaultConfig(bool preserveKey = false) config.network.wifi_enabled = USERPREFS_NETWORK_WIFI_ENABLED; #endif +#if USE_ETHERNET_DEFAULT + config.network.eth_enabled = true; +#endif + #ifdef USERPREFS_NETWORK_WIFI_SSID strncpy(config.network.wifi_ssid, USERPREFS_NETWORK_WIFI_SSID, sizeof(config.network.wifi_ssid)); #endif diff --git a/variants/esp32s3/ELECROW-ThinkNode-G3/variant.cpp b/variants/esp32s3/ELECROW-ThinkNode-G3/variant.cpp index 3fafba7a9..18f95e093 100644 --- a/variants/esp32s3/ELECROW-ThinkNode-G3/variant.cpp +++ b/variants/esp32s3/ELECROW-ThinkNode-G3/variant.cpp @@ -1,4 +1,4 @@ -#include "configuration.h" +#include "NodeDB.h" void variantDefaultConfig() { diff --git a/variants/esp32s3/ELECROW-ThinkNode-G3/variant.h b/variants/esp32s3/ELECROW-ThinkNode-G3/variant.h index c5afd574a..316763499 100644 --- a/variants/esp32s3/ELECROW-ThinkNode-G3/variant.h +++ b/variants/esp32s3/ELECROW-ThinkNode-G3/variant.h @@ -34,3 +34,5 @@ #define ETH_INT_PIN 10 #define ETH_RST_PIN 9 // #define ETH_ADDR 1 + +#define USE_ETHERNET_DEFAULT 1 \ No newline at end of file diff --git a/variants/esp32s3/ELECROW-ThinkNode-M7/variant.cpp b/variants/esp32s3/ELECROW-ThinkNode-M7/variant.cpp index 3fafba7a9..18f95e093 100644 --- a/variants/esp32s3/ELECROW-ThinkNode-M7/variant.cpp +++ b/variants/esp32s3/ELECROW-ThinkNode-M7/variant.cpp @@ -1,4 +1,4 @@ -#include "configuration.h" +#include "NodeDB.h" void variantDefaultConfig() { diff --git a/variants/esp32s3/ELECROW-ThinkNode-M7/variant.h b/variants/esp32s3/ELECROW-ThinkNode-M7/variant.h index 9724b20fa..da73bcd1e 100644 --- a/variants/esp32s3/ELECROW-ThinkNode-M7/variant.h +++ b/variants/esp32s3/ELECROW-ThinkNode-M7/variant.h @@ -41,3 +41,5 @@ #define ETH_CS_PIN 21 #define ETH_INT_PIN 45 // #define ETH_ADDR 1 + +#define USE_ETHERNET_DEFAULT 1 \ No newline at end of file