mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 11:40:34 +08:00
Ported more simulated sensors to DriverFramework
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -45,6 +45,10 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "DevMgr.hpp"
|
||||
|
||||
using namespace DriverFramework;
|
||||
|
||||
namespace device
|
||||
{
|
||||
|
||||
@@ -512,13 +516,21 @@ VDev *VDev::getDev(const char *path)
|
||||
void VDev::showDevices()
|
||||
{
|
||||
int i = 0;
|
||||
PX4_INFO("Devices:");
|
||||
PX4_INFO("PX4 Devices:");
|
||||
|
||||
for (; i < PX4_MAX_DEV; ++i) {
|
||||
if (devmap[i] && strncmp(devmap[i]->name, "/dev/", 5) == 0) {
|
||||
PX4_INFO(" %s", devmap[i]->name);
|
||||
}
|
||||
}
|
||||
PX4_INFO("DF Devices:");
|
||||
|
||||
std::string devname;
|
||||
for (unsigned int index=0; i == 0; ++i) {
|
||||
if (DevMgr::getNextDeviceName(index, devname) == 0) {
|
||||
PX4_INFO(" %s", devname.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VDev::showTopics()
|
||||
@@ -566,4 +578,4 @@ const char *VDev::devList(unsigned int *next)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
} // namespace device
|
||||
} // namespace device
|
||||
|
||||
Reference in New Issue
Block a user