Compare commits

...

120 Commits

Author SHA1 Message Date
Nasimovy
c1a8b54a84
Merge 4d77cb1915 into edb7ec58c6 2025-09-02 21:35:19 +02:00
renovate[bot]
edb7ec58c6
chore(deps): update platform-native digest to c490bcd (#7814)
Some checks are pending
CI / build-rp2040 (push) Blocked by required conditions
CI / build-rp2350 (push) Blocked by required conditions
CI / build-stm32 (push) Blocked by required conditions
CI / build-debian-src (push) Waiting to run
CI / package-pio-deps-native-tft (push) Waiting to run
CI / test-native (push) Waiting to run
CI / docker-deb-amd64 (push) Waiting to run
CI / docker-deb-amd64-tft (push) Waiting to run
CI / docker-alp-amd64 (push) Waiting to run
CI / docker-alp-amd64-tft (push) Waiting to run
CI / docker-deb-arm64 (push) Waiting to run
CI / docker-deb-armv7 (push) Waiting to run
CI / gather-artifacts (esp32) (push) Blocked by required conditions
CI / gather-artifacts (esp32c3) (push) Blocked by required conditions
CI / gather-artifacts (esp32c6) (push) Blocked by required conditions
CI / gather-artifacts (esp32s3) (push) Blocked by required conditions
CI / gather-artifacts (nrf52840) (push) Blocked by required conditions
CI / gather-artifacts (rp2040) (push) Blocked by required conditions
CI / gather-artifacts (rp2350) (push) Blocked by required conditions
CI / gather-artifacts (stm32) (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
CI / release-firmware (esp32) (push) Blocked by required conditions
CI / release-firmware (esp32c3) (push) Blocked by required conditions
CI / release-firmware (esp32c6) (push) Blocked by required conditions
CI / release-firmware (esp32s3) (push) Blocked by required conditions
CI / release-firmware (nrf52840) (push) Blocked by required conditions
CI / release-firmware (rp2040) (push) Blocked by required conditions
CI / release-firmware (rp2350) (push) Blocked by required conditions
CI / release-firmware (stm32) (push) Blocked by required conditions
CI / publish-firmware (push) Blocked by required conditions
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-02 11:58:57 -05:00
Nasimovy
4d77cb1915 Merge remote-tracking branch 'origin/master' into T-beam-display-no-touch 2025-08-29 17:15:29 +02:00
Nasimovy
c544499b96
Merge branch 'master' into T-beam-display-no-touch 2025-08-24 22:12:10 +02:00
Nasimovy
4035609c37
Merge branch 'master' into T-beam-display-no-touch 2025-08-22 15:16:30 +02:00
Nasimovy
c1e6fa4432
Merge branch 'master' into T-beam-display-no-touch 2025-08-19 19:18:30 +02:00
Nasimovy
c22eed900a
Merge branch 'master' into T-beam-display-no-touch 2025-08-17 15:35:52 +02:00
Nasimovy
673cf48eb6 made changes to detection because it was completely wrong, CST226SE has 2 posible adresses 2025-08-17 15:35:11 +02:00
Nasimovy
5286a5abc0
Merge branch 'master' into T-beam-display-no-touch 2025-08-17 10:24:35 +02:00
Nasimovy
a78baa7d40
Merge branch 'master' into T-beam-display-no-touch 2025-08-15 10:19:00 +02:00
Nasimovy
21c35089d3
Update src/configuration.h
typo

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-14 13:30:59 +02:00
Nasimovy
ce96f47931
Merge branch 'master' into T-beam-display-no-touch 2025-08-14 10:12:06 +02:00
Nasimovy
5092949810
Merge branch 'master' into T-beam-display-no-touch 2025-08-10 09:25:16 +02:00
Nasimovy
c06575e3df
Merge branch 'master' into T-beam-display-no-touch 2025-08-06 14:08:35 +02:00
Nasimovy
755be93796 test identification of CST226 and CST328 2025-08-03 15:18:29 +02:00
Nasimovy
6c8790dd6a update branch to reflect changes 2025-08-03 14:42:46 +02:00
Nasimovy
1baf5d2ab8
Merge branch 'master' into T-beam-display-no-touch 2025-07-21 15:59:35 +02:00
Nasimovy
70522aea09 Merge remote-tracking branch 'origin/master' into T-beam-display-no-touch 2025-07-20 10:52:05 +02:00
Nasimovy
b247ec82b3
Merge branch 'master' into T-beam-display-no-touch 2025-07-14 21:45:19 +02:00
Nasimovy
ac31dc7760
Merge branch 'master' into T-beam-display-no-touch 2025-07-14 19:49:19 +02:00
Nasimovy
90f6458926
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-07-14 14:24:05 +02:00
Nasimovy
71e8fa3dd4 update to screen.cpp 2025-07-14 13:28:15 +02:00
Nasimovy
2903ec62a1 Merge remote-tracking branch 'origin/master' into T-beam-display-no-touch 2025-07-14 10:30:08 +02:00
Nasimovy
bd30f35a21
Merge branch 'master' into T-beam-display-no-touch 2025-07-08 13:18:47 +02:00
Nasimovy
6a06c9f9ac
Merge branch 'master' into T-beam-display-no-touch 2025-07-02 13:36:36 +02:00
Nasimovy
ca279c81d9
Merge branch 'master' into T-beam-display-no-touch 2025-06-28 19:57:17 +02:00
Nasimovy
264bdf6e57
Merge branch 'master' into T-beam-display-no-touch 2025-06-28 11:21:11 +02:00
Nasimovy
b6eba7f3c3 revert changes of settings.json 2025-06-28 09:57:13 +02:00
Nasimovy
d83b62c0c6
Merge branch 'master' into T-beam-display-no-touch 2025-06-27 08:03:30 +02:00
Nasimovy
fc6857cef5
Merge branch 'master' into T-beam-display-no-touch 2025-06-26 16:35:52 +02:00
Nasimovy
01518a4387
Merge branch 'master' into T-beam-display-no-touch 2025-06-25 21:53:30 +02:00
Nasimovy
7b365b7b3d removed is pressed + interrupt 2025-06-25 20:44:13 +02:00
Nasimovy
2abcdb7ea7 add USE_ST7796 to missing places 2025-06-22 15:37:40 +02:00
Nasimovy
8b4a899150 Merge remote-tracking branch 'origin/master' into T-beam-display-no-touch 2025-06-22 14:51:17 +02:00
Nasimovy
2bed52a37e removal of H file line 2025-06-22 14:19:34 +02:00
Nasimovy
273e480ebe using the original touchscreen implementation 2025-06-22 14:12:52 +02:00
Nasimovy
b761dcb1a6
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-06-15 19:51:28 +02:00
Nasimovy
6d51e88ecb
Merge branch 'master' into T-beam-display-no-touch 2025-06-13 11:41:10 +02:00
Thomas Göttgens
28a29938bc
Merge branch 'master' into T-beam-display-no-touch 2025-06-05 14:37:28 +02:00
Nasimovy
235eb66b0a
Merge branch 'master' into T-beam-display-no-touch 2025-05-29 06:58:23 +02:00
Nasimovy
8d449e5016
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-28 15:27:36 +02:00
Nasimovy
aa7469bf66
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-27 16:50:26 +02:00
Ben Meadors
1e4bf271f8
Merge branch 'master' into T-beam-display-no-touch 2025-05-26 07:37:05 -05:00
Nasimovy
46f8939a6f
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-26 06:58:20 +02:00
Nasimovy
00a96f39d1 spi speed increase of the display 2025-05-26 06:55:19 +02:00
Nasimovy
ce8298c056 add SCREEN_TRANSITION_FRAMERATE 5 2025-05-26 06:48:18 +02:00
Nasimovy
10cb204e17
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-25 20:17:36 +02:00
Nasimovy
7ee0c2163c revert speed increase CPU 2025-05-25 20:13:30 +02:00
Nasimovy
0dcc6baffc Merge remote-tracking branch 'origin/master' into T-beam-display-no-touch 2025-05-25 16:44:00 +02:00
Nasimovy
ca176bc5e8 undo 2025-05-25 16:39:57 +02:00
Nasimovy
08301c793f resolve conflicts 2025-05-25 16:32:19 +02:00
Nasimovy
ef0fb49da3 display speed x10 2025-05-25 15:46:05 +02:00
Thomas Göttgens
2d5f8a92f6
Typo
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-25 00:53:05 +02:00
Thomas Göttgens
5ef961dbdb
Correct spelling
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-25 00:52:50 +02:00
Nasimovy
20f3c6f0f5
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-24 12:48:02 +02:00
Nasimovy
c37fe24987
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-23 19:50:03 +02:00
Nasimovy
7e8845fc15 removed baudrate of 115200 and some commented out code 2025-05-23 19:48:17 +02:00
Nasimovy
f6dedcbc02 changed display library to meshtastic org 2025-05-22 21:01:35 +02:00
Nasimovy
658a5077da
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-22 19:12:22 +02:00
Nasimovy
80a750d3c3
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-18 11:40:02 +02:00
Nasimovy
873788ea27 revert NIMble 2025-05-16 20:59:43 +02:00
Nasimovy
c1bd6c4c34
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-16 20:26:32 +02:00
Thomas Göttgens
9143540825
Merge branch 'master' into T-beam-display-no-touch 2025-05-13 21:36:22 +02:00
nasimovy
22151cfe6f Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy/meshtastic-firmware into T-beam-display-no-touch 2025-05-13 12:36:21 +00:00
nasimovy
9005703667 fmt 2025-05-13 12:35:58 +00:00
Nasimovy
95160c436e
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-13 08:44:18 +02:00
Nasimovy
97c3673eba
Merge branch 'master' into T-beam-display-no-touch 2025-05-10 09:06:14 +02:00
Nasimovy
8346ab4d86
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-05-06 13:07:27 +02:00
Nasimovy
00f623a488
Merge branch 'master' into T-beam-display-no-touch 2025-04-30 12:05:17 +02:00
Nasimovy
7da03560b3
Merge branch 'master' into T-beam-display-no-touch 2025-04-29 10:08:05 +02:00
Nasimovy
680ea1c340
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-04-27 13:04:18 +02:00
nasimovy
addd294d24 remove debug + add fixed baudrate for gps 2025-04-23 12:57:31 +00:00
nasimovy
77b972c5f8 Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy/meshtastic-firmware into T-beam-display-no-touch 2025-04-23 10:19:28 +00:00
nasimovy
a72e02b844 reverted the revert #6640 + increased speed, bleutooth is stable now on reconnection cold booth etc , GPS is still not working though 2025-04-23 10:19:15 +00:00
Nasimovy
aad4cbd3c6
Merge branch 'master' into T-beam-display-no-touch 2025-04-22 19:37:59 +00:00
nasimovy
a5ef03bc7e removed debug lines, disabled bluetooth for now because of stack smashing protect failure 2025-04-21 18:19:44 +00:00
nasimovy
c11e1809db cleanup + addition of defines for on screen keyboard and canned message module 2025-04-21 16:18:22 +00:00
Nasimovy
97a1a42940
Merge branch 'master' into T-beam-display-no-touch 2025-04-20 20:45:18 +00:00
nasimovy
ffe9728782 swap XY+ mirror X 2025-04-20 17:29:06 +00:00
nasimovy
3145061cae working touchscreen but gestures not moving display 2025-04-20 15:41:20 +00:00
nasimovy
ffa5476be3 it works.... is pressed was not working properly 2025-04-20 13:13:26 +00:00
nasimovy
71bc0098e9 revert to working example? 2025-04-20 10:08:49 +00:00
nasimovy
6fc13208d4 Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy/meshtastic-firmware into T-beam-display-no-touch 2025-04-20 08:33:19 +00:00
nasimovy
15c2094bf9 add -1 functionality for touch IRQ 2025-04-20 08:32:57 +00:00
Nasimovy
e7e1a20292
Merge branch 'master' into T-beam-display-no-touch 2025-04-20 06:45:16 +00:00
nasimovy
f30f5281c1 i broke it , dont know how to fix at the moment will investigate 2025-04-19 21:28:34 +00:00
nasimovy
f5c3e77a60 changed to sensorlib 0.3.1 2025-04-19 20:48:06 +00:00
nasimovy
0f1e528b20 further testing 2025-04-19 15:43:55 +00:00
nasimovy
cb14fc3b9d testing touchscreen code 2025-04-19 13:22:15 +00:00
nasimovy
43978af62b trunk fmt 2025-04-18 09:21:46 +00:00
Nasimovy
e0d6fce99d
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-04-18 09:06:35 +00:00
Thomas Göttgens
ab35668d42
Merge branch 'master' into T-beam-display-no-touch 2025-04-17 22:43:02 +02:00
nasimovy
2f15fbae63 Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy/meshtastic-firmware into T-beam-display-no-touch 2025-04-17 18:50:02 +00:00
nasimovy
3d8d6ef31f refelct changes? 2025-04-17 18:49:46 +00:00
Nasimovy
d55e3bf034
Merge branch 'master' into T-beam-display-no-touch 2025-04-17 04:45:29 +00:00
nasimovy
a69c489acf cleanup of redundant code 2025-04-16 18:49:53 +00:00
nasimovy
7867cf5590 try higher speeds + HSPI 2025-04-16 17:36:58 +00:00
nasimovy
b10af5b659 modified variant.h and merged ini file+testing on lower spi frequency for the lora module, display shield pumps out EMI? 2025-04-16 11:50:45 +00:00
nasimovy
60ee8ead63 Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy/meshtastic-firmware into T-beam-display-no-touch 2025-04-16 10:03:13 +00:00
nasimovy
020e44d856 changed variant name to tbeam-displayshield 2025-04-16 10:01:56 +00:00
nasimovy
e0bb76261b even slower speeds.... 2025-04-16 11:33:15 +02:00
nasimovy
acc0cfe773 added SPI Speed to constructor+ cleaned up variant.h 2025-04-16 11:33:15 +02:00
nasimovy
f5e3acb8c2 lowered speeds to 1/4 2025-04-16 11:33:15 +02:00
nasimovy
ee95455e22 forgot the simple scan case 2025-04-16 11:33:15 +02:00
nasimovy
f7f5466dff seperated from tbeam 2025-04-16 11:33:15 +02:00
nasimovy
0418568653 changes to get display centered+lib update 2025-04-16 11:33:15 +02:00
nasimovy
9efdf8bb57 add ST7796 2025-04-16 11:33:15 +02:00
nasimovy
e145e10423 even slower speeds.... 2025-04-15 19:49:51 +00:00
nasimovy
8c2e72703a added SPI Speed to constructor+ cleaned up variant.h 2025-04-15 16:45:44 +00:00
nasimovy
7f5e988817 lowered speeds to 1/4 2025-04-14 21:07:35 +00:00
nasimovy
7920110444 Merge branch 'T-beam-display-no-touch' of https://github.com/Nasimovy/meshtastic-firmware into T-beam-display-no-touch 2025-04-13 08:57:01 +00:00
nasimovy
d454a44086 forgot the simple scan case 2025-04-13 08:52:59 +00:00
Nasimovy
9de6340af1
Merge branch 'meshtastic:master' into T-beam-display-no-touch 2025-04-13 08:31:21 +00:00
nasimovy
cd438a8534 seperated from tbeam 2025-04-13 08:20:59 +00:00
nasimovy
251c006712 changes to get display centered+lib update 2025-04-12 16:31:22 +00:00
nasimovy
f7bc4d82c7 add ST7796 2025-04-12 12:59:09 +00:00
Nasimovy
eb48defde1
Merge branch 'meshtastic:master' into T-beam-display-different-driver 2025-04-12 10:56:49 +00:00
nasimovy
f55e855887 Merge branch 'master' of https://github.com/Nasimovy/meshtastic-firmware 2025-04-09 16:05:43 +00:00
nasimovy
3743269721 Merge branch 'master' of https://github.com/Nasimovy/meshtastic-firmware 2025-04-04 13:31:22 +00:00
nasimovy
d72e908046 remove duplicate HAS_LP5562 introduced by #6422 2025-04-04 13:30:31 +00:00
15 changed files with 170 additions and 25 deletions

View File

@ -2,7 +2,7 @@
[portduino_base]
platform =
# renovate: datasource=git-refs depName=platform-native packageName=https://github.com/meshtastic/platform-native gitBranch=develop
https://github.com/meshtastic/platform-native/archive/37d986499ce24511952d7146db72d667c6bdaff7.zip
https://github.com/meshtastic/platform-native/archive/c490bcd019e0658404088a61b96e653c9da22c45.zip
framework = arduino
build_src_filter =

View File

@ -235,7 +235,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Touchscreen
// -----------------------------------------------------------------------------
#define FT6336U_ADDR 0x48
#define CST328_ADDR 0x1A
#define CST328_ADDR 0x1A // same address as CST226SE
#define CST226SE_ADDR_ALT 0x5A
// -----------------------------------------------------------------------------
// RAK12035VB Soil Monitor (using RAK12023 up to 3 RAK12035 monitors can be connected)

View File

@ -80,7 +80,8 @@ class ScanI2C
LTR553ALS,
BHI260AP,
BMM150,
DRV2605
DRV2605,
CST226SE
} DeviceType;
// typedef uint8_t DeviceAddress;

View File

@ -468,7 +468,18 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
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(PCT2075_ADDR, PCT2075, "PCT2075", (uint8_t)addr.address);
SCAN_SIMPLE_CASE(CST328_ADDR, CST328, "CST328", (uint8_t)addr.address);
case CST328_ADDR:
// Do we have the CST328 or the CST226SE
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xAB), 1);
if (registerValue == 0xA9) {
type = CST226SE;
logFoundDevice("CST226SE", (uint8_t)addr.address);
} else {
type = CST328;
logFoundDevice("CST328", (uint8_t)addr.address);
}
break;
SCAN_SIMPLE_CASE(LTR553ALS_ADDR, LTR553ALS, "LTR553ALS", (uint8_t)addr.address);
SCAN_SIMPLE_CASE(BHI260AP_ADDR, BHI260AP, "BHI260AP", (uint8_t)addr.address);
SCAN_SIMPLE_CASE(SCD4X_ADDR, SCD4X, "SCD4X", (uint8_t)addr.address);
@ -478,8 +489,12 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
#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) {
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 {

View File

@ -281,7 +281,7 @@ static int8_t prevFrame = -1;
// Combined dynamic node list frame cycling through LastHeard, HopSignal, and Distance modes
// Uses a single frame and changes data every few seconds (E-Ink variant is separate)
#if defined(ESP_PLATFORM) && defined(USE_ST7789)
#if defined(ESP_PLATFORM) && (defined(USE_ST7789) || defined(USE_ST7796))
SPIClass SPI1(HSPI);
#endif
@ -313,7 +313,18 @@ 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(&SPI1, 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(&SPI1, ST7796_RESET, ST7796_RS, ST7796_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);
#endif
#if defined(USE_ST7789)
static_cast<ST7789Spi *>(dispdev)->setRGB(TFT_MESH);
#elif defined(USE_ST7796)
static_cast<ST7796Spi *>(dispdev)->setRGB(TFT_MESH);
#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);
@ -415,6 +426,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
@ -449,6 +469,21 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
nrf_gpio_cfg_default(ST7789_NSS);
#endif
#endif
#ifdef USE_ST7796
SPI1.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);
@ -491,6 +526,10 @@ void Screen::setup()
// Apply custom RGB color (e.g. Heltec T114/T190)
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
// === Initialize display and UI system ===
ui->init();
@ -554,6 +593,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
@ -586,7 +627,7 @@ void Screen::setup()
touchScreenImpl1->init();
}
}
#elif HAS_TOUCHSCREEN && !defined(USE_EINK)
#elif HAS_TOUCHSCREEN && !defined(USE_EINK) && !HAS_CST226SE
touchScreenImpl1 =
new TouchScreenImpl1(dispdev->getWidth(), dispdev->getHeight(), static_cast<TFTDisplay *>(dispdev)->getTouch);
touchScreenImpl1->init();

View File

@ -81,6 +81,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>

View File

@ -73,7 +73,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(ILI9488_CS) || defined(ST7796_CS)) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS) || defined(USE_ST7796)) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
// The screen is bigger so use bigger fonts
#define FONT_SMALL FONT_MEDIUM_LOCAL // Height: 19

View File

@ -95,7 +95,8 @@ void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16
(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(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) || \
ARCH_PORTDUINO) && \
defined(USE_ST7796) || \
ARCH_PORTDUINO) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 12,
8, imgQuestionL1);
@ -107,7 +108,7 @@ void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, 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(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS)) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) || defined(USE_ST7796)) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 16,
8, imgSFL1);
@ -123,7 +124,8 @@ void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16
// 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(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) || \
ARCH_PORTDUINO) && \
defined(USE_ST7796) || \
ARCH_PORTDUINO) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8,
imgInfoL1);

View File

@ -194,7 +194,7 @@ void UIRenderer::drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const mes
}
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS)) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) || defined(USE_ST7796)) && \
!defined(DISPLAY_FORCE_SMALL_FONTS)
if (isHighResolution) {

View File

@ -27,8 +27,7 @@ const uint8_t bluetoothConnectedIcon[36] PROGMEM = {0xfe, 0x01, 0xff, 0x03, 0x03
0xfe, 0x31, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0x3f, 0xe0, 0x1f};
#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(ILI9488_CS) || defined(ST7796_CS) || \
ARCH_PORTDUINO) && \
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(USE_ST7796) || defined(ST7796_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};

View File

@ -876,7 +876,7 @@ void setup()
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
#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(ILI9488_CS) || defined(ST7796_CS)
defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) || defined(USE_ST7796)
screen = new graphics::Screen(screen_found, screen_model, screen_geometry);
#elif defined(ARCH_PORTDUINO)
if ((screen_found.port != ScanI2C::I2CPort::NO_I2C || settingsMap[displayPanel]) &&
@ -1139,7 +1139,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(ILI9488_CS) || defined(ST7796_CS)
defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) || defined(USE_ST7796)
if (screen)
screen->setup();
#elif defined(ARCH_PORTDUINO)

View File

@ -663,7 +663,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(ILI9488_CS) || defined(ST7796_CS)
defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) || 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);

View File

@ -0,0 +1,43 @@
#include "configuration.h"
#ifdef HAS_CST226SE
#include "TouchDrvCSTXXX.hpp"
#include "input/TouchScreenImpl1.h"
#include <Wire.h>
TouchDrvCSTXXX tsPanel;
static constexpr uint8_t PossibleAddresses[2] = {CST328_ADDR, CST226SE_ADDR_ALT};
uint8_t i2cAddress = 0;
bool readTouch(int16_t *x, int16_t *y)
{
int16_t x_array[1], y_array[1];
uint8_t touched = tsPanel.getPoint(x_array, y_array, 1);
if (touched > 0) {
*y = x_array[0];
*x = (TFT_WIDTH - y_array[0]);
// Check bounds
if (*x < 0 || *x >= TFT_WIDTH || *y < 0 || *y >= TFT_HEIGHT) {
return false;
}
return true; // Valid touch detected
}
return false; // No valid touch data
}
void lateInitVariant()
{
tsPanel.setTouchDrvModel(TouchDrv_CST226);
for (uint8_t addr : PossibleAddresses) {
if (tsPanel.begin(Wire, addr, I2C_SDA, I2C_SCL)) {
i2cAddress = addr;
LOG_DEBUG("CST226SE init OK at address 0x%02X", addr);
touchScreenImpl1 = new TouchScreenImpl1(TFT_WIDTH, TFT_HEIGHT, readTouch);
touchScreenImpl1->init();
return;
}
}
LOG_ERROR("CST226SE init failed at all known addresses");
}
#endif

View File

@ -4,13 +4,23 @@ extends = esp32_base
board = ttgo-t-beam
board_level = pr
board_check = true
lib_deps =
${esp32_base.lib_deps}
build_flags =
${esp32_base.build_flags}
lib_deps = ${esp32_base.lib_deps}
build_flags = ${esp32_base.build_flags}
-D TBEAM_V10
-I variants/esp32/tbeam
-DGPS_POWER_TOGGLE ; comment this line to disable double press function on the user button to turn off gps entirely.
-DBOARD_HAS_PSRAM
-D GPS_POWER_TOGGLE ; comment this line to disable double press function on the user button to turn off gps entirely.
-D BOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
upload_speed = 921600
[env:tbeam-displayshield]
extends = env:tbeam
build_flags =
${env:tbeam.build_flags}
-D USE_ST7796
lib_deps =
${env:tbeam.lib_deps}
https://github.com/meshtastic/st7796/archive/refs/tags/1.0.5.zip ; display addon
lewisxhe/SensorLib@0.3.1 ; touchscreen addon

View File

@ -42,4 +42,35 @@
#define GPS_UBLOX
#define GPS_RX_PIN 34
#define GPS_TX_PIN 12
// #define GPS_DEBUG
// #define GPS_DEBUG
// Used when the display shield is chosen
#ifdef USE_ST7796
#undef EXT_NOTIFY_OUT
#undef LED_STATE_ON
#undef LED_PIN
#define HAS_CST226SE 1
#define HAS_TOUCHSCREEN 1
// #define TOUCH_IRQ 35 // broken in this version of the lib 0.3.1
#ifndef TOUCH_IRQ
#define TOUCH_IRQ -1
#endif
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define USE_VIRTUAL_KEYBOARD 1
#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 60000000
#define TFT_HEIGHT 222
#define TFT_WIDTH 480
#define BRIGHTNESS_DEFAULT 100 // Medium Low Brightness
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
#endif