long touch detect on STM32L4R9AI-eval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-26 5:22 AM
hello...
I am working on STM32L4R9AI-EVAL board..i want to detect the long touch..means in one screen if i do long touch it has to go to the other screen...I need deep explanation
how do i do this ....any example code
thank you
Solved! Go to Solution.
- Labels:
-
STM32L4 Series
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-06 6:03 AM
It was not done using the Designer, it's a class completely written by the programmer. Therefore, you will not see it in the Designer but only when you run the application. Every custom widget you create will not be displayed in the Designer.
customButtonContainer is an arbitrary name you can call it whatever you want.
/Alexandre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-09 12:53 AM
This a new file you have added into project ...or you have modified any existing file....
please mention where your doing it....and what is the result so that i can modify according to my application...
Thank you..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-09 3:45 AM
The customButtonContainer .hpp file is a completely added file. It is not generated by TouchGFX Designer.
It is added to [your project directory]/gui/include/gui/common/
/Alexandre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-09 5:25 AM
Thank you so much Alexandre RENOUX .....Glad it's working fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-11 2:09 AM
Hi @prathima​
You can also detect long touch in handleTickEvent if You use flexButton with Touch trigger.
Then You can detect how long is pressed the button.
Pseudocode:
bool btTouched;
uint32_t timeTouched; // variable for long touch time measurment
void buttonClicked() { // virtual function declared in TouchGFX designer
btTouched = true;
timeTouched = 0;
}
void screenView::handleTickEvent() {
if(myFlexButton.getPressed()) timeTouched += 16; // every tick has around 16ms
if(timeTouched>500 && btTouched) {
btTouched = false; // avoid retriggering
// do anything when 500ms elapsed
}
Regards,
R. Gajda
}

- « Previous
-
- 1
- 2
- Next »