mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-04 03:18:10 +10:00
More idiomatic default ethernet that doesn't break the build
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user