From e2416cb81ea1eaea9228a650e752d841f9d2c68f Mon Sep 17 00:00:00 2001 From: Alexandre Sanlim Date: Sat, 9 Sep 2023 12:49:47 -0300 Subject: [PATCH] rename some files --- lib/TFT_eSPI/User_Setup_Select.h | 2 +- platformio.ini | 6 +++--- src/drivers/devices/lilygoTDisplayLed.h | 9 --------- src/drivers/devices/lilygoV1TDisplay.h | 9 +++++++++ src/drivers/display.cpp | 4 ++-- .../{tDisplayLedDriver.cpp => tDisplayV1Driver.cpp} | 4 ++-- src/drivers/drivers.h | 6 +++--- 7 files changed, 20 insertions(+), 20 deletions(-) delete mode 100644 src/drivers/devices/lilygoTDisplayLed.h create mode 100644 src/drivers/devices/lilygoV1TDisplay.h rename src/drivers/displays/{tDisplayLedDriver.cpp => tDisplayV1Driver.cpp} (99%) diff --git a/lib/TFT_eSPI/User_Setup_Select.h b/lib/TFT_eSPI/User_Setup_Select.h index 6fc4f47..185f994 100644 --- a/lib/TFT_eSPI/User_Setup_Select.h +++ b/lib/TFT_eSPI/User_Setup_Select.h @@ -58,7 +58,7 @@ //#include // Setup file for ESP32 and TTGO T4 version 1.3 //#include // Setup file for ESP32 and TTGO TM ST7789 SPI bus TFT //#include // Setup file for DSTIKE/ESP32/ESP8266 configured for ST7789 240 x 240 -#ifdef NERDMINER_LED +#ifdef NERDMINER_T_DISPLAY_V1 #include // Setup file for ESP32 and TTGO T-Display ST7789V SPI bus TFT #endif //#include // Setup file for ESP32 and TTGO T-Wristband ST7735 SPI bus TFT diff --git a/platformio.ini b/platformio.ini index f424339..77fc7a0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ [platformio] globallib_dir = lib -default_envs = NerdminerV2-Led, ESP32-devKitv1 +default_envs = NerdminerV2-T-Display_V1, ESP32-devKitv1 [env:NerminerV2] platform = espressif32 @@ -161,7 +161,7 @@ lib_deps = mathertel/OneButton @ ^2.0.3 arduino-libraries/NTPClient -[env:NerdminerV2-Led] +[env:NerdminerV2-T-Display_V1] platform = espressif32 board = ttgo-lora32-v1 framework = arduino @@ -172,7 +172,7 @@ upload_speed = 115200 board_build.partitions = huge_app.csv build_flags = - -D NERDMINER_LED=1 + -D NERDMINER_T_DISPLAY_V1=1 -D DEBUG_MINING=1 lib_deps = diff --git a/src/drivers/devices/lilygoTDisplayLed.h b/src/drivers/devices/lilygoTDisplayLed.h deleted file mode 100644 index 0f43d73..0000000 --- a/src/drivers/devices/lilygoTDisplayLed.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _LILYGO_TDISPLAY_LED_H -#define _LILYGO_TDISPLAY_LED_H - -#define PIN_BUTTON_1 0 -#define PIN_BUTTON_2 35 - -#define LED_DISPLAY - -#endif \ No newline at end of file diff --git a/src/drivers/devices/lilygoV1TDisplay.h b/src/drivers/devices/lilygoV1TDisplay.h new file mode 100644 index 0000000..38d3a84 --- /dev/null +++ b/src/drivers/devices/lilygoV1TDisplay.h @@ -0,0 +1,9 @@ +#ifndef _LILYGO_V1_TDISPLAY_H +#define _LILYGO_V1_TDISPLAY_H + +#define PIN_BUTTON_1 0 +#define PIN_BUTTON_2 35 + +#define V1_DISPLAY + +#endif \ No newline at end of file diff --git a/src/drivers/display.cpp b/src/drivers/display.cpp index 162f237..b583df4 100644 --- a/src/drivers/display.cpp +++ b/src/drivers/display.cpp @@ -20,8 +20,8 @@ DisplayDriver *currentDisplayDriver = &dongleDisplayDriver; DisplayDriver *currentDisplayDriver = &t_qtDisplayDriver; #endif -#ifdef LED_DISPLAY -DisplayDriver *currentDisplayDriver = &tDisplayLedDriver; +#ifdef V1_DISPLAY +DisplayDriver *currentDisplayDriver = &tDisplayV1Driver; #endif // Initialize the display diff --git a/src/drivers/displays/tDisplayLedDriver.cpp b/src/drivers/displays/tDisplayV1Driver.cpp similarity index 99% rename from src/drivers/displays/tDisplayLedDriver.cpp rename to src/drivers/displays/tDisplayV1Driver.cpp index ba8012c..93174a1 100644 --- a/src/drivers/displays/tDisplayLedDriver.cpp +++ b/src/drivers/displays/tDisplayV1Driver.cpp @@ -1,6 +1,6 @@ #include "../drivers.h" -#ifdef LED_DISPLAY +#ifdef V1_DISPLAY #include #include "media/images_240_135.h" @@ -218,7 +218,7 @@ void tDisplay_DoLedStuff(unsigned long frame) CyclicScreenFunction tDisplayCyclicScreens[] = {tDisplay_MinerScreen, tDisplay_ClockScreen, tDisplay_GlobalHashScreen}; -DisplayDriver tDisplayLedDriver = { +DisplayDriver tDisplayV1Driver = { tDisplay_Init, tDisplay_AlternateScreenState, tDisplay_AlternateRotation, diff --git a/src/drivers/drivers.h b/src/drivers/drivers.h index 4205c72..bebce13 100644 --- a/src/drivers/drivers.h +++ b/src/drivers/drivers.h @@ -13,8 +13,8 @@ #include "devices/lilygoS3Dongle.h" #elif defined(NERMINER_T_QT) #include "devices/lilygoT_QT.h" -#elif defined(NERDMINER_LED) -#include "devices/lilygoTDisplayLed.h" +#elif defined(NERDMINER_T_DISPLAY_V1) +#include "devices/lilygoV1TDisplay.h" #else #error "No device defined" #endif @@ -49,7 +49,7 @@ extern DisplayDriver tDisplayDriver; extern DisplayDriver amoledDisplayDriver; extern DisplayDriver dongleDisplayDriver; extern DisplayDriver t_qtDisplayDriver; -extern DisplayDriver tDisplayLedDriver; +extern DisplayDriver tDisplayV1Driver; #define SCREENS_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))