diff --git a/src/helpers/esp32/TEthEliteBoard_SX1262.h b/src/helpers/esp32/TEthEliteBoard_SX1262.h index 2105aa2d..54568025 100644 --- a/src/helpers/esp32/TEthEliteBoard_SX1262.h +++ b/src/helpers/esp32/TEthEliteBoard_SX1262.h @@ -34,7 +34,7 @@ #define PIN_GPS_EN -1 // Analog button -#define PIN_USER_BTN_ANA 7 +// #define PIN_USER_BTN_ANA 7 // Include headers AFTER pin definitions so ESP32Board::sleep() can use P_LORA_DIO_1 #include diff --git a/src/helpers/esp32/TEthEliteBoard_SX1276.h b/src/helpers/esp32/TEthEliteBoard_SX1276.h index a18d7625..a6d77701 100644 --- a/src/helpers/esp32/TEthEliteBoard_SX1276.h +++ b/src/helpers/esp32/TEthEliteBoard_SX1276.h @@ -34,7 +34,7 @@ #define PIN_GPS_EN -1 // Analog button -#define PIN_USER_BTN_ANA 7 +// #define PIN_USER_BTN_ANA 7 // Include headers AFTER pin definitions so ESP32Board::sleep() can use P_LORA_DIO_0 #include diff --git a/variants/lilygo_t_eth_elite_sx1262/target.cpp b/variants/lilygo_t_eth_elite_sx1262/target.cpp index b6ce2c49..c9d9e189 100644 --- a/variants/lilygo_t_eth_elite_sx1262/target.cpp +++ b/variants/lilygo_t_eth_elite_sx1262/target.cpp @@ -9,6 +9,7 @@ TEthEliteBoard board; #endif MomentaryButton user_btn(PIN_USER_BTN_ANA, 1000, true); +MomentaryButton analog_btn(PIN_USER_BTN_ANA, 1000, true); // alias for UITask analog button support static SPIClass spi; RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi); diff --git a/variants/lilygo_t_eth_elite_sx1262/target.h b/variants/lilygo_t_eth_elite_sx1262/target.h index e3635b57..674b95af 100644 --- a/variants/lilygo_t_eth_elite_sx1262/target.h +++ b/variants/lilygo_t_eth_elite_sx1262/target.h @@ -1,7 +1,5 @@ #pragma once -#define HAS_ETHERNET 1 - #define RADIOLIB_STATIC_ONLY 1 #include #include @@ -13,6 +11,10 @@ extern MomentaryButton user_btn; +#ifdef PIN_USER_BTN_ANA + extern MomentaryButton analog_btn; +#endif + #ifdef DISPLAY_CLASS #include extern DISPLAY_CLASS display; diff --git a/variants/lilygo_t_eth_elite_sx1276/target.cpp b/variants/lilygo_t_eth_elite_sx1276/target.cpp index a311c1d7..03d6d38d 100644 --- a/variants/lilygo_t_eth_elite_sx1276/target.cpp +++ b/variants/lilygo_t_eth_elite_sx1276/target.cpp @@ -9,6 +9,7 @@ TEthEliteBoard board; #endif MomentaryButton user_btn(PIN_USER_BTN_ANA, 1000, true); +MomentaryButton analog_btn(PIN_USER_BTN_ANA, 1000, true); // alias for UITask analog button support static SPIClass spi; RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_0, P_LORA_RESET, P_LORA_DIO_1, spi); diff --git a/variants/lilygo_t_eth_elite_sx1276/target.h b/variants/lilygo_t_eth_elite_sx1276/target.h index 4861b535..3685c506 100644 --- a/variants/lilygo_t_eth_elite_sx1276/target.h +++ b/variants/lilygo_t_eth_elite_sx1276/target.h @@ -1,7 +1,5 @@ #pragma once -#define HAS_ETHERNET 1 - #define RADIOLIB_STATIC_ONLY 1 #include #include @@ -13,6 +11,10 @@ extern MomentaryButton user_btn; +#ifdef PIN_USER_BTN_ANA + extern MomentaryButton analog_btn; +#endif + #ifdef DISPLAY_CLASS #include extern DISPLAY_CLASS display;