mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-22 00:20:34 +08:00
vdev: remove unneeded devList & topicList methods
This commit is contained in:
@@ -617,26 +617,4 @@ void VDev::showFiles()
|
|||||||
pthread_mutex_unlock(&devmutex);
|
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
|
} // namespace device
|
||||||
|
|||||||
@@ -326,8 +326,6 @@ public:
|
|||||||
static void showFiles(void);
|
static void showFiles(void);
|
||||||
static void showDevices(void);
|
static void showDevices(void);
|
||||||
static void showTopics(void);
|
static void showTopics(void);
|
||||||
static const char *devList(unsigned int *next);
|
|
||||||
static const char *topicList(unsigned int *next);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the device name.
|
* Get the device name.
|
||||||
|
|||||||
@@ -442,15 +442,5 @@ extern "C" {
|
|||||||
return sim_delay;
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user