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
SensorManager
Changes
Page history
New page
Templates
Clone repository
Update SensorManager usage example
authored
5 years ago
by
Luca Conterio
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SensorManager.md
+10
-1
10 additions, 1 deletion
SensorManager.md
with
10 additions
and
1 deletion
SensorManager.md
View page @
c09773e9
...
...
@@ -56,7 +56,7 @@ TestSensor* sensor;
void
testCallback
()
{
float
data
=
*
(
sensor
->
testDataPtr
());
TRACE
(
"Test data : %f
\n
"
,
data
);
printf
(
"Test data : %f
\n
"
,
data
);
}
int
main
()
{
...
...
@@ -68,5 +68,14 @@ int main() {
sensor_manager
.
addSensor
(
sensor
,
frequency
,
callback
,
SIMPLE_SAMPLER
);
sensor_manager
.
start
();
// avoid the program to stop
for
(;;)
{
miosix
::
ledOn
();
miosix
::
Thread
::
sleep
(
1000
);
miosix
::
ledOff
();
miosix
::
Thread
::
sleep
(
1000
);
}
}
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.