2025-07-20 8:46 PM - last edited on 2025-07-22 1:00 AM by LouisB
I'm having trouble creating multiple screens, at the moment it has more than 5 screens and they all work fine with the code (void FrontendApplicationBase::gotoMainScreenNoTransition() ) but when I try to add another screen, TouchGFX doesn't generate the Transition declaration code for the screen new screen but and does not declare this in the FrontendApplicationBase.cpp class:
Instead, for all other screens, it generates the following:
void FrontendApplicationBase::gotoMainScreenNoTransition()
{
transitionCallback = touchgfx::Callback(this, & FrontendApplication::gotoMainScreenNoTransitionImpl);
pendingScreenTransitionCallback = &transitionCallback;
}
And the FrontendApplicationBase.hpp doesn't have a
void gotoScreen1ScreenNoTransition();;
Any ideas would be helpful.
*This post has been translated from Chinese to comply with the ST Community guidelines.
2025-07-30 7:01 AM
Hello @w3061433628.
To save flash memory, TouchGFX generates only the screen transitions that are actually used.
If you only need the transition function in your code and do not already have an existing interaction for it, you can create an empty interaction that changes screen, as shown below.
Then, the function gotoScreen1ScreenNoTransition() will be generated.
Best regards,
Johan