Pensive
Well-known member
Hi all
Wondering if there might be any obvious reason for the following:
I'm using the t3 tft library
And I'm repeatedly blitting the attached .C file to the screen - every time the xbox360 joystick settings change in any way (so yes -this is a lot of frames when you are using analogue).
I'm using absolute positioning coordinates - i added the setCursor in case that had something to do with it but it doesnt.
1) I've checked the resolution of the PNG image file - it's correct - 240x161
2) The export from this website always needs the last few pixels added on large files but I've fixed it that so we have the correct number of pixels.
THE PROBLEM:
It should look like this:
But it flickers around and looks like this as the screen redraws - there doesnt seem to be any pattern to it that I can see:
Video here:
and it jitters around a lot as it updates. None of the other blitted images do this (although they are not blitte dto the screen quickly - they are written once when the tab changes.
I cant see what I've done wrong - it should be drawn in exactly the same place, the same way - every time. Anyone else had this? Is the pointer drifting somehow? The Y position is always fine it just seems to muddle up the X positioning. :-/ Anyone with a deeper understanding of the libraries have any insight?
Thanks
Jon
Wondering if there might be any obvious reason for the following:
I'm using the t3 tft library
Code:
#include "SPI.h"
#include "ILI9341_t3.h"
#include "font_Arial.h"
#include <XPT2046_Touchscreen.h>
#include <USBHost_t36.h>
.
.
.
.
// TFT Screen
#define TFT_DC 9
#define TFT_CS 10
ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC);// Use hardware SPI (#13, #12, #11)
.
.
.
.
.
//Graphics includes
#include "joypadimage.c"
#include "unreallogo.c"
#include "carcinilogo.c"
#include "joypadTab.c"
#include "joypadTabIconBlue.c"
#include "joypadTabIconNoFocus.c"
#include "unrealTabIconBlue.c"
#include "unrealTabIconNoFocus.c"
#include "settingsfocus.c"
#include "settingsnofocus.c"
#include "homefocus.c"
#include "homenofocus.c"
#include "iofocus.c"
#include "ionofocus.c"
#include "terminalfocus.c"
#include "terminalnofocus.c"
And I'm repeatedly blitting the attached .C file to the screen - every time the xbox360 joystick settings change in any way (so yes -this is a lot of frames when you are using analogue).
I'm using absolute positioning coordinates - i added the setCursor in case that had something to do with it but it doesnt.
Code:
tft.setCursor(0, 0);
tft.writeRect(40, 70, 240, 161, (uint16_t*)joypad_Tab);
1) I've checked the resolution of the PNG image file - it's correct - 240x161
2) The export from this website always needs the last few pixels added on large files but I've fixed it that so we have the correct number of pixels.
THE PROBLEM:
It should look like this:
But it flickers around and looks like this as the screen redraws - there doesnt seem to be any pattern to it that I can see:
Video here:
and it jitters around a lot as it updates. None of the other blitted images do this (although they are not blitte dto the screen quickly - they are written once when the tab changes.
I cant see what I've done wrong - it should be drawn in exactly the same place, the same way - every time. Anyone else had this? Is the pointer drifting somehow? The Y position is always fine it just seems to muddle up the X positioning. :-/ Anyone with a deeper understanding of the libraries have any insight?
Thanks
Jon
Attachments
Last edited: