first Test T-Deck-Plus
This commit is contained in:
parent
4a5da108ae
commit
787e5b490f
|
|
@ -276,7 +276,7 @@ build_flags =
|
||||||
-Werror -Wall
|
-Werror -Wall
|
||||||
-DHELTEC_WIRELESS_TRACKER
|
-DHELTEC_WIRELESS_TRACKER
|
||||||
-DHAS_SX1262
|
-DHAS_SX1262
|
||||||
-DHIGH_GPS_BAUDRATE
|
-DGPS_BAUDRATE=115200
|
||||||
-DHAS_GPS_CTRL
|
-DHAS_GPS_CTRL
|
||||||
-DHAS_TFT
|
-DHAS_TFT
|
||||||
-D USER_SETUP_LOADED
|
-D USER_SETUP_LOADED
|
||||||
|
|
@ -382,6 +382,60 @@ lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
bodmer/TFT_eSPI @ 2.5.43
|
bodmer/TFT_eSPI @ 2.5.43
|
||||||
|
|
||||||
|
[env:ttgo_t_deck_plus]
|
||||||
|
extends = env
|
||||||
|
platform = espressif32 @ 6.3.1
|
||||||
|
board_build.partitions = huge_app.csv
|
||||||
|
monitor_filters = esp32_exception_decoder
|
||||||
|
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 =
|
||||||
|
-Werror -Wall
|
||||||
|
-DTTGO_T_DECK_PLUS
|
||||||
|
-DBOARD_HAS_PSRAM
|
||||||
|
-DHAS_SX1262
|
||||||
|
-DGPS_BAUDRATE=38400
|
||||||
|
-DHAS_TFT
|
||||||
|
-DUSER_SETUP_LOADED
|
||||||
|
-DST7789_DRIVER
|
||||||
|
-DTFT_WIDTH=240
|
||||||
|
-DTFT_HEIGHT=320
|
||||||
|
-DTFT_RGB_ORDER=TFT_BGR
|
||||||
|
-DTFT_INVERSION_ON
|
||||||
|
-DTFT_MISO=38
|
||||||
|
-DTFT_MOSI=41
|
||||||
|
-DTFT_SCLK=40
|
||||||
|
-DTFT_CS=12
|
||||||
|
-DTFT_DC=11
|
||||||
|
-DTFT_RST=-1
|
||||||
|
-DTFT_BUSY=-1
|
||||||
|
-DTFT_BL=42
|
||||||
|
-DTFT_BACKLIGHT_ON=1
|
||||||
|
-DTOUCH_CS=-1
|
||||||
|
-DLOAD_GLCD
|
||||||
|
-DLOAD_FONT2
|
||||||
|
-DLOAD_FONT4
|
||||||
|
-DLOAD_FONT6
|
||||||
|
-DLOAD_FONT7
|
||||||
|
-DLOAD_FONT8
|
||||||
|
-DSPI_FREQUENCY=40000000
|
||||||
|
-DSPI_READ_FREQUENCY=16000000
|
||||||
|
-DARDUINO_USB_MODE=1
|
||||||
|
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
bodmer/TFT_eSPI @ 2.5.43
|
||||||
|
|
||||||
|
|
||||||
[env:ESP32_DIY_LoRa_GPS]
|
[env:ESP32_DIY_LoRa_GPS]
|
||||||
extends = env:esp32
|
extends = env:esp32
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ TinyGPSPlus gps;
|
||||||
OneButton userButton = OneButton(BUTTON_PIN, true, true);
|
OneButton userButton = OneButton(BUTTON_PIN, true, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
String versionDate = "2024.10.10";
|
String versionDate = "2024.10.11";
|
||||||
|
|
||||||
uint8_t myBeaconsIndex = 0;
|
uint8_t myBeaconsIndex = 0;
|
||||||
int myBeaconsSize = Config.beacons.size();
|
int myBeaconsSize = Config.beacons.size();
|
||||||
|
|
@ -176,7 +176,7 @@ void loop() {
|
||||||
Utils::checkDisplayEcoMode();
|
Utils::checkDisplayEcoMode();
|
||||||
|
|
||||||
KEYBOARD_Utils::read();
|
KEYBOARD_Utils::read();
|
||||||
#ifdef TTGO_T_DECK_GPS
|
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
KEYBOARD_Utils::mouseRead();
|
KEYBOARD_Utils::mouseRead();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef TTGO_T_DECK_GPS
|
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
#define GPS_RX 43
|
#define GPS_RX 43
|
||||||
#define GPS_TX 44
|
#define GPS_TX 44
|
||||||
#define BOARD_POWERON 10
|
#define BOARD_POWERON 10
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ String currentSymbol, lastSymbol, lastHeader;
|
||||||
#define smallSizeFont 1
|
#define smallSizeFont 1
|
||||||
#define lineSpacing 12
|
#define lineSpacing 12
|
||||||
#endif
|
#endif
|
||||||
#ifdef TTGO_T_DECK_GPS
|
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
#define bigSizeFont 4
|
#define bigSizeFont 4
|
||||||
#define smallSizeFont 2
|
#define smallSizeFont 2
|
||||||
#define lineSpacing 22
|
#define lineSpacing 22
|
||||||
|
|
@ -265,22 +265,22 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
||||||
if (!bluetoothConnected || time_now % 10 < 5) {
|
if (!bluetoothConnected || time_now % 10 < 5) {
|
||||||
if (symbolAvailable) {
|
if (symbolAvailable) {
|
||||||
currentSymbol = symbolArray[symbol];
|
currentSymbol = symbolArray[symbol];
|
||||||
#if HELTEC_WIRELESS_TRACKER
|
#if defined(HELTEC_WIRELESS_TRACKER)
|
||||||
if (currentSymbol != lastSymbol) {
|
if (currentSymbol != lastSymbol) {
|
||||||
tft.fillRect((TFT_WIDTH - SYMBOL_WIDTH + (128 - TFT_WIDTH)), 0, SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_BLACK);
|
tft.fillRect((TFT_WIDTH - SYMBOL_WIDTH + (128 - TFT_WIDTH)), 0, SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_BLACK);
|
||||||
lastSymbol = currentSymbol;
|
lastSymbol = currentSymbol;
|
||||||
}
|
}
|
||||||
tft.drawBitmap((TFT_WIDTH - SYMBOL_WIDTH + (128 - TFT_WIDTH)), 0, symbolsAPRS[symbol], SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_WHITE);//, TFT_RED);
|
tft.drawBitmap((TFT_WIDTH - SYMBOL_WIDTH + (128 - TFT_WIDTH)), 0, symbolsAPRS[symbol], SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_WHITE);//, TFT_RED);
|
||||||
#endif
|
#endif
|
||||||
#if TTGO_T_DECK_GPS
|
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
tft.drawBitmap((TFT_WIDTH - SYMBOL_WIDTH), 0, symbolsAPRS[symbol], SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_WHITE);//, TFT_RED);
|
tft.drawBitmap((TFT_WIDTH - SYMBOL_WIDTH), 0, symbolsAPRS[symbol], SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_WHITE);//, TFT_RED);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} else if (bluetoothConnected) { // TODO In this case, the text symbol stay displayed due to symbolAvailable false in menu_utils
|
} else if (bluetoothConnected) { // TODO In this case, the text symbol stay displayed due to symbolAvailable false in menu_utils
|
||||||
#if HELTEC_WIRELESS_TRACKER
|
#if defined(HELTEC_WIRELESS_TRACKER)
|
||||||
tft.drawBitmap((TFT_WIDTH - SYMBOL_WIDTH + (128 - TFT_WIDTH)), 0, bluetoothSymbol, SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_WHITE);
|
tft.drawBitmap((TFT_WIDTH - SYMBOL_WIDTH + (128 - TFT_WIDTH)), 0, bluetoothSymbol, SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_WHITE);
|
||||||
#endif
|
#endif
|
||||||
#if TTGO_T_DECK_GPS
|
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
tft.drawBitmap((TFT_WIDTH - SYMBOL_WIDTH), 0, bluetoothSymbol, SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_WHITE);
|
tft.drawBitmap((TFT_WIDTH - SYMBOL_WIDTH), 0, bluetoothSymbol, SYMBOL_WIDTH, SYMBOL_HEIGHT, TFT_WHITE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,13 @@
|
||||||
|
|
||||||
#include "APRSPacketLib.h"
|
#include "APRSPacketLib.h"
|
||||||
|
|
||||||
#ifdef HIGH_GPS_BAUDRATE
|
/*#ifdef HIGH_GPS_BAUDRATE
|
||||||
#define GPS_BAUD 115200
|
#define GPS_BAUD 115200
|
||||||
|
#else
|
||||||
|
#define GPS_BAUD 38400//9600
|
||||||
|
#endif*/
|
||||||
|
#ifdef GPS_BAUDRATE
|
||||||
|
#define GPS_BAUD GPS_BAUDRATE
|
||||||
#else
|
#else
|
||||||
#define GPS_BAUD 9600
|
#define GPS_BAUD 9600
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#include "msg_utils.h"
|
#include "msg_utils.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
|
|
||||||
#ifdef TTGO_T_DECK_GPS
|
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
#define KB_ADDR 0x55 // T-Deck internal keyboard (Keyboard Backlight On = ALT + B)
|
#define KB_ADDR 0x55 // T-Deck internal keyboard (Keyboard Backlight On = ALT + B)
|
||||||
#else
|
#else
|
||||||
#define KB_ADDR 0x5F // CARDKB from m5stack.com (YEL - SDA / WTH SCL)
|
#define KB_ADDR 0x5F // CARDKB from m5stack.com (YEL - SDA / WTH SCL)
|
||||||
|
|
@ -719,7 +719,7 @@ namespace KEYBOARD_Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
void mouseRead() {
|
void mouseRead() {
|
||||||
#ifdef TTGO_T_DECK_GPS
|
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
int ballUp = digitalRead(TrackBallUp);
|
int ballUp = digitalRead(TrackBallUp);
|
||||||
int ballDown = digitalRead(TrackBallDown);
|
int ballDown = digitalRead(TrackBallDown);
|
||||||
int ballLeft = digitalRead(TrackBallLeft);
|
int ballLeft = digitalRead(TrackBallLeft);
|
||||||
|
|
|
||||||
|
|
@ -622,7 +622,7 @@ namespace MENU_Utils {
|
||||||
if (POWER_Utils::getBatteryInfoIsConnected()) {
|
if (POWER_Utils::getBatteryInfoIsConnected()) {
|
||||||
String batteryVoltage = POWER_Utils::getBatteryInfoVoltage();
|
String batteryVoltage = POWER_Utils::getBatteryInfoVoltage();
|
||||||
String batteryCharge = POWER_Utils::getBatteryInfoCurrent();
|
String batteryCharge = POWER_Utils::getBatteryInfoCurrent();
|
||||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_GPS_915) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_LORA32_V2_1_TNC_915) || defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_WIRELESS_TRACKER) || defined(TTGO_T_DECK_GPS)
|
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_GPS_915) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_LORA32_V2_1_TNC_915) || defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_WIRELESS_TRACKER) || defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
sixthRowMainMenu = "Battery: ";
|
sixthRowMainMenu = "Battery: ";
|
||||||
sixthRowMainMenu += batteryVoltage;
|
sixthRowMainMenu += batteryVoltage;
|
||||||
sixthRowMainMenu += "V ";
|
sixthRowMainMenu += "V ";
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ namespace POWER_Utils {
|
||||||
batteryMeasurmentTime = millis();
|
batteryMeasurmentTime = millis();
|
||||||
#endif
|
#endif
|
||||||
double voltage = (adc_value * 3.3 ) / 4095.0;
|
double voltage = (adc_value * 3.3 ) / 4095.0;
|
||||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_GPS_915) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_LORA32_V2_1_TNC_915) || defined(ESP32_DIY_LoRa_GPS) || defined(ESP32_DIY_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(ESP32_DIY_1W_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS_LLCC68) || defined(OE5HWN_MeshCom) || defined(TTGO_T_DECK_GPS) || defined(ESP32S3_DIY_LoRa_GPS) || defined(ESP32S3_DIY_LoRa_GPS_915)
|
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_GPS_915) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_LORA32_V2_1_TNC_915) || defined(ESP32_DIY_LoRa_GPS) || defined(ESP32_DIY_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(ESP32_DIY_1W_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS_LLCC68) || defined(OE5HWN_MeshCom) || defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS) || defined(ESP32S3_DIY_LoRa_GPS) || defined(ESP32S3_DIY_LoRa_GPS_915)
|
||||||
return (2 * (voltage + 0.1)) * (1 + (lora32BatReadingCorr/100)); // (2 x 100k voltage divider) 2 x voltage divider/+0.1 because ESP32 nonlinearity ~100mV ADC offset/extra correction
|
return (2 * (voltage + 0.1)) * (1 + (lora32BatReadingCorr/100)); // (2 x 100k voltage divider) 2 x voltage divider/+0.1 because ESP32 nonlinearity ~100mV ADC offset/extra correction
|
||||||
#endif
|
#endif
|
||||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC)|| defined(HELTEC_WIRELESS_TRACKER) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(ESP32_C3_DIY_LoRa_GPS_915) || defined(WEMOS_ESP32_Bat_LoRa_GPS)
|
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC)|| defined(HELTEC_WIRELESS_TRACKER) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(ESP32_C3_DIY_LoRa_GPS_915) || defined(WEMOS_ESP32_Bat_LoRa_GPS)
|
||||||
|
|
@ -430,7 +430,7 @@ namespace POWER_Utils {
|
||||||
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TTGO_T_DECK_GPS)
|
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
pinMode(BOARD_POWERON, OUTPUT);
|
pinMode(BOARD_POWERON, OUTPUT);
|
||||||
digitalWrite(BOARD_POWERON, HIGH);
|
digitalWrite(BOARD_POWERON, HIGH);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue