More idiomatic default ethernet that doesn't break the build

This commit is contained in:
Ben Meadors
2026-05-13 15:29:30 -05:00
parent 05e6a7e5eb
commit 23065a145e
6 changed files with 14 additions and 2 deletions
+4
View File
@@ -561,5 +561,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define HAS_SCREEN 0
#endif
#ifndef USE_ETHERNET_DEFAULT
#define USE_ETHERNET_DEFAULT 0
#endif
#include "DebugConfiguration.h"
#include "RF95Configuration.h"
+4
View File
@@ -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
@@ -1,4 +1,4 @@
#include "configuration.h"
#include "NodeDB.h"
void variantDefaultConfig()
{
@@ -34,3 +34,5 @@
#define ETH_INT_PIN 10
#define ETH_RST_PIN 9
// #define ETH_ADDR 1
#define USE_ETHERNET_DEFAULT 1
@@ -1,4 +1,4 @@
#include "configuration.h"
#include "NodeDB.h"
void variantDefaultConfig()
{
@@ -41,3 +41,5 @@
#define ETH_CS_PIN 21
#define ETH_INT_PIN 45
// #define ETH_ADDR 1
#define USE_ETHERNET_DEFAULT 1