From 7a409cf843592265719caababb23b44a8e778de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=83=C2=BCng?= Date: Mon, 21 Aug 2017 10:47:24 +0200 Subject: [PATCH] vdev: remove unneeded devList & topicList methods --- src/drivers/device/vdev.cpp | 22 ---------------------- src/drivers/device/vdev.h | 2 -- src/drivers/device/vdev_posix.cpp | 10 ---------- 3 files changed, 34 deletions(-) diff --git a/src/drivers/device/vdev.cpp b/src/drivers/device/vdev.cpp index 42fa16e1f6..7db1cde921 100644 --- a/src/drivers/device/vdev.cpp +++ b/src/drivers/device/vdev.cpp @@ -617,26 +617,4 @@ void VDev::showFiles() pthread_mutex_unlock(&devmutex); } -const char *VDev::topicList(unsigned int *next) -{ - for (; *next < PX4_MAX_DEV; (*next)++) { - if (devmap[*next] && strncmp(devmap[(*next)]->name, "/obj/", 5) == 0) { - return devmap[(*next)++]->name; - } - } - - return nullptr; -} - -const char *VDev::devList(unsigned int *next) -{ - for (; *next < PX4_MAX_DEV; (*next)++) { - if (devmap[*next] && strncmp(devmap[(*next)]->name, "/dev/", 5) == 0) { - return devmap[(*next)++]->name; - } - } - - return nullptr; -} - } // namespace device diff --git a/src/drivers/device/vdev.h b/src/drivers/device/vdev.h index 280cdc9ad9..09c3ce96de 100644 --- a/src/drivers/device/vdev.h +++ b/src/drivers/device/vdev.h @@ -326,8 +326,6 @@ public: static void showFiles(void); static void showDevices(void); static void showTopics(void); - static const char *devList(unsigned int *next); - static const char *topicList(unsigned int *next); /** * Get the device name. diff --git a/src/drivers/device/vdev_posix.cpp b/src/drivers/device/vdev_posix.cpp index 509f247956..d8ef0d8d2f 100644 --- a/src/drivers/device/vdev_posix.cpp +++ b/src/drivers/device/vdev_posix.cpp @@ -442,15 +442,5 @@ extern "C" { return sim_delay; } - const char *px4_get_device_names(unsigned int *handle) - { - return VDev::devList(handle); - } - - const char *px4_get_topic_names(unsigned int *handle) - { - return VDev::topicList(handle); - } - }