Browse Source

vdev: remove unneeded devList & topicList methods

sbg
Beat Küng 8 years ago committed by Lorenz Meier
parent
commit
7a409cf843
  1. 22
      src/drivers/device/vdev.cpp
  2. 2
      src/drivers/device/vdev.h
  3. 10
      src/drivers/device/vdev_posix.cpp

22
src/drivers/device/vdev.cpp

@ -617,26 +617,4 @@ void VDev::showFiles() @@ -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

2
src/drivers/device/vdev.h

@ -326,8 +326,6 @@ public: @@ -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.

10
src/drivers/device/vdev_posix.cpp

@ -442,15 +442,5 @@ extern "C" { @@ -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);
}
}

Loading…
Cancel
Save