mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-02 03:45:46 +00:00
Merge pull request #1704 from meshtastic/ESPIDF-Rollup
ESP and TFT misc fixes
This commit is contained in:
commit
140250ef03
@ -36,8 +36,6 @@ lib_deps =
|
|||||||
lib_ignore =
|
lib_ignore =
|
||||||
segger_rtt
|
segger_rtt
|
||||||
ESP32 BLE Arduino
|
ESP32 BLE Arduino
|
||||||
platform_packages =
|
|
||||||
framework-arduinoespressif32
|
|
||||||
|
|
||||||
; leave this commented out to avoid breaking Windows
|
; leave this commented out to avoid breaking Windows
|
||||||
;upload_port = /dev/ttyUSB0
|
;upload_port = /dev/ttyUSB0
|
||||||
|
@ -32,13 +32,10 @@ lib_deps =
|
|||||||
h2zero/NimBLE-Arduino@1.4.0
|
h2zero/NimBLE-Arduino@1.4.0
|
||||||
arduino-libraries/NTPClient@^3.1.0
|
arduino-libraries/NTPClient@^3.1.0
|
||||||
https://github.com/lewisxhe/XPowersLib.git
|
https://github.com/lewisxhe/XPowersLib.git
|
||||||
|
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
segger_rtt
|
segger_rtt
|
||||||
ESP32 BLE Arduino
|
ESP32 BLE Arduino
|
||||||
platform_packages =
|
|
||||||
framework-arduinoespressif32@ 3.20004.220825
|
|
||||||
|
|
||||||
; customize the partition table
|
; customize the partition table
|
||||||
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
|
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
|
||||||
|
@ -22,13 +22,23 @@ void TFTDisplay::display(void)
|
|||||||
{
|
{
|
||||||
concurrency::LockGuard g(spiLock);
|
concurrency::LockGuard g(spiLock);
|
||||||
|
|
||||||
// FIXME - only draw bits have changed (use backbuf similar to the other displays)
|
uint16_t x,y;
|
||||||
// tft.drawBitmap(0, 0, buffer, 128, 64, TFT_YELLOW, TFT_BLACK);
|
|
||||||
for (uint16_t y = 0; y < displayHeight; y++) {
|
for (y = 0; y < displayHeight; y++) {
|
||||||
for (uint16_t x = 0; x < displayWidth; x++) {
|
for (x = 0; x < displayWidth; x++) {
|
||||||
// get src pixel in the page based ordering the OLED lib uses FIXME, super inefficent
|
// get src pixel in the page based ordering the OLED lib uses FIXME, super inefficent
|
||||||
auto isset = buffer[x + (y / 8) * displayWidth] & (1 << (y & 7));
|
auto isset = buffer[x + (y / 8) * displayWidth] & (1 << (y & 7));
|
||||||
tft.drawPixel(x, y, isset ? TFT_WHITE : TFT_BLACK);
|
auto dblbuf_isset = buffer_back[x + (y / 8) * displayWidth] & (1 << (y & 7));
|
||||||
|
if (isset != dblbuf_isset) {
|
||||||
|
tft.drawPixel(x, y, isset ? TFT_WHITE : TFT_BLACK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Copy the Buffer to the Back Buffer
|
||||||
|
for (y = 0; y < (displayHeight / 8); y++) {
|
||||||
|
for (x = 0; x < displayWidth; x++) {
|
||||||
|
uint16_t pos = x + y * displayWidth;
|
||||||
|
buffer_back[pos] = buffer[pos];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user