Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
7b2367cd
Commit
7b2367cd
authored
8 years ago
by
Lorenz Meier
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused topic from SF10A
parent
993831ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/drivers/sf10a/sf10a.cpp
+1
-29
1 addition, 29 deletions
src/drivers/sf10a/sf10a.cpp
with
1 addition
and
29 deletions
src/drivers/sf10a/sf10a.cpp
+
1
−
29
View file @
7b2367cd
/****************************************************************************
*
* Copyright (c) 2013-201
5
PX4 Development Team. All rights reserved.
* Copyright (c) 2013-201
6
PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -70,7 +70,6 @@
#include
<drivers/device/ringbuffer.h>
#include
<uORB/uORB.h>
#include
<uORB/topics/subsystem_info.h>
#include
<uORB/topics/distance_sensor.h>
#include
<board_config.h>
...
...
@@ -87,7 +86,6 @@
/* conversion rates */
//#define SF10A_CONVERSION_INTERVAL 25000 // Overclocking SF10a to 40 Hz
#define SF10A_CONVERSION_INTERVAL 31250 // Maximum rate according to datasheet is 32Hz
...
...
@@ -426,7 +424,6 @@ SF10A::ioctl(struct file *filp, int cmd, unsigned long arg)
ssize_t
SF10A
::
read
(
struct
file
*
filp
,
char
*
buffer
,
size_t
buflen
)
{
unsigned
count
=
buflen
/
sizeof
(
struct
distance_sensor_s
);
struct
distance_sensor_s
*
rbuf
=
reinterpret_cast
<
struct
distance_sensor_s
*>
(
buffer
);
int
ret
=
0
;
...
...
@@ -487,7 +484,6 @@ SF10A::read(struct file *filp, char *buffer, size_t buflen)
int
SF10A
::
measure
()
{
int
ret
;
/*
...
...
@@ -564,31 +560,11 @@ SF10A::collect()
void
SF10A
::
start
()
{
/* reset the report ring and state machine */
_reports
->
flush
();
/* schedule a cycle to start things */
work_queue
(
HPWORK
,
&
_work
,
(
worker_t
)
&
SF10A
::
cycle_trampoline
,
this
,
5
);
/* notify about state change */
struct
subsystem_info_s
info
=
{};
info
.
present
=
true
;
info
.
enabled
=
true
;
info
.
ok
=
true
;
info
.
subsystem_type
=
subsystem_info_s
::
SUBSYSTEM_TYPE_RANGEFINDER
;
static
orb_advert_t
pub
=
nullptr
;
if
(
pub
!=
nullptr
)
{
orb_publish
(
ORB_ID
(
subsystem_info
),
pub
,
&
info
);
}
else
{
pub
=
orb_advertise
(
ORB_ID
(
subsystem_info
),
&
info
);
}
}
void
...
...
@@ -600,17 +576,14 @@ SF10A::stop()
void
SF10A
::
cycle_trampoline
(
void
*
arg
)
{
SF10A
*
dev
=
(
SF10A
*
)
arg
;
dev
->
cycle
();
}
void
SF10A
::
cycle
()
{
set_address
(
SF10A_BASEADDR
);
/* Collect results */
...
...
@@ -635,7 +608,6 @@ SF10A::cycle()
(
worker_t
)
&
SF10A
::
cycle_trampoline
,
this
,
USEC2TICK
(
SF10A_CONVERSION_INTERVAL
));
}
void
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment