From 7b2367cdff04a3b761996c4b383b94684378b2c7 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 24 Jun 2016 10:31:17 +0200 Subject: [PATCH] Remove unused topic from SF10A --- src/drivers/sf10a/sf10a.cpp | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/drivers/sf10a/sf10a.cpp b/src/drivers/sf10a/sf10a.cpp index 026b54b181..21b0a8bcb7 100644 --- a/src/drivers/sf10a/sf10a.cpp +++ b/src/drivers/sf10a/sf10a.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * 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 #include -#include #include #include @@ -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(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