Teensy 4.0 > Sprite > Colors wrong #2753
Replies: 1 comment 2 replies
-
#include <TFT_eSPI.h> // Include the graphics library (this includes the sprite functions) TFT_eSPI tft = TFT_eSPI(); // Create object "tft" int colourcheck1 = 0; int coY=0; } // -------------------------------------------------------------------------
colourcheck1++; } |
Beta Was this translation helpful? Give feedback.
-
I'm having color problems with Teensy 4.0 & sprites only - everything works great with direct write.
I int sprite with:
sprR.setColorDepth(16);
sprR.setSwapBytes(true);
sprR.createSprite(196, 75);
then push sprite with:
if (fft1024R.available() == true) {
sprR.fillSprite(TFT_BLACK);
for (int i = 1; i < 182; i++) {
int index = i / 2 + 1;
int dta = constrain((fft1024R.read(index) + fft1024R.read(index + 1)) * 256.0, 0, 31);
sprR.drawLine(i + 6, 32 + dta, i + 6, 32 - dta, TFT_BLUE);
}
sprR.pushSprite(_c2, _r1);
}
TFT_BLUE comes out as TFT_GREEN. In other tests TFT_GREEN comes out as TFT_RED
Changing setSwapBytes() has no effect. I suspect its something to do with the Teensy Arm chip being handled as generic in the library.
Beta Was this translation helpful? Give feedback.
All reactions