Ported more simulated sensors to DriverFramework

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-11-10 07:45:13 -08:00
parent 40c079efa8
commit efd9995a10
10 changed files with 168 additions and 161 deletions
+14 -2
View File
@@ -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
+6
View File
@@ -46,6 +46,7 @@
#include "drv_sensor.h"
#include "drv_orb_dev.h"
#ifdef __PX4_NUTTX
/*
* ioctl() definitions
*/
@@ -65,6 +66,11 @@
*/
#define DEVIOCGDEVICEID _DEVICEIOC(2)
#else
#include "DevObj.hpp"
#endif
#ifdef __PX4_POSIX
#ifndef SIOCDEVPRIVATE