Skip to content

Commit

Permalink
Fix ESP8266 compilation error when native Ethernet was enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Apr 6, 2024
1 parent 5081b29 commit c1bfb2d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "FirebaseClient",
"version": "1.0.8",
"version": "1.0.9",
"keywords": "communication, REST, esp32, esp8266, arduino",
"description": "Async Firebase Client library for Arduino.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=FirebaseClient

version=1.0.8
version=1.0.9

author=Mobizt

Expand Down
2 changes: 1 addition & 1 deletion src/FirebaseClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#undef FIREBASE_CLIENT_VERSION
#endif

#define FIREBASE_CLIENT_VERSION "1.0.8"
#define FIREBASE_CLIENT_VERSION "1.0.9"

#include <Arduino.h>
#include "./core/FirebaseApp.h"
Expand Down
20 changes: 10 additions & 10 deletions src/core/NetConfig.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Created March 13, 2024
* Created April 6, 2024
*
* The MIT License (MIT)
* Copyright (c) 2024 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -85,7 +85,7 @@ struct network_config_data
}
};
#endif
#if defined(FIREBASE_ETHERNET_MODULE_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
#if defined(FIREBASE_ETH_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
struct ethernet_data
{
int ethernet_reset_pin = -1;
Expand Down Expand Up @@ -117,9 +117,9 @@ struct network_config_data
#if defined(FIREBASE_GSM_MODEM_IS_AVAILABLE) && defined(ENABLE_GSM_NETWORK)
gsm_data gsm;
#endif
#if defined(FIREBASE_ETHERNET_MODULE_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
#if defined(FIREBASE_ETH_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
ethernet_data ethernet;
SPI_ETH_Module *eth = NULL;
Firebase_SPI_ETH_Module *eth = NULL;
#endif
bool initialized = false;
bool network_status = false;
Expand All @@ -146,15 +146,15 @@ struct network_config_data
gsm.copy(rhs.gsm);
#endif

#if defined(FIREBASE_ETHERNET_MODULE_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
#if defined(FIREBASE_ETH_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
ethernet.copy(rhs.ethernet);
#endif

this->initialized = rhs.initialized;
this->network_status = rhs.network_status;
this->reconnect = rhs.reconnect;
this->wifi = rhs.wifi;
#if defined(FIREBASE_ETHERNET_MODULE_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
#if defined(FIREBASE_ETH_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
this->eth = rhs.eth;
#endif
this->net_timer = rhs.net_timer;
Expand All @@ -167,15 +167,15 @@ struct network_config_data
#if defined(FIREBASE_GSM_MODEM_IS_AVAILABLE) && defined(ENABLE_GSM_NETWORK)
gsm.clear();
#endif
#if defined(FIREBASE_ETHERNET_MODULE_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
#if defined(FIREBASE_ETH_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
ethernet.clear();
#endif
network_data_type = firebase_network_data_undefined;
initialized = false;
network_status = false;
reconnect = true;
wifi = nullptr;
#if defined(FIREBASE_ETHERNET_MODULE_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
#if defined(FIREBASE_ETH_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
eth = NULL;
#endif
net_timer.stop();
Expand Down Expand Up @@ -241,7 +241,7 @@ class GSMNetwork : public DefaultNetwork
};
#endif

#if defined(FIREBASE_ETHERNET_MODULE_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
#if defined(FIREBASE_ETH_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
class EthernetNetwork : public DefaultNetwork
{

Expand All @@ -267,7 +267,7 @@ class DefaultEthernetNetwork : public DefaultNetwork
DefaultEthernetNetwork(Firebase_SPI_ETH_Module &eth)
{
init();
#if defined(FIREBASE_ETHERNET_MODULE_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
#if defined(FIREBASE_ETH_IS_AVAILABLE) && defined(ENABLE_ETHERNET_NETWORK)
network_data.eth = &eth;
#endif
network_data.network_data_type = firebase_network_data_default_network;
Expand Down

0 comments on commit c1bfb2d

Please sign in to comment.