| ... | ... | @@ -65,7 +65,7 @@ class MyClass : public FSM<MyClass> |
|
|
|
// ...
|
|
|
|
|
|
|
|
// Function handling events for the current state
|
|
|
|
void MyClass::stateMyState(const Event& ev)
|
|
|
|
void MyClass::state_MyState(const Event& ev)
|
|
|
|
{
|
|
|
|
switch (ev.sig)
|
|
|
|
{
|
| ... | ... | @@ -85,6 +85,7 @@ class MyClass : public FSM<MyClass> |
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
<!---
|
|
|
|
### Events with payload
|
|
|
|
|
|
|
|
If the event has some parameter associated (a typical example is a remote command from the ground station) the event has to be manually instanciated
|
| ... | ... | @@ -119,6 +120,7 @@ void someFunction() |
|
|
|
}
|
|
|
|
```
|
|
|
|
> :warning: **WARNING: The `postDelayed` function does not work with "non-standard" events, all the payload is lost!**
|
|
|
|
--->
|
|
|
|
|
|
|
|
## Troubleshooting
|
|
|
|
|
| ... | ... | |