Replies: 10 comments
-
How is this an issue? :-) Now doing stuff on release of buttons just requires to shuffle things around in the state machine.
As there are no extra events for "touch up" and the tag-value just falls back to zero, When the tag-value returns to zero the toggle_lock is cleared and if the button had been touched before it is And I threw in something new, reading REG_TOUCH_RAW_XY. |
Beta Was this translation helpful? Give feedback.
-
And I just noticed that I forgot to set toggle_lock in "case 10". |
Beta Was this translation helpful? Give feedback.
-
Hello, You are right it is not an issue, I am new to GitHub and I posted this topic in the wrong "folder", my bad. Thank you very much for your fast and useful answer! Though I have two other questions, as I am developing a GUI, I am wondering if it is possible for the buttons to flatten (256 => EVE_OPT_FLAT) while they get pressed, and to return to 0 (3D mode) when the finger is removed from the button? My other question is about pictures/icons, I managed to display icons on my screen by converting them to .hex and adding them to my tft_data.c, and I gave them the correct address (btw, I'm not sure what is the "limit address" when it comes to writing pictures into the memory, but I assume the limit is 0x000F FFFF. Let me know if the final address is wrong) I have several TFT_display() functions, and when I try to display the icons on several of those functions, only the first-called function displays the icons correctly. All the other ones display a black square.
|
Beta Was this translation helpful? Give feedback.
-
No worries, the "Discussions" feature still is fairly new and it's not like I am drowning in issues. :-)
Sure, just set a flag when the button is detected as touched and reset it with release of the button.
This is RAM_G so the range is 0x00000 to 0xFFFFF.
So you are using image files instead of already converted data, if these are PNG, well. :-)
That is not quite correct as 4608 bytes is 0x1200 so your memory overlaps. |
Beta Was this translation helpful? Give feedback.
-
You were right, I did manage to flatten the button while it is pressed with a flag depending on the "touchtest"'s value. About the images, I simply convert .jpg to hexadecimal values, and I create a constant in tft_data.c to which I give the hex matrix. But am I wrong using "EVE_cmd_loadimage" ? I corrected the memory overlap between the two images, but it still displays black images when I call another display function :/ |
Beta Was this translation helpful? Give feedback.
-
No, this is fine, there would be an issue with PNG images.
Try to put these somewhere else, like 0x0000 and 0x2000. |
Beta Was this translation helpful? Give feedback.
-
Yes you are right, I have used that EVE Asset Builder and it does convert the images in hex quite well. Regarding the images, I changed their addresses, but it is still the same. Even when I am only trying to display one image, everything is fine when calling the first "display function" (TFT_Display_Main), but when I call any other display function, I get that black square. |
Beta Was this translation helpful? Give feedback.
-
Please reduce the code to a bare minimum that shows the issue and then attach the tft and tft_data files. I noticed something else though: void TFT_display_main(void) //First "display function" to be called void TFT_display_protocol(void) Why are you running initStaticBackground() with your display functions? Or well, remove that entirely when SPI traffic is not an issue and send everything every time. |
Beta Was this translation helpful? Give feedback.
-
Hello, I finally found the issue with the pictures turning black! I used to call this function to change the color of my font, as you can see, the word "Main" was white at first, and then black, and the picture was affected by this change as well. And to solve the issue, we simply need to write the same function right before calling the image, but we need to change the parameter from "BLACK" to "WHITE" |
Beta Was this translation helpful? Give feedback.
-
Oh, yes indeed, COLOR_RGB is used to modify images. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am using a FT813 Development Module with 5.0 inch WVGA TFT LCD (800x480p Capacitive) and I am developing a GUI on that screen.
The problem is that I am trying to trigger the buttons on the screen only when I remove my finger from the screen (on a rising edge).
But, so far, I am not able to do so, as they only trigger when I press.
Although I spotted that in the "Calibration" demo, all 3 buttons that appear on the screen (one after the other) are only triggered once my finger has been removed from the screen. And even after having a look at the code that runs the Calibration demo, I can't figure out how to do so.
Thank you in advance.
Here is some of the code that I am using (in case it could help) :
in void TFT_display(void):
in void TFT_touch(void):
Beta Was this translation helpful? Give feedback.
All reactions