Hello, so I am trying to press a button and when the callback for the button pushed is called, the program should change the value of a variable in the stateflow diagram. In order to do this, I have done the following:
In the startup function I have used the following line of code which links the stateflow chart to the app designer:
app.compLogic = mylogic('app', app);
Then in the callback for the button:
function ButtonPushed(app, event)
app.keyrequest = 1;
The variable keyrequest is a variable in the stateflow diagram, and by setting the value of this variable to something other than 0, the state machine starts to operate. I have tried to add the keyrequest as a property, but it still wasn't working. I feel like I need to use compLogic thing, but I don't really know how.
Any help would be much appreciated.
Thank you in advance!