Go Down

Topic: setAddrWindow)_ (Read 674 times) previous topic - next topic

smarthings

Hi,
I'm using MCUFRIEND_kbv library to control my 3.5 inch tft module.
I'm having troubles drawing shapes in colors other than white and black.
for an example, i attached a picture for what i get (for a red rectangle).
So, after digging the library i came across a function called setAddrWindow and i can't figure what is it that it do.

So, my general question is what that functios does?
another question is if someone know how to fix that bug.

by the way, i managed to draw shapes by using drawPixel function, but its too slow and the user can see the drawing proccess

david_prentice

Look at the graphictest_kbv sketch.   Use ctrl-F to search for "setAddrWindow"
Most users will never need it.

I can't see your picture.
If you want a solid Red rectangle,  you use fillRect()
If you just want an outline, you use drawRect()

Likewise with circles, triangles, ...
You build complex shapes by drawing the primitive graphics like line, rectangle, circle, ...

David.

smarthings

Hi,
I'm using MCUFRIEND_kbv library to control my 3.5 inch tft module.
I'm having troubles drawing shapes in colors other than white and black.
for an example, this is what i get (for a red rectangle):



So, after digging the library i came across a function called setAddrWindow and i can't figure what is it that it do.

So, my general question is what that functios does?
another question is if someone know how to fix that bug.

by the way, i managed to draw shapes by using drawPixel function, but its too slow and the user can see the drawing proccess

smarthings

Hi,
I accidently post the same post twice.
Using the functions you have mentioned, i get shapes that looks like that:


david_prentice

What library version do you have?

Update your library with the Library Manager.

It looks like you have a 9488_555 display.

David.

smarthings

Ok
Tomorrow morning I'll try and  post here the result
Thanks

Coding Badly

I accidently post the same post twice.
Use Report to moderator.

Threads merged.


smarthings

Ok
Tomorrow morning I'll try and  post here the result
Thanks
I have updated the library and the problem is gone. Thank you very much.

Use Report to moderator.

Threads merged.


Sorry, I didn't know that. Learned for next time. thanks

david_prentice

Which old library version did you have?

Was my  guess correct?  i.e. ID = 0x9488 (9488_555 hardware problem)

David.

smarthings

I don't know the ID, but this is the file name: MCUFRIEND_kbv-2.9.3

david_prentice

The library version would have been v2.9.3
The controller ID is reported on the Serial Terminal with most of my examples.

David.

smarthings

So, after deleting the library and install the old one, you were right! it was ID = 0x9488.  :)

Go Up