Skip to content
Snippets Groups Projects
Commit 7b2367cd authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Remove unused topic from SF10A

parent 993831ab
No related branches found
No related tags found
No related merge requests found
/****************************************************************************
*
* Copyright (c) 2013-2015 PX4 Development Team. All rights reserved.
* Copyright (c) 2013-2016 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment