Added MuORB based on virtual CDev implementation

uORB module now compiles and runs for Linux using the
virtual CDev implementation.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-04-20 11:00:18 -07:00
parent 938751993d
commit 7b0783a070
10 changed files with 1415 additions and 43 deletions
+4 -1
View File
@@ -37,6 +37,9 @@
SRCS = \
px4_linux_impl.cpp \
px4_linux_tasks.c
px4_linux_tasks.c \
lib_crc32.c \
drv_hrt.c \
queue.c
MAXOPTIMIZATION = -Os
@@ -40,12 +40,54 @@
#include <px4_middleware.h>
#include <stdint.h>
#include <stdio.h>
#include "systemlib/param/param.h"
__BEGIN_DECLS
// FIXME - This needs to be properly initialized
struct param_info_s param_array[256];
struct param_info_s *param_info_base;
struct param_info_s *param_info_limit;
__END_DECLS
namespace px4
{
void init(int argc, char *argv[], const char *app_name)
{
struct param_info_s test_1 = {
"TEST_1",
PARAM_TYPE_INT32
};
test_1.val.i = 2;
struct param_info_s test_2 = {
"TEST_2",
PARAM_TYPE_INT32
};
test_2.val.i = 4;
struct param_info_s rc_x = {
"RC_X",
PARAM_TYPE_INT32
};
rc_x.val.i = 8;
struct param_info_s rc2_x = {
"RC2_X",
PARAM_TYPE_INT32
};
rc2_x.val.i = 16;
param_array[0] = test_1;
param_array[1] = test_2;
param_array[2] = rc_x;
param_array[3] = rc2_x;
param_info_base = (struct param_info_s *) &param_array[0];
param_info_limit = (struct param_info_s *) &param_array[4]; // needs to point at the end of the data,
// therefore number of params + 1
printf("App name: %s\n", app_name);
}
+3
View File
@@ -55,6 +55,9 @@
#define PX4_ERROR (-1)
#define PX4_OK 0
//#define PX4_DEBUG(...)
#define PX4_DEBUG(...) printf(__VA_ARGS__)
__BEGIN_DECLS
extern int px4_errno;