mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
vdev: remove unneeded devList & topicList methods
This commit is contained in:
parent
47eb371c01
commit
7a409cf843
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user