You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple program that uses your library. It makes it very simple to display text and basic shapes, thank you for contributing this. Every once in a while it seems something writes all over the memory of my application with values like 0xff or 0x00.
I have some code that adjusts my internally managed X and Y offsets on a timer. So the displayed image is shifted by a few pixels all over the screen very slowly. This is meant to avoid burn in of the display.
I have been trying to understand this problem and was doing some basic code review of your code and noticed what seems like an error in your Y Axis bounds checking
If I make a call like GLCD_GotoX(255) it will just do nothing.
But I call GLCD_GotoY(255) the first call checks the existing value __GLCD.Y against the maximum height. It then sets __GLCD.Y = 255. Now __GLCD.Y is stuck at too large of a value. Presumably now the graphics library is just writing all over the SRAM of my device.
I think the check in GLCD_GotoY should be if ( Y < __GLCD_ScreenHeight). Do you agree?
Eric
The text was updated successfully, but these errors were encountered:
Hello,
I have a simple program that uses your library. It makes it very simple to display text and basic shapes, thank you for contributing this. Every once in a while it seems something writes all over the memory of my application with values like 0xff or 0x00.
I have some code that adjusts my internally managed X and Y offsets on a timer. So the displayed image is shifted by a few pixels all over the screen very slowly. This is meant to avoid burn in of the display.
I have been trying to understand this problem and was doing some basic code review of your code and noticed what seems like an error in your Y Axis bounds checking
My screen height and width are less than 255.
If I make a call like
GLCD_GotoX(255)
it will just do nothing.But I call
GLCD_GotoY(255)
the first call checks the existing value__GLCD.Y
against the maximum height. It then sets__GLCD.Y = 255
. Now__GLCD.Y
is stuck at too large of a value. Presumably now the graphics library is just writing all over the SRAM of my device.I think the check in
GLCD_GotoY
should beif ( Y < __GLCD_ScreenHeight)
. Do you agree?Eric
The text was updated successfully, but these errors were encountered: