diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index 4a16a02..438b22b 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -48,7 +48,7 @@ ___________________________________________________________________*/ #include "A7670_utils.h" #endif -String versionDate = "2025.01.11"; +String versionDate = "2025.01.21"; Configuration Config; WiFiClient espClient; #ifdef HAS_GPS diff --git a/src/display.cpp b/src/display.cpp index 5903b2e..e5308df 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -15,6 +15,11 @@ #define smallSizeFont 1 #define lineSpacing 10 #endif + #if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS) + #define bigSizeFont 5 + #define smallSizeFont 2 + #define lineSpacing 22 + #endif #else #ifdef HAS_EPAPER // diff --git a/src/power_utils.cpp b/src/power_utils.cpp index 804ad44..8f3ef23 100644 --- a/src/power_utils.cpp +++ b/src/power_utils.cpp @@ -207,7 +207,23 @@ namespace POWER_Utils { #if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WP) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY) Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL); - #endif + #endif + + #if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS) + pinMode(BOARD_POWERON, OUTPUT); + digitalWrite(BOARD_POWERON, HIGH); + + pinMode(BOARD_SDCARD_CS, OUTPUT); + pinMode(RADIO_CS_PIN, OUTPUT); + pinMode(TFT_CS, OUTPUT); + + digitalWrite(BOARD_SDCARD_CS, HIGH); + digitalWrite(RADIO_CS_PIN, HIGH); + digitalWrite(TFT_CS, HIGH); + + delay(500); + Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL); + #endif delay(1000); BATTERY_Utils::setup(); diff --git a/variants/ttgo_t_deck_GPS/board_pinout.h b/variants/ttgo_t_deck_GPS/board_pinout.h new file mode 100644 index 0000000..8e2e4f9 --- /dev/null +++ b/variants/ttgo_t_deck_GPS/board_pinout.h @@ -0,0 +1,36 @@ +#ifndef BOARD_PINOUT_H_ +#define BOARD_PINOUT_H_ + + // LoRa Radio + #define HAS_SX1262 + #define RADIO_SCLK_PIN 40 + #define RADIO_MISO_PIN 38 + #define RADIO_MOSI_PIN 41 + #define RADIO_CS_PIN 9 + #define RADIO_RST_PIN 17 + #define RADIO_DIO1_PIN 45 + #define RADIO_BUSY_PIN 13 + + // Display + #define HAS_DISPLAY + #define HAS_TFT + + #undef OLED_SDA + #undef OLED_SCL + #undef OLED_RST + + // GPS + #define GPS_RX 43 + #define GPS_TX 44 + + // Aditional Config + #define BATTERY_PIN 4 + + #define BOARD_POWERON 10 + #define BOARD_SDCARD_CS 39 + #define BOARD_BL_PIN 42 + + #define BOARD_I2C_SDA 18 + #define BOARD_I2C_SCL 8 + +#endif \ No newline at end of file diff --git a/variants/ttgo_t_deck_GPS/platformio.ini b/variants/ttgo_t_deck_GPS/platformio.ini new file mode 100644 index 0000000..dcca21a --- /dev/null +++ b/variants/ttgo_t_deck_GPS/platformio.ini @@ -0,0 +1,50 @@ +[env:ttgo_t_deck_GPS] +framework = arduino +monitor_speed = 115200 +platform = espressif32 @ 6.3.1 +board_build.partitions = min_spiffs.csv +board = esp32-s3-devkitc-1 +board_build.mcu = esp32s3 +board_build.embed_files = + data_embed/index.html.gz + data_embed/style.css.gz + data_embed/script.js.gz + data_embed/bootstrap.css.gz + data_embed/bootstrap.js.gz + data_embed/favicon.png.gz +extra_scripts = + pre:tools/compress.py +debug_tool = esp-prog +build_flags = + ${common.build_flags} + ${common.usb_flags} + -D TTGO_T_DECK_PLUS + -D BOARD_HAS_PSRAM + -D USER_SETUP_LOADED + -D ST7789_DRIVER + -D TFT_WIDTH=240 + -D TFT_HEIGHT=320 + -D TFT_RGB_ORDER=TFT_BGR + -D TFT_INVERSION_ON + -D TFT_MISO=38 + -D TFT_MOSI=41 + -D TFT_SCLK=40 + -D TFT_CS=12 + -D TFT_DC=11 + -D TFT_RST=-1 + -D TFT_BUSY=-1 + -D TFT_BL=42 + -D TFT_BACKLIGHT_ON=1 + -D TOUCH_CS=-1 + -D LOAD_GLCD + -D LOAD_FONT2 + -D LOAD_FONT4 + -D LOAD_FONT6 + -D LOAD_FONT7 + -D LOAD_FONT8 + -D SPI_FREQUENCY=40000000 + -D SPI_READ_FREQUENCY=16000000 +lib_deps = + ${common.lib_deps} + bodmer/TFT_eSPI @ 2.5.43 + https://github.com/mmMicky/TouchLib.git \ No newline at end of file diff --git a/variants/ttgo_t_deck_plus/board_pinout.h b/variants/ttgo_t_deck_plus/board_pinout.h new file mode 100644 index 0000000..71925c5 --- /dev/null +++ b/variants/ttgo_t_deck_plus/board_pinout.h @@ -0,0 +1,37 @@ +#ifndef BOARD_PINOUT_H_ +#define BOARD_PINOUT_H_ + + // LoRa Radio + #define HAS_SX1262 + #define RADIO_SCLK_PIN 40 + #define RADIO_MISO_PIN 38 + #define RADIO_MOSI_PIN 41 + #define RADIO_CS_PIN 9 + #define RADIO_RST_PIN 17 + #define RADIO_DIO1_PIN 45 + #define RADIO_BUSY_PIN 13 + + // Display + #define HAS_DISPLAY + #define HAS_TFT + + #undef OLED_SDA + #undef OLED_SCL + #undef OLED_RST + + // GPS + #define GPS_RX 43 + #define GPS_TX 44 + #define GPS_BAUDRATE 38400 + + // Aditional Config + #define BATTERY_PIN 4 + + #define BOARD_POWERON 10 + #define BOARD_SDCARD_CS 39 + #define BOARD_BL_PIN 42 + + #define BOARD_I2C_SDA 18 + #define BOARD_I2C_SCL 8 + +#endif \ No newline at end of file diff --git a/variants/ttgo_t_deck_plus/platformio.ini b/variants/ttgo_t_deck_plus/platformio.ini new file mode 100644 index 0000000..bc968fa --- /dev/null +++ b/variants/ttgo_t_deck_plus/platformio.ini @@ -0,0 +1,50 @@ +[env:ttgo_t_deck_plus] +framework = arduino +monitor_speed = 115200 +platform = espressif32 @ 6.3.1 +board_build.partitions = min_spiffs.csv +board = esp32-s3-devkitc-1 +board_build.mcu = esp32s3 +board_build.embed_files = + data_embed/index.html.gz + data_embed/style.css.gz + data_embed/script.js.gz + data_embed/bootstrap.css.gz + data_embed/bootstrap.js.gz + data_embed/favicon.png.gz +extra_scripts = + pre:tools/compress.py +debug_tool = esp-prog +build_flags = + ${common.build_flags} + ${common.usb_flags} + -D TTGO_T_DECK_PLUS + -D BOARD_HAS_PSRAM + -D USER_SETUP_LOADED + -D ST7789_DRIVER + -D TFT_WIDTH=240 + -D TFT_HEIGHT=320 + -D TFT_RGB_ORDER=TFT_BGR + -D TFT_INVERSION_ON + -D TFT_MISO=38 + -D TFT_MOSI=41 + -D TFT_SCLK=40 + -D TFT_CS=12 + -D TFT_DC=11 + -D TFT_RST=-1 + -D TFT_BUSY=-1 + -D TFT_BL=42 + -D TFT_BACKLIGHT_ON=1 + -D TOUCH_CS=-1 + -D LOAD_GLCD + -D LOAD_FONT2 + -D LOAD_FONT4 + -D LOAD_FONT6 + -D LOAD_FONT7 + -D LOAD_FONT8 + -D SPI_FREQUENCY=40000000 + -D SPI_READ_FREQUENCY=16000000 +lib_deps = + ${common.lib_deps} + bodmer/TFT_eSPI @ 2.5.43 + https://github.com/mmMicky/TouchLib.git \ No newline at end of file