Use DevMgr::getNextDevicePath()

Also, a fix for number of args passed for accelsim.

Updated to newest version of DriverFramework.

DF drvices show up now in list_devices

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-11-16 16:57:57 -08:00
parent 3f20d78dfe
commit 618626103f
4 changed files with 13 additions and 11 deletions
+3 -5
View File
@@ -550,18 +550,16 @@ void VDev::showDevices()
pthread_mutex_unlock(&devmutex);
PX4_INFO("DF Devices:");
// TODO NOT IMPLEMENTED
std::string devname;
std::string dev_path, instance_path;
unsigned int index = 0;
i = 0;
do {
// Each look increments index and returns -1 if end reached
i = DevMgr::getNextDeviceName(index, devname);
i = DevMgr::getNextDevicePath(index, dev_path, instance_path);
if (i == 0) {
PX4_INFO(" %s", devname.c_str());
PX4_INFO(" %s (%s)", dev_path.c_str(), instance_path.c_str());
}
} while (i == 0);
}