STM32F746G-DISCO, GFX, STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-28 10:32 AM
Hi
I have a counter in main.c. I have two screens A and B. The meter reading is sent to screen B and displayed. When the counter reaches 0 I want screen B to switch to A. How to set it up in GFX? greetings
Andrzej
Solved! Go to Solution.
- Labels:
-
STM32F7 Series
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-05 06:00 AM
Are you sure the if(!min_current && !sec_current) condition is ever met ? The application().gotoScreenSetScreenNoTransition() function works.
/Romain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-28 11:35 PM
Hi,
I would advise to create an Interaction within TouchGFX Designer where you set as Trigger "Hardware button is clicked" (a dummy button that you will not set) and as Action "Change screen". With this will be generated in <nameOfScreen>ViewBase.cpp a function called application().gotoScreen2ScreenNoTransition(). It will have a different name if you use another transition or have another name for screens. You can then call this function in your <nameOfScreen>View.cpp when the counter reaches 0.
/Romain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-29 01:00 AM
Thank you. I will check and let you know.
Andrzej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-01 08:32 AM
Hi
I tried but it doesn't work.
I'm sending files. if (! sec_current && ! min_curren) is to go to ScreenSet
How to do it?
greetings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-01 08:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-01 08:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-04 02:49 AM
I'm a bit confused by what you tried to do and the flex button.
What I had in mind was just to have a fake hardware button and interaction, and then add in screenCurrentView.cpp the following function where you check all the time if the conditions are met or not to then call the changing screen function
void ScreenCurrentView::handleTickEvent()
{
if(!min_current && !sec_current)
{
application().gotoScreenSetScreenNoTransition();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-04 10:44 AM
I'm sending files. Did not work.
I'm sending
1. screen shot
2. cpp
3. hpp
4. Base.cpp
5. error: Description Resource Path Location Type no declaration matches 'void ScreenCurrentView :: handleTickEvent ()' ScreenCurrentView.cpp / Ver1 / TouchGFX / gui / src / screencurrent_screen line 35 C / C ++ Problem
Andrzej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-05 01:57 AM
You forgot to add it to ScreenCurrentView.hpp
#ifndef SCREENCURRENTVIEW_HPP
#define SCREENCURRENTVIEW_HPP
#include <gui_generated/screencurrent_screen/ScreenCurrentViewBase.hpp>
#include <gui/screencurrent_screen/ScreenCurrentPresenter.hpp>
class ScreenCurrentView : public ScreenCurrentViewBase
{
public:
ScreenCurrentView();
virtual ~ScreenCurrentView() {}
virtual void setupScreen();
virtual void tearDownScreen();
virtual void updateMinCurrent(uint8_t min_current);
virtual void updateSecCurrent(uint8_t sec_current);
virtual void handleTickEvent();
protected:
};
#endif // SCREENCURRENTVIEW_HPP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-05 03:22 AM
