mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 15:53:34 +08:00
Changed device::px4_device_handle_t to device::file_t
This change allowed the _posix.cpp file changes to be merged back into the original files. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file vcdev_posix.cpp
|
||||
* @file vdev_posix.cpp
|
||||
*
|
||||
* POSIX-like API for virtual character device
|
||||
*/
|
||||
@@ -47,6 +47,8 @@
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define PX4_DEBUG(...)
|
||||
|
||||
using namespace device;
|
||||
|
||||
extern "C" {
|
||||
@@ -74,7 +76,7 @@ static void *timer_handler(void *data)
|
||||
}
|
||||
|
||||
#define PX4_MAX_FD 100
|
||||
static px4_dev_handle_t *filemap[PX4_MAX_FD] = {};
|
||||
static device::file_t *filemap[PX4_MAX_FD] = {};
|
||||
|
||||
int px4_errno;
|
||||
|
||||
@@ -95,7 +97,7 @@ int px4_open(const char *path, int flags)
|
||||
else {
|
||||
for (i=0; i<PX4_MAX_FD; ++i) {
|
||||
if (filemap[i] == 0) {
|
||||
filemap[i] = new px4_dev_handle_t(flags,dev,i);
|
||||
filemap[i] = new device::file_t(flags,dev,i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user