Skip to content
Snippets Groups Projects
Commit cf245f7d authored by bbartels's avatar bbartels
Browse files

quad: separate commands files into their own library

parent 70d90c80
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ CFLAGS= -Wall -pedantic -Wextra -Werror -std=gnu99 -g -Wno-unused-parameter -Wno
CXXFLAGS= -Wall -pedantic -Wextra -Werror -Wno-reorder -Wno-unused-variable -std=c++0x -g
INCLUDES = $(foreach dir, $(INCDIR), -I$(dir))
INCDIR=../quad/inc src/vrpn src/vrpn/quat src/vrpn/build $(BESRCDIR) $(CLISRCDIR) $(FESRCDIR)
LIBS= -lpthread -lbluetooth -lvrpn -lquat -Lsrc/vrpn/build -Lsrc/vrpn/build/quat -lcomputation_graph -L../quad/lib -lquad_app
LIBS= -lpthread -lbluetooth -lvrpn -lquat -Lsrc/vrpn/build -Lsrc/vrpn/build/quat -lcomputation_graph -L../quad/lib -lcommands
OBJDIR=obj
# Common Objects
......
......@@ -13,6 +13,7 @@ libs:
$(MAKE) -C src/test
$(MAKE) -C src/queue
$(MAKE) -C src/computation_graph
$(MAKE) -C src/commands
$(MAKE) -C src/quad_app
zybo:
......
TOP=../..
NAME = commands
REQLIBS = -ltest
include $(TOP)/library.mk
#include "commands.h"
#include "type_def.h"
/* The cb_default used on the groundStation. This file MUST NOT BE INCLUDED
* by anything except for commands.c */
/* cb_default used by portable commands.c */
int cb_default(modular_structs_t *structs)
int cb_default(struct modular_structs *structs)
{
return 0;
}
File moved
......@@ -5,8 +5,6 @@
#include <stdlib.h>
#include <string.h>
#include "callbacks.h"
#define MAX_CMD_TEXT_LENGTH 100
enum Message{
......@@ -58,6 +56,10 @@ enum MessageTypeID{
MAX_TYPE_ID // 20 - Just used to keep track of the size. Must remain at the end
};
struct modular_structs;
struct metadata;
typedef int (command_cb)(struct modular_structs *, struct metadata *, unsigned char *, unsigned short);
/*
* Message type struct used to keep track of the callback function
* pointers located in commands.c
......
TOP=../..
NAME = quad_app
REQLIBS = -ltest -lcomputation_graph -lm -lqueue
REQLIBS = -ltest -lcomputation_graph -lm -lqueue -lcommands
include $(TOP)/library.mk
......@@ -4,8 +4,6 @@
/* Grab some stupid stuff from legacy code */
struct modular_structs;
struct metadata;
/* Make commands.c happy */
typedef int (command_cb)(struct modular_structs *, struct metadata *, unsigned char *, unsigned short);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment