Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Skyward Boardcore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
Skyward Boardcore
Wiki
Events Cheatsheet
Changes
Page history
New page
Templates
Clone repository
Style and code fixes
authored
4 years ago
by
Luca Conterio
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Events-Cheatsheet.md
+3
-4
3 additions, 4 deletions
Events-Cheatsheet.md
with
3 additions
and
4 deletions
Events-Cheatsheet.md
View page @
affa8403
...
...
@@ -41,7 +41,7 @@ void someFunction()
// Post the event EV_TIMEOUT_SHADOW_MODE on topic TOPIC_ADA delayed by 1 second
// NOTE THE CURLY BRACKETS AROUND THE EVENT NAME!
event_id
=
sEventBroker
->
postDelayed
({
EV_TIMEOUT_SHADOW_MODE
},
TOPIC_ADA
,
delay
);
event_id
=
sEventBroker
->
postDelayed
<
delay
>
({
EV_TIMEOUT_SHADOW_MODE
},
TOPIC_ADA
);
}
```
It is good practice to save the event id returned by the function in order to remove it later.
...
...
@@ -59,7 +59,7 @@ class MyClass : public FSM<MyClass>
unsigned
int
delay
=
1000
;
// Delay is defined in milliseconds
// Store the event id
event_id
=
sEventBroker
->
postDelayed
({
EV_TIMEOUT_SHADOW_MODE
},
TOPIC_ADA
,
delay
);
event_id
=
sEventBroker
->
postDelayed
<
delay
>
({
EV_TIMEOUT_SHADOW_MODE
},
TOPIC_ADA
);
}
// ...
...
...
@@ -81,8 +81,7 @@ class MyClass : public FSM<MyClass>
}
}
}
};
```
<!---
...
...
This diff is collapsed.
Click to expand it.