Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uint8_t used instead of uint16_t incorrectly in GFX library #5

Open
hchahine opened this issue Aug 2, 2019 · 0 comments
Open

uint8_t used instead of uint16_t incorrectly in GFX library #5

hchahine opened this issue Aug 2, 2019 · 0 comments

Comments

@hchahine
Copy link

hchahine commented Aug 2, 2019

Within the ILI9341_GFX library, you've declared char and text functions as follows:

void ILI9341_Draw_Char(char Character, uint8_t X, uint8_t Y, uint16_t Colour, uint16_t Size, uint16_t Background_Colour);

void ILI9341_Draw_Text(const char* Text, uint8_t X, uint8_t Y, uint16_t Colour, uint16_t Size, uint16_t Background_Colour);

The X and Y variables can overflow and limit writing of text or characters all the way to the edge of the screen (especially in Horizontal screen mode). E.g. Max X or Y is only 256 while 240x320 screen can go past this to 320.

While this inadvertently allows text to rollover, which may be desirable in some cases, it limits performance of the library. There are better ways to write rollover feature if so desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant