Skip to main content
BParh.1
Senior III
July 14, 2021
Question

How can I switch screen from Model class in response to external event (Backend event)?

  • July 14, 2021
  • 1 reply
  • 751 views

How to switch to particular screen from Model::tick()?

Scenario:

  1. Switching from start up screen to main screen upon receiving external hardware event
  2. Switching from particular active screen (non startup screen) to other screen in response to external hardware event.
This topic has been closed for replies.

1 reply

Romain DIELEMAN
ST Employee
January 27, 2022

I'll comment a bit late as this question has been dug up in another post.

It is not possible at the moment (a user might have shared a workaround but I have not found it).

In your scenario what i would recommend would just be to implement dummy transitions in one of the screens to generate all the application.goto() functions needed and add a function receiving the hardware input (see backend communication article) which then calls the relevant screen transition. You'll have to implement that same function in all screens of your project (we are aware this is annoying and are working on it :grinning_face_with_sweat:).

/Romain