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 ...@@ -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 CXXFLAGS= -Wall -pedantic -Wextra -Werror -Wno-reorder -Wno-unused-variable -std=c++0x -g
INCLUDES = $(foreach dir, $(INCDIR), -I$(dir)) INCLUDES = $(foreach dir, $(INCDIR), -I$(dir))
INCDIR=../quad/inc src/vrpn src/vrpn/quat src/vrpn/build $(BESRCDIR) $(CLISRCDIR) $(FESRCDIR) 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 OBJDIR=obj
# Common Objects # Common Objects
......
...@@ -13,6 +13,7 @@ libs: ...@@ -13,6 +13,7 @@ libs:
$(MAKE) -C src/test $(MAKE) -C src/test
$(MAKE) -C src/queue $(MAKE) -C src/queue
$(MAKE) -C src/computation_graph $(MAKE) -C src/computation_graph
$(MAKE) -C src/commands
$(MAKE) -C src/quad_app $(MAKE) -C src/quad_app
zybo: zybo:
......
TOP=../..
NAME = commands
REQLIBS = -ltest
include $(TOP)/library.mk
#include "commands.h" #include "commands.h"
#include "type_def.h"
/* The cb_default used on the groundStation. This file MUST NOT BE INCLUDED /* The cb_default used on the groundStation. This file MUST NOT BE INCLUDED
* by anything except for commands.c */ * by anything except for commands.c */
/* cb_default used by portable 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; return 0;
} }
File moved
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "callbacks.h"
#define MAX_CMD_TEXT_LENGTH 100 #define MAX_CMD_TEXT_LENGTH 100
enum Message{ enum Message{
...@@ -58,6 +56,10 @@ enum MessageTypeID{ ...@@ -58,6 +56,10 @@ enum MessageTypeID{
MAX_TYPE_ID // 20 - Just used to keep track of the size. Must remain at the end 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 * Message type struct used to keep track of the callback function
* pointers located in commands.c * pointers located in commands.c
......
TOP=../.. TOP=../..
NAME = quad_app NAME = quad_app
REQLIBS = -ltest -lcomputation_graph -lm -lqueue REQLIBS = -ltest -lcomputation_graph -lm -lqueue -lcommands
include $(TOP)/library.mk include $(TOP)/library.mk
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
/* Grab some stupid stuff from legacy code */ /* Grab some stupid stuff from legacy code */
struct modular_structs; struct modular_structs;
struct metadata; struct metadata;
/* Make commands.c happy */
typedef int (command_cb)(struct modular_structs *, struct metadata *, unsigned char *, unsigned short); typedef int (command_cb)(struct modular_structs *, struct metadata *, unsigned char *, unsigned short);
#endif #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