Linux: enabled commander module

The commander module now compiles for Linux.

state_machine_helper_linux.cpp iterates over the virtual devices vs
all devices under /dev as per NuttX when disabling publishing.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-04-20 11:37:50 -07:00
parent 88dc6ec1e5
commit bba26c3430
20 changed files with 1471 additions and 14 deletions
+8
View File
@@ -467,5 +467,13 @@ void VDev::showDevices()
}
}
const char *VDev::devList(unsigned int *next)
{
for (;*next<PX4_MAX_DEV; (*next)++)
if (devmap[*next])
return devmap[(*next)++]->name;
return NULL;
}
} // namespace device
+1
View File
@@ -334,6 +334,7 @@ public:
static VDev *getDev(const char *path);
static void showDevices(void);
static const char *devList(unsigned int *next);
protected:
+5
View File
@@ -274,5 +274,10 @@ void px4_show_devices()
VDev::showDevices();
}
const char * px4_get_device_names(unsigned int *handle)
{
return VDev::devList(handle);
}
}