Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
d72e908
remove duplicate HAS_LP5562 introduced by #6422
Nasimovy Apr 4, 2025
3743269
Merge branch 'master' of https://github.com/Nasimovy/meshtastic-firmware
Nasimovy Apr 4, 2025
f55e855
Merge branch 'master' of https://github.com/Nasimovy/meshtastic-firmware
Nasimovy Apr 9, 2025
eb48def
Merge branch 'meshtastic:master' into T-beam-display-different-driver
Nasimovy Apr 12, 2025
f7bc4d8
add ST7796
Nasimovy Apr 12, 2025
251c006
changes to get display centered+lib update
Nasimovy Apr 12, 2025
cd438a8
seperated from tbeam
Nasimovy Apr 13, 2025
9de6340
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy Apr 13, 2025
d454a44
forgot the simple scan case
Nasimovy Apr 13, 2025
7920110
Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy…
Nasimovy Apr 13, 2025
7f5e988
lowered speeds to 1/4
Nasimovy Apr 14, 2025
8c2e727
added SPI Speed to constructor+ cleaned up variant.h
Nasimovy Apr 15, 2025
e145e10
even slower speeds....
Nasimovy Apr 15, 2025
9efdf8b
add ST7796
Nasimovy Apr 12, 2025
0418568
changes to get display centered+lib update
Nasimovy Apr 12, 2025
f7f5466
seperated from tbeam
Nasimovy Apr 13, 2025
ee95455
forgot the simple scan case
Nasimovy Apr 13, 2025
f5e3acb
lowered speeds to 1/4
Nasimovy Apr 14, 2025
acc0cfe
added SPI Speed to constructor+ cleaned up variant.h
Nasimovy Apr 15, 2025
e0bb762
even slower speeds....
Nasimovy Apr 15, 2025
020e44d
changed variant name to tbeam-displayshield
Nasimovy Apr 16, 2025
60ee8ea
Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy…
Nasimovy Apr 16, 2025
b10af5b
modified variant.h and merged ini file+testing on lower spi frequency…
Nasimovy Apr 16, 2025
7867cf5
try higher speeds + HSPI
Nasimovy Apr 16, 2025
a69c489
cleanup of redundant code
Nasimovy Apr 16, 2025
d55e3bf
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Apr 17, 2025
3d8d6ef
refelct changes?
Nasimovy Apr 17, 2025
2f15fba
Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy…
Nasimovy Apr 17, 2025
ab35668
Merge branch 'master' into T-beam-display-no-touch
caveman99 Apr 17, 2025
e0d6fce
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy Apr 18, 2025
43978af
trunk fmt
Nasimovy Apr 18, 2025
cb14fc3
testing touchscreen code
Nasimovy Apr 19, 2025
0f1e528
further testing
Nasimovy Apr 19, 2025
f5c3e77
changed to sensorlib 0.3.1
Nasimovy Apr 19, 2025
f30f528
i broke it , dont know how to fix at the moment will investigate
Nasimovy Apr 19, 2025
e7e1a20
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Apr 20, 2025
15c2094
add -1 functionality for touch IRQ
Nasimovy Apr 20, 2025
6fc1320
Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy…
Nasimovy Apr 20, 2025
71bc009
revert to working example?
Nasimovy Apr 20, 2025
ffa5476
it works.... is pressed was not working properly
Nasimovy Apr 20, 2025
3145061
working touchscreen but gestures not moving display
Nasimovy Apr 20, 2025
ffe9728
swap XY+ mirror X
Nasimovy Apr 20, 2025
97a1a42
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Apr 20, 2025
c11e180
cleanup + addition of defines for on screen keyboard and canned mess…
Nasimovy Apr 21, 2025
a5ef03b
removed debug lines, disabled bluetooth for now because of stack smas…
Nasimovy Apr 21, 2025
aad4cbd
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Apr 22, 2025
a72e02b
reverted the revert #6640 + increased speed, bleutooth is stable now …
Nasimovy Apr 23, 2025
77b972c
Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy…
Nasimovy Apr 23, 2025
addd294
remove debug + add fixed baudrate for gps
Nasimovy Apr 23, 2025
680ea1c
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy Apr 27, 2025
7da0356
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Apr 29, 2025
00f623a
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Apr 30, 2025
8346ab4
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 6, 2025
97c3673
Merge branch 'master' into T-beam-display-no-touch
Nasimovy May 10, 2025
95160c4
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 13, 2025
9005703
fmt
Nasimovy May 13, 2025
22151cf
Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy…
Nasimovy May 13, 2025
9143540
Merge branch 'master' into T-beam-display-no-touch
caveman99 May 13, 2025
c1bd6c4
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 16, 2025
873788e
revert NIMble
Nasimovy May 16, 2025
80a750d
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 18, 2025
658a507
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 22, 2025
f6dedcb
changed display library to meshtastic org
Nasimovy May 22, 2025
7e8845f
removed baudrate of 115200 and some commented out code
Nasimovy May 23, 2025
c37fe24
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 23, 2025
20f3c6f
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 24, 2025
5ef961d
Correct spelling
caveman99 May 24, 2025
2d5f8a9
Typo
caveman99 May 24, 2025
ef0fb49
display speed x10
Nasimovy May 25, 2025
08301c7
resolve conflicts
Nasimovy May 25, 2025
ca176bc
undo
Nasimovy May 25, 2025
0dcc6ba
Merge remote-tracking branch 'origin/master' into T-beam-display-no-t…
Nasimovy May 25, 2025
7ee0c21
revert speed increase CPU
Nasimovy May 25, 2025
10cb204
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 25, 2025
ce8298c
add SCREEN_TRANSITION_FRAMERATE 5
Nasimovy May 26, 2025
00a96f3
spi speed increase of the display
Nasimovy May 26, 2025
46f8939
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 26, 2025
1e4bf27
Merge branch 'master' into T-beam-display-no-touch
thebentern May 26, 2025
aa7469b
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 27, 2025
8d449e5
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy May 28, 2025
235eb66
Merge branch 'master' into T-beam-display-no-touch
Nasimovy May 29, 2025
28a2993
Merge branch 'master' into T-beam-display-no-touch
caveman99 Jun 5, 2025
6d51e88
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jun 13, 2025
b761dcb
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy Jun 15, 2025
273e480
using the original touchscreen implementation
Nasimovy Jun 22, 2025
2bed52a
removal of H file line
Nasimovy Jun 22, 2025
8b4a899
Merge remote-tracking branch 'origin/master' into T-beam-display-no-t…
Nasimovy Jun 22, 2025
2abcdb7
add USE_ST7796 to missing places
Nasimovy Jun 22, 2025
7b365b7
removed is pressed + interrupt
Nasimovy Jun 25, 2025
01518a4
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jun 25, 2025
fc6857c
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jun 26, 2025
d83b62c
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jun 27, 2025
b6eba7f
revert changes of settings.json
Nasimovy Jun 28, 2025
264bdf6
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jun 28, 2025
ca279c8
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jun 28, 2025
6a06c9f
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jul 2, 2025
bd30f35
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jul 8, 2025
2903ec6
Merge remote-tracking branch 'origin/master' into T-beam-display-no-t…
Nasimovy Jul 14, 2025
71e8fa3
update to screen.cpp
Nasimovy Jul 14, 2025
90f6458
Merge branch 'meshtastic:master' into T-beam-display-no-touch
Nasimovy Jul 14, 2025
ac31dc7
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jul 14, 2025
b247ec8
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jul 14, 2025
70522ae
Merge remote-tracking branch 'origin/master' into T-beam-display-no-t…
Nasimovy Jul 20, 2025
1baf5d2
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Jul 21, 2025
6c8790d
update branch to reflect changes
Nasimovy Aug 3, 2025
755be93
test identification of CST226 and CST328
Nasimovy Aug 3, 2025
c06575e
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Aug 6, 2025
5092949
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Aug 10, 2025
ce96f47
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Aug 14, 2025
21c3508
Update src/configuration.h
Nasimovy Aug 14, 2025
a78baa7
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Aug 15, 2025
5286a5a
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Aug 17, 2025
673cf48
made changes to detection because it was completely wrong, CST226SE h…
Nasimovy Aug 17, 2025
c22eed9
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Aug 17, 2025
c1e6fa4
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Aug 19, 2025
4035609
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Aug 22, 2025
c544499
Merge branch 'master' into T-beam-display-no-touch
Nasimovy Aug 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Touchscreen
// -----------------------------------------------------------------------------
#define FT6336U_ADDR 0x48
#define CST226SE_ADDR 0x1A
#define CST226SE_ADDR_ALT 0x5A

// -----------------------------------------------------------------------------
// BIAS-T Generator
Expand Down
1 change: 1 addition & 0 deletions src/detect/ScanI2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class ScanI2C
DPS310,
LTR390UV,
TCA8418KB,
CST226SE,
} DeviceType;

// typedef uint8_t DeviceAddress;
Expand Down
9 changes: 7 additions & 2 deletions src/detect/ScanI2CTwoWire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,18 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
SCAN_SIMPLE_CASE(MAX1704X_ADDR, MAX17048, "MAX17048", (uint8_t)addr.address);
SCAN_SIMPLE_CASE(DFROBOT_RAIN_ADDR, DFROBOT_RAIN, "DFRobot Rain Gauge", (uint8_t)addr.address);
SCAN_SIMPLE_CASE(LTR390UV_ADDR, LTR390UV, "LTR390UV", (uint8_t)addr.address);
SCAN_SIMPLE_CASE(CST226SE_ADDR, CST226SE, "CST226SE", (uint8_t)addr.address);
#ifdef HAS_TPS65233
SCAN_SIMPLE_CASE(TPS65233_ADDR, TPS65233, "TPS65233", (uint8_t)addr.address);
#endif

case MLX90614_ADDR_DEF:
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0e), 1);
if (registerValue == 0x5a) {
// Do we have the MLX90614 or the MPR121KB or the CST226SE
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x06), 1);
if (registerValue == 0xAB) {
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number 0xAB should be defined as a named constant to improve code readability and maintainability.

Suggested change
if (registerValue == 0xAB) {
if (registerValue == CST226SE_DEVICE_ID) {

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this increase readability or should i add a comment on how or what the hex code means?

type = CST226SE;
logFoundDevice("CST226SE", (uint8_t)addr.address);
} else if (getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0e), 1) == 0x5a) {
type = MLX90614;
logFoundDevice("MLX90614", (uint8_t)addr.address);
} else {
Expand Down
47 changes: 43 additions & 4 deletions src/graphics/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ static void drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const NodeStat
char usersString[20];
snprintf(usersString, sizeof(usersString), "%d/%d", nodeStatus->getNumOnline(), nodeStatus->getNumTotal());
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(USE_ST7796) || defined(HX8357_CS)) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
display->drawFastImage(x, y + 3, 8, 8, imgUser);
#else
Expand Down Expand Up @@ -1525,6 +1525,8 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_

#if defined(ESP_PLATFORM) && defined(USE_ST7789)
SPIClass SPI1(HSPI);
#elif defined(ESP_PLATFORM) && defined(USE_ST7796)
SPIClass SPI3(VSPI);
#endif

Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_OledType screenType, OLEDDISPLAY_GEOMETRY geometry)
Expand All @@ -1541,6 +1543,13 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O
#else
dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);
#endif
#elif defined(USE_ST7796)
#ifdef ESP_PLATFORM
dispdev = new ST7796Spi(&SPI3, ST7796_RESET, ST7796_RS, ST7796_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT, ST7796_SDA,
ST7796_MISO, ST7796_SCK, TFT_SPI_FREQUENCY);
#else
dispdev = new ST7796Spi(&SPI3, ST7796_RESET, ST7796_RS, ST7796_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);
#endif
#elif defined(USE_SSD1306)
dispdev = new SSD1306Wire(address.address, -1, -1, geometry,
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
Expand Down Expand Up @@ -1632,6 +1641,15 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
pinMode(VTFT_LEDA, OUTPUT);
digitalWrite(VTFT_LEDA, TFT_BACKLIGHT_ON);
#endif
#endif
#ifdef USE_ST7796
ui->init();
#ifdef ESP_PLATFORM
analogWrite(VTFT_LEDA, BRIGHTNESS_DEFAULT);
#else
pinMode(VTFT_LEDA, OUTPUT);
digitalWrite(VTFT_LEDA, TFT_BACKLIGHT_ON);
#endif
#endif
enabled = true;
setInterval(0); // Draw ASAP
Expand Down Expand Up @@ -1666,6 +1684,21 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
nrf_gpio_cfg_default(ST7789_NSS);
#endif
#endif
#ifdef USE_ST7796
SPI3.end();
#if defined(ARCH_ESP32)
pinMode(VTFT_LEDA, OUTPUT);
digitalWrite(VTFT_LEDA, LOW);
pinMode(ST7796_RESET, ANALOG);
pinMode(ST7796_RS, ANALOG);
pinMode(ST7796_NSS, ANALOG);
#else
nrf_gpio_cfg_default(VTFT_LEDA);
nrf_gpio_cfg_default(ST7796_RESET);
nrf_gpio_cfg_default(ST7796_RS);
nrf_gpio_cfg_default(ST7796_NSS);
#endif
#endif

#ifdef T_WATCH_S3
PMU->disablePowerOutput(XPOWERS_ALDO2);
Expand Down Expand Up @@ -1695,6 +1728,10 @@ void Screen::setup()
// Heltec T114 and T190: honor a custom text color, if defined in variant.h
static_cast<ST7789Spi *>(dispdev)->setRGB(TFT_MESH);
#endif
#if defined(USE_ST7796) && defined(TFT_MESH)
// Custom text color, if defined in variant.h
static_cast<ST7796Spi *>(dispdev)->setRGB(TFT_MESH);
#endif

// Initialising the UI will init the display too.
ui->init();
Expand Down Expand Up @@ -1755,6 +1792,8 @@ void Screen::setup()
static_cast<TFTDisplay *>(dispdev)->flipScreenVertically();
#elif defined(USE_ST7789)
static_cast<ST7789Spi *>(dispdev)->flipScreenVertically();
#elif defined(USE_ST7796)
static_cast<ST7796Spi *>(dispdev)->mirrorScreen();
#else
dispdev->flipScreenVertically();
#endif
Expand Down Expand Up @@ -2490,7 +2529,7 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
if (!Throttle::isWithinTimespanMs(storeForwardModule->lastHeartbeat,
(storeForwardModule->heartbeatInterval * 1200))) { // no heartbeat, overlap a bit
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || ARCH_PORTDUINO) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(USE_ST7796) || defined(HX8357_CS) || ARCH_PORTDUINO) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8,
imgQuestionL1);
Expand All @@ -2502,7 +2541,7 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
#endif
} else {
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(USE_ST7796) || defined(HX8357_CS)) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(ourId), y + 3 + FONT_HEIGHT_SMALL, 16, 8,
imgSFL1);
Expand All @@ -2517,7 +2556,7 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
} else {
// TODO: Raspberry Pi supports more than just the one screen size
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || ARCH_PORTDUINO) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(USE_ST7796) || defined(HX8357_CS) || ARCH_PORTDUINO) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8,
imgInfoL1);
Expand Down
2 changes: 2 additions & 0 deletions src/graphics/Screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class Screen
#include <SSD1306Wire.h>
#elif defined(USE_ST7789)
#include <ST7789Spi.h>
#elif defined(USE_ST7796)
#include <ST7796Spi.h>
#else
// the SH1106/SSD1306 variant is auto-detected
#include <AutoOLEDWire.h>
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/ScreenFonts.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
#endif

#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(USE_ST7796) || defined(HX8357_CS)) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
// The screen is bigger so use bigger fonts
#define FONT_SMALL FONT_MEDIUM_LOCAL // Height: 19
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/images.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const uint8_t bluetoothConnectedIcon[36] PROGMEM = {0xfe, 0x01, 0xff, 0x03, 0x03
#endif

#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || ARCH_PORTDUINO) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(USE_ST7796) || defined(HX8357_CS) || ARCH_PORTDUINO) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
const uint8_t imgQuestionL1[] PROGMEM = {0xff, 0x01, 0x01, 0x32, 0x7b, 0x49, 0x49, 0x6f, 0x26, 0x01, 0x01, 0xff};
const uint8_t imgQuestionL2[] PROGMEM = {0x0f, 0x08, 0x08, 0x08, 0x06, 0x0f, 0x0f, 0x06, 0x08, 0x08, 0x08, 0x0f};
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ void setup()
// Don't call screen setup until after nodedb is setup (because we need
// the current region name)
#if defined(ST7701_CS) || defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || \
defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789)
defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) || defined(USE_ST7796)
screen->setup();
#elif defined(ARCH_PORTDUINO)
if (screen_found.port != ScanI2C::I2CPort::NO_I2C || settingsMap[displayPanel]) {
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/NodeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ void NodeDB::installDefaultConfig(bool preserveKey = false)
config.bluetooth.fixed_pin = defaultBLEPin;

#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7789_CS) || \
defined(HX8357_CS) || defined(USE_ST7789)
defined(HX8357_CS) || defined(USE_ST7789) || defined(USE_ST7796)
bool hasScreen = true;
#ifdef HELTEC_MESH_NODE_T114
uint32_t st7789_id = get_st7789_id(ST7789_NSS, ST7789_SCK, ST7789_SDA, ST7789_RS, ST7789_RESET);
Expand Down
8 changes: 4 additions & 4 deletions variants/tbeam/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
extends = esp32_base
board = ttgo-t-beam
board_check = true
lib_deps =
${esp32_base.lib_deps}
build_flags =
${esp32_base.build_flags} -D TBEAM_V10 -I variants/tbeam
lib_deps = ${esp32_base.lib_deps}
build_flags = ${esp32_base.build_flags}
-DTBEAM_V10
-Ivariants/tbeam
-DGPS_POWER_TOGGLE ; comment this line to disable double press function on the user button to turn off gps entirely.
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
Expand Down
14 changes: 14 additions & 0 deletions variants/tbeam_TFT/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
; The 1.0 release of the TBEAM board
[env:tbeam_TFT]
extends = esp32_base
board = ttgo-t-beam
board_check = true
lib_deps = ${esp32_base.lib_deps}
https://github.com/Nasimovy/st7796/archive/refs/tags/1.0.5.zip ; display addon
build_flags = ${esp32_base.build_flags}
-DTBEAM_V10
-Ivariants/tbeam_TFT
-DGPS_POWER_TOGGLE ; comment this line to disable double press function on the user button to turn off gps entirely.
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
upload_speed = 921600
60 changes: 60 additions & 0 deletions variants/tbeam_TFT/variant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep

#define I2C_SDA 21
#define I2C_SCL 22

// Display addon
#define USE_ST7796
#define ST7796_NSS 25
#define ST7796_RS 13 // DC
#define ST7796_SDA 14 // MOSI
#define ST7796_SCK 15
#define ST7796_RESET 2
#define ST7796_MISO -1
#define ST7796_BUSY -1
#define VTFT_LEDA 4
#define TFT_SPI_FREQUENCY 500000
#define TFT_HEIGHT 222
#define TFT_WIDTH 480
#define BRIGHTNESS_DEFAULT 100 // Medium Low Brightnes

#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
// #define BUTTON_PIN_ALT 13 // Alternate GPIO for an external button if needed. Does anyone use this? It is not documented
// anywhere.
// #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.

// #define LED_STATE_ON 0 // State when LED is lit
// #define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4

// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
// not found then probe for SX1262
#define USE_RF95 // RFM95/SX127x
#define USE_SX1262
#define USE_SX1268

#define LORA_DIO0 26 // a No connect on the SX1262 module
#define LORA_RESET 23
#define LORA_DIO1 33 // SX1262 IRQ
#define LORA_DIO2 32 // SX1262 BUSY
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled

#ifdef USE_SX1262
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY LORA_DIO2
#define SX126X_RESET LORA_RESET
// Not really an E22 but TTGO seems to be trying to clone that
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
// code)
#endif

// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
// and waking from light sleep
// #define PMU_IRQ 35
#define HAS_AXP192
#define GPS_UBLOX
#define GPS_RX_PIN 34
#define GPS_TX_PIN 12
// #define GPS_DEBUG
Loading