| ... | @@ -45,6 +45,7 @@ EV_EMPTY is used internally to navigate the hierarchy of the state machine durin |
... | @@ -45,6 +45,7 @@ EV_EMPTY is used internally to navigate the hierarchy of the state machine durin |
|
|
- State functions should be public, mainly to allow testing of the state machine.
|
|
- State functions should be public, mainly to allow testing of the state machine.
|
|
|
- State names should begin with "state_" followed by the name of the state. while "state_" should be all lower case with a trailing underscore, the rest of the name must use CamelCaseNotation.
|
|
- State names should begin with "state_" followed by the name of the state. while "state_" should be all lower case with a trailing underscore, the rest of the name must use CamelCaseNotation.
|
|
|
For example: `void state_CuttingDrogue(...)`
|
|
For example: `void state_CuttingDrogue(...)`
|
|
|
|
- It is also a good idea to save the returned event id when calling `postDelayed(...)` in order to remove it later if a transition to a new state is triggered.
|
|
|
|
|
|
|
|
## Patterns
|
|
## Patterns
|
|
|
TBW
|
|
TBW
|
| ... | @@ -169,7 +170,7 @@ printf("%d", counter.getCount(Event{EV_B})); // 1 |
... | @@ -169,7 +170,7 @@ printf("%d", counter.getCount(Event{EV_B})); // 1 |
|
|
|
|
|
|
|
### Examples:
|
|
### Examples:
|
|
|
An example of test for state machines can be found in skyward-boardcore at:
|
|
An example of test for state machines can be found in skyward-boardcore at:
|
|
|
`src/tests/examples/`
|
|
`src/tests/examples/`.
|
|
|
|
|
|
|
|
|
|
|
|
|
## Links
|
|
## Links
|
| ... | | ... | |