remove unused varabiles
This commit is contained in:
@@ -189,7 +189,6 @@ void NukiNetwork::setupDevice()
|
|||||||
ETH_PHY_SPI_SCK_GENERIC_W5500,
|
ETH_PHY_SPI_SCK_GENERIC_W5500,
|
||||||
ETH_PHY_SPI_MISO_GENERIC_W5500,
|
ETH_PHY_SPI_MISO_GENERIC_W5500,
|
||||||
ETH_PHY_SPI_MOSI_GENERIC_W5500,
|
ETH_PHY_SPI_MOSI_GENERIC_W5500,
|
||||||
ETH_PHY_SPI_FREQ_MHZ,
|
|
||||||
ETH_PHY_W5500);
|
ETH_PHY_W5500);
|
||||||
break;
|
break;
|
||||||
case NetworkDeviceType::W5500M5:
|
case NetworkDeviceType::W5500M5:
|
||||||
@@ -201,7 +200,6 @@ void NukiNetwork::setupDevice()
|
|||||||
ETH_PHY_SPI_SCK_M5_W5500,
|
ETH_PHY_SPI_SCK_M5_W5500,
|
||||||
ETH_PHY_SPI_MISO_M5_W5500,
|
ETH_PHY_SPI_MISO_M5_W5500,
|
||||||
ETH_PHY_SPI_MOSI_M5_W5500,
|
ETH_PHY_SPI_MOSI_M5_W5500,
|
||||||
ETH_PHY_SPI_FREQ_MHZ,
|
|
||||||
ETH_PHY_W5500);
|
ETH_PHY_W5500);
|
||||||
break;
|
break;
|
||||||
case NetworkDeviceType::W5500M5S3:
|
case NetworkDeviceType::W5500M5S3:
|
||||||
@@ -213,7 +211,6 @@ void NukiNetwork::setupDevice()
|
|||||||
ETH_PHY_SPI_SCK_M5_W5500_S3,
|
ETH_PHY_SPI_SCK_M5_W5500_S3,
|
||||||
ETH_PHY_SPI_MISO_M5_W5500_S3,
|
ETH_PHY_SPI_MISO_M5_W5500_S3,
|
||||||
ETH_PHY_SPI_MOSI_M5_W5500_S3,
|
ETH_PHY_SPI_MOSI_M5_W5500_S3,
|
||||||
ETH_PHY_SPI_FREQ_MHZ,
|
|
||||||
ETH_PHY_W5500);
|
ETH_PHY_W5500);
|
||||||
break;
|
break;
|
||||||
case NetworkDeviceType::ETH01_Evo:
|
case NetworkDeviceType::ETH01_Evo:
|
||||||
@@ -225,7 +222,6 @@ void NukiNetwork::setupDevice()
|
|||||||
ETH_PHY_SPI_SCK_ETH01EVO,
|
ETH_PHY_SPI_SCK_ETH01EVO,
|
||||||
ETH_PHY_SPI_MISO_ETH01EVO,
|
ETH_PHY_SPI_MISO_ETH01EVO,
|
||||||
ETH_PHY_SPI_MOSI_ETH01EVO,
|
ETH_PHY_SPI_MOSI_ETH01EVO,
|
||||||
ETH_PHY_SPI_FREQ_MHZ,
|
|
||||||
ETH_PHY_TYPE_DM9051);
|
ETH_PHY_TYPE_DM9051);
|
||||||
break;
|
break;
|
||||||
case NetworkDeviceType::M5STACK_PoESP32_Unit:
|
case NetworkDeviceType::M5STACK_PoESP32_Unit:
|
||||||
@@ -237,7 +233,6 @@ void NukiNetwork::setupDevice()
|
|||||||
ETH_PHY_SPI_SCK_M5_W5500,
|
ETH_PHY_SPI_SCK_M5_W5500,
|
||||||
ETH_PHY_SPI_MISO_M5_W5500,
|
ETH_PHY_SPI_MISO_M5_W5500,
|
||||||
ETH_PHY_SPI_MOSI_M5_W5500,
|
ETH_PHY_SPI_MOSI_M5_W5500,
|
||||||
ETH_PHY_SPI_FREQ_MHZ,
|
|
||||||
ETH_PHY_W5500);
|
ETH_PHY_W5500);
|
||||||
break;
|
break;
|
||||||
case NetworkDeviceType::CUSTOM:
|
case NetworkDeviceType::CUSTOM:
|
||||||
@@ -277,7 +272,6 @@ void NukiNetwork::setupDevice()
|
|||||||
_preferences->getInt(preference_network_custom_sck, -1),
|
_preferences->getInt(preference_network_custom_sck, -1),
|
||||||
_preferences->getInt(preference_network_custom_miso, -1),
|
_preferences->getInt(preference_network_custom_miso, -1),
|
||||||
_preferences->getInt(preference_network_custom_mosi, -1),
|
_preferences->getInt(preference_network_custom_mosi, -1),
|
||||||
ETH_PHY_SPI_FREQ_MHZ,
|
|
||||||
custEthtype);
|
custEthtype);
|
||||||
}
|
}
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "../RestartReason.h"
|
#include "../RestartReason.h"
|
||||||
|
|
||||||
EthernetDevice::EthernetDevice(const String& hostname, Preferences* preferences, const IPConfiguration* ipConfiguration, const std::string& deviceName, uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_type_t ethtype, eth_clock_mode_t clock_mode, bool use_mac_from_efuse)
|
EthernetDevice::EthernetDevice(const String& hostname, Preferences* preferences, const IPConfiguration* ipConfiguration, const std::string& deviceName, uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_type_t ethtype, eth_clock_mode_t clock_mode)
|
||||||
: NetworkDevice(hostname, ipConfiguration),
|
: NetworkDevice(hostname, ipConfiguration),
|
||||||
_deviceName(deviceName),
|
_deviceName(deviceName),
|
||||||
_phy_addr(phy_addr),
|
_phy_addr(phy_addr),
|
||||||
@@ -16,7 +16,6 @@ EthernetDevice::EthernetDevice(const String& hostname, Preferences* preferences,
|
|||||||
_mdio(mdio),
|
_mdio(mdio),
|
||||||
_type(ethtype),
|
_type(ethtype),
|
||||||
_clock_mode(clock_mode),
|
_clock_mode(clock_mode),
|
||||||
_use_mac_from_efuse(use_mac_from_efuse),
|
|
||||||
_useSpi(false),
|
_useSpi(false),
|
||||||
_preferences(preferences)
|
_preferences(preferences)
|
||||||
{
|
{
|
||||||
@@ -34,7 +33,6 @@ EthernetDevice::EthernetDevice(const String &hostname,
|
|||||||
int spi_sck,
|
int spi_sck,
|
||||||
int spi_miso,
|
int spi_miso,
|
||||||
int spi_mosi,
|
int spi_mosi,
|
||||||
uint8_t spi_freq_mhz,
|
|
||||||
eth_phy_type_t ethtype)
|
eth_phy_type_t ethtype)
|
||||||
: NetworkDevice(hostname, ipConfiguration),
|
: NetworkDevice(hostname, ipConfiguration),
|
||||||
_deviceName(deviceName),
|
_deviceName(deviceName),
|
||||||
@@ -45,7 +43,6 @@ EthernetDevice::EthernetDevice(const String &hostname,
|
|||||||
_spi_sck(spi_sck),
|
_spi_sck(spi_sck),
|
||||||
_spi_miso(spi_miso),
|
_spi_miso(spi_miso),
|
||||||
_spi_mosi(spi_mosi),
|
_spi_mosi(spi_mosi),
|
||||||
_spi_freq_mhz(spi_freq_mhz),
|
|
||||||
_type(ethtype),
|
_type(ethtype),
|
||||||
_useSpi(true),
|
_useSpi(true),
|
||||||
_preferences(preferences)
|
_preferences(preferences)
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ public:
|
|||||||
int mdc = ETH_PHY_MDC_LAN8720,
|
int mdc = ETH_PHY_MDC_LAN8720,
|
||||||
int mdio = ETH_PHY_MDIO_LAN8720,
|
int mdio = ETH_PHY_MDIO_LAN8720,
|
||||||
eth_phy_type_t ethtype = ETH_PHY_TYPE_LAN8720,
|
eth_phy_type_t ethtype = ETH_PHY_TYPE_LAN8720,
|
||||||
eth_clock_mode_t clock_mode = ETH_CLK_MODE_LAN8720,
|
eth_clock_mode_t clock_mode = ETH_CLK_MODE_LAN8720);
|
||||||
bool use_mac_from_efuse = false);
|
|
||||||
|
|
||||||
EthernetDevice(const String& hostname,
|
EthernetDevice(const String& hostname,
|
||||||
Preferences* preferences,
|
Preferences* preferences,
|
||||||
@@ -42,7 +41,6 @@ public:
|
|||||||
int spi_sck,
|
int spi_sck,
|
||||||
int spi_miso,
|
int spi_miso,
|
||||||
int spi_mosi,
|
int spi_mosi,
|
||||||
uint8_t spi_freq_mhz,
|
|
||||||
eth_phy_type_t ethtype);
|
eth_phy_type_t ethtype);
|
||||||
|
|
||||||
const String deviceName() const override;
|
const String deviceName() const override;
|
||||||
@@ -66,12 +64,10 @@ private:
|
|||||||
|
|
||||||
void init();
|
void init();
|
||||||
void onDisconnected();
|
void onDisconnected();
|
||||||
void waitForIpAddressWithTimeout();
|
|
||||||
void onNetworkEvent(arduino_event_id_t event, arduino_event_info_t info);
|
void onNetworkEvent(arduino_event_id_t event, arduino_event_info_t info);
|
||||||
|
|
||||||
bool _connected = false;
|
bool _connected = false;
|
||||||
bool _restartOnDisconnect = false;
|
bool _restartOnDisconnect = false;
|
||||||
bool _startAp = false;
|
|
||||||
char* _path;
|
char* _path;
|
||||||
bool _hardwareInitialized = false;
|
bool _hardwareInitialized = false;
|
||||||
|
|
||||||
@@ -90,13 +86,11 @@ private:
|
|||||||
int _spi_sck;
|
int _spi_sck;
|
||||||
int _spi_miso;
|
int _spi_miso;
|
||||||
int _spi_mosi;
|
int _spi_mosi;
|
||||||
uint8_t _spi_freq_mhz;
|
|
||||||
|
|
||||||
int64_t _checkIpTs = -1;
|
int64_t _checkIpTs = -1;
|
||||||
|
|
||||||
eth_phy_type_t _type;
|
eth_phy_type_t _type;
|
||||||
eth_clock_mode_t _clock_mode;
|
eth_clock_mode_t _clock_mode;
|
||||||
bool _use_mac_from_efuse;
|
|
||||||
bool _useSpi = false;
|
bool _useSpi = false;
|
||||||
|
|
||||||
#ifndef NUKI_HUB_UPDATER
|
#ifndef NUKI_HUB_UPDATER
|
||||||
|
|||||||
Reference in New Issue
Block a user