2024-08-05 3:14 AM - last edited on 2024-08-05 3:18 AM by Andrew Neil
Hello,
I'm currently learning how to use an STM32H7B3I-EVAL, I'm just starting out. I'm trying to debug a simple TouchGFX project with only a slider with STM32CubeIDE.
The problem is that when debugging I get a warning:
Warning: the current language does not match this frame.
set *(int *)0xE000EDFC=*(int *)0xE000EDFC|0x7F0I use : TouchGFX 4.20
CubeIDE 1.9
Does anyone have an explication please?
Solved! Go to Solution.
2024-08-09 4:48 AM
Yes, Swipe Container has a member function called getSelectedPage() that returns the page that is currently displayed.
You can use handleDragEvent(const DragEvent& Event) to detect when the container is swiped, so you can change your text. For instance:
void Screen1View::handleDragEvent(const DragEvent& Event)
{
Screen1ViewBase::handleDragEvent(Event);
uint8_t pageNumber = swipeContainer.getSelectedPage();
switch (pageNumber)
{
case 0:
//Update the text for the first page
break;
case 1:
//Update the text for the second page
break;
case 2:
//Update the text for the thrid page
break;
default:
break;
}
}I hope this helps you!
2024-08-06 6:14 AM
Hello @rozeelc,
I tried to replicate the project you have, but I didn't encounter the issue you mentioned.
Are you using the available TouchGFX Board Setup (TBS) for STM32H7B3I-Eval?
TBS for STM32H7B3I-Eval
I also noticed that in your debugger, no External Loader is selected. Do you still manage to start the debugger?
2024-08-07 5:25 AM - edited 2024-08-07 5:27 AM
Hello @Mohammad MORADI ESFAHANIASL ,
I'm sorry for the inconvenience. I managed to resolve the initial problem by selecting an External Loader. However, I now have another question and I hope you can help me.
I apologize if there are any errors, I am French.
I am working on creating a mixing console with 512 sliders. I have created a page with 8 sliders, and it is necessary to swipe to switch from one set of sliders to another. Above each slider, I want to display its value. My problem is that to display the value of the slider, I have to create a new interaction for each one.
I would like to know if TouchGFX can handle more than 512 interactions and if there is a simpler way to achieve what I want.
Thank you in advance for your help.
2024-08-07 5:50 AM
I'm glad you fixed the first issue :D
To have a better architecture for your GUI, I suggest creating a Custom Container that contains the slider and a text area to show its value, then you can easily control the interactions inside the container.
Then, you can place your custom container instances inside a Swipe Container to accommodate all of them in a container that supports multiple pages.
I hope this helps you achieve what you need.
2024-08-07 6:55 AM - edited 2024-08-07 6:55 AM
Thank you very much @Mohammad MORADI ESFAHANIASL for your help.
I don't see how to use the container to manage the slider and the variable. If I use a container I don't need interactions anymore? How can I use a container to change my variable according to my slider?
I'm sorry for all my questions, this is the first time I've used TouchGFX.
2024-08-08 2:18 AM
You're very welcome!
There are plenty of helpful materials such as tutorials and videos that teach about TouchGFX in the TouchGFX Academy.
Please refer to them especially Tutorial 4 and Tutorial 5, as they use Custom Containers.
Best regards,
2024-08-08 6:11 AM
Hello,
thank you for your answer, it helped me a lot.
I have another question. Do you know how to get the current page from "swipcontainer" so that I can change the text according to the current page?
Thank you in advance.
Best regards,
2024-08-09 4:48 AM
Yes, Swipe Container has a member function called getSelectedPage() that returns the page that is currently displayed.
You can use handleDragEvent(const DragEvent& Event) to detect when the container is swiped, so you can change your text. For instance:
void Screen1View::handleDragEvent(const DragEvent& Event)
{
Screen1ViewBase::handleDragEvent(Event);
uint8_t pageNumber = swipeContainer.getSelectedPage();
switch (pageNumber)
{
case 0:
//Update the text for the first page
break;
case 1:
//Update the text for the second page
break;
case 2:
//Update the text for the thrid page
break;
default:
break;
}
}I hope this helps you!
2024-08-12 12:19 AM - edited 2024-08-12 5:44 AM
Thank you for your help.
Do you know if there is a page limit with Swipecontainer? I'm stuck at 53 pages but I need to make 64.
Best regards,
2024-08-14 2:33 AM
You're very welcome,
There is no limit for the number of pages for the Swipe Container. What do you mean by 'being stuck at 53 pages'?
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.