fix: restore tft.setSwapBytes(true) to correct RGB565 icon color rendering
This commit is contained in:
parent
68fb7d4b7c
commit
c8affde099
2 changed files with 4 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ float ecu_off_volt = factoryECUOff; // turn engine off if voltage lower
|
|||
|
||||
// Draw parameter icon for 4-quadrant view, individually scaled to sit exactly 5px from the arc
|
||||
void drawPidIcon(int x, int y, const String &pidStr) {
|
||||
tft.setSwapBytes(true);
|
||||
if (pidStr == "0105") {
|
||||
tft.pushImage(x, y, 38, 37, icon_temp_quad, TFT_BLACK);
|
||||
} else if (pidStr == "010D") {
|
||||
|
|
@ -60,6 +61,7 @@ void drawPidIcon(int x, int y, const String &pidStr) {
|
|||
|
||||
// Draw header icon (42x42 px, ~30% larger) for full screen mode
|
||||
void drawPidIconHeader(int x, int y, const String &pidStr) {
|
||||
tft.setSwapBytes(true);
|
||||
if (pidStr == "0105") {
|
||||
tft.pushImage(x, y, 42, 42, icon_temp_42, TFT_BLACK);
|
||||
} else if (pidStr == "010D") {
|
||||
|
|
|
|||
|
|
@ -244,6 +244,8 @@ void setup() {
|
|||
touch_calibrate(); // initialize / load touch calibration
|
||||
//testTouch();//test touchscreen
|
||||
|
||||
tft.setSwapBytes(true); // to display correct image colors
|
||||
|
||||
// Eliminar cualquier imagen splash de inicio/bluetooth de SPIFFS
|
||||
if (SPIFFS.begin(true)) {
|
||||
if (SPIFFS.exists("/vaandcob.jpg")) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue