diff --git a/groundStation/Makefile b/groundStation/Makefile index 76fb0bf3836c4b1a2184e5439840bddbd96a775e..9a681cbe8b4589ec71e196f7b62fc5e9739dfc29 100644 --- a/groundStation/Makefile +++ b/groundStation/Makefile @@ -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 diff --git a/quad/Makefile b/quad/Makefile index f784e354f4310db4d4c9241d11b731c65cba1249..101e598e7d65c390a6c41b7f40d9a53fcae053f8 100644 --- a/quad/Makefile +++ b/quad/Makefile @@ -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: diff --git a/quad/src/commands/Makefile b/quad/src/commands/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..8cc8ffee3eb119613ad65707e4bcc03f9dea80a1 --- /dev/null +++ b/quad/src/commands/Makefile @@ -0,0 +1,6 @@ +TOP=../.. + +NAME = commands +REQLIBS = -ltest + +include $(TOP)/library.mk diff --git a/quad/src/quad_app/cb_default.h b/quad/src/commands/cb_default.h similarity index 75% rename from quad/src/quad_app/cb_default.h rename to quad/src/commands/cb_default.h index aa308108b499e2cb8f4e723a59b81b02abe6d29c..5581c442c29af074806052203d4e18e76d263d5c 100644 --- a/quad/src/quad_app/cb_default.h +++ b/quad/src/commands/cb_default.h @@ -1,11 +1,10 @@ #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; } diff --git a/quad/src/quad_app/commands.c b/quad/src/commands/commands.c similarity index 100% rename from quad/src/quad_app/commands.c rename to quad/src/commands/commands.c diff --git a/quad/src/quad_app/commands.h b/quad/src/commands/commands.h similarity index 94% rename from quad/src/quad_app/commands.h rename to quad/src/commands/commands.h index d4b0f2e2c8da6093809535b3dbaa00c57998fc34..98c6615f53a450c1cba70b66426b52f01981b386 100644 --- a/quad/src/quad_app/commands.h +++ b/quad/src/commands/commands.h @@ -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 diff --git a/quad/src/quad_app/Makefile b/quad/src/quad_app/Makefile index aea2974582bf7a794b8b32ecdd46223260d26470..4c9cdd92ffe4ca92eb20fc183589909c23bd9406 100644 --- a/quad/src/quad_app/Makefile +++ b/quad/src/quad_app/Makefile @@ -1,6 +1,6 @@ TOP=../.. NAME = quad_app -REQLIBS = -ltest -lcomputation_graph -lm -lqueue +REQLIBS = -ltest -lcomputation_graph -lm -lqueue -lcommands include $(TOP)/library.mk diff --git a/quad/src/quad_app/callbacks.h b/quad/src/quad_app/callbacks.h index 80d0bbc43a5634cf176d084292ddae0376599773..3a13626dbd13e8c3d5bba48cf6c4675069e96394 100644 --- a/quad/src/quad_app/callbacks.h +++ b/quad/src/quad_app/callbacks.h @@ -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