Skip to content
Snippets Groups Projects
Commit abb2a21c authored by burneykb's avatar burneykb
Browse files

Merge branch 'common-folder' into groundStation-dev-comp_graph-commands

parents 81593831 83ef0a99
No related branches found
No related tags found
No related merge requests found
Showing
with 33 additions and 29 deletions
File moved
File moved
File moved
The common files are: The common files are:
- packet.h
- packet.c
- setcontrol.h - setcontrol.h
- setcontrol.c - setcontrol.c
- bitwise.h
- controller.h
File moved
File moved
File moved
File moved
...@@ -6,10 +6,15 @@ GXX=g++ ...@@ -6,10 +6,15 @@ GXX=g++
CFLAGS= -Wall -pedantic -Wextra -Werror -std=gnu99 -g -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable CFLAGS= -Wall -pedantic -Wextra -Werror -std=gnu99 -g -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable
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=inc src/vrpn src/vrpn/quat src/vrpn/build $(BESRCDIR) $(CLISRCDIR) $(FESRCDIR) INCDIR=inc src/vrpn src/vrpn/quat src/vrpn/build $(COMSRCDIR) $(BESRCDIR) $(CLISRCDIR) $(FESRCDIR)
LIBS= -lpthread -lbluetooth -lvrpn -lquat -Lsrc/vrpn/build -Lsrc/vrpn/build/quat LIBS= -lpthread -lbluetooth -lvrpn -lquat -Lsrc/vrpn/build -Lsrc/vrpn/build/quat
OBJDIR=obj OBJDIR=obj
# Common Objects
COMSRCDIR=../common
COMSOURCES := $(wildcard $(COMSRCDIR)/*.c )
COMOBJECTS = $(COMSOURCES:$(COMSRCDIR)/%.c=$(OBJDIR)/%.o)
# Backend Specific Variables # Backend Specific Variables
BEBINARY=BackEnd BEBINARY=BackEnd
BESRCDIR=src/backend BESRCDIR=src/backend
...@@ -31,7 +36,7 @@ FECSOURCES := $(wildcard $(FESRCDIR)/*.c ) ...@@ -31,7 +36,7 @@ FECSOURCES := $(wildcard $(FESRCDIR)/*.c )
FECOBJECTS = $(FECSOURCES:$(FESRCDIR)/%.c=$(OBJDIR)/%.o) FECOBJECTS = $(FECSOURCES:$(FESRCDIR)/%.c=$(OBJDIR)/%.o)
OBJECTS= $(CLIOBJECTS) $(BECOBJECTS) $(BECPPOBJECTS) $(FECOBJECTS) OBJECTS= $(COMOBJECTS) $(CLIOBJECTS) $(BECOBJECTS) $(BECPPOBJECTS) $(FECOBJECTS)
# Default target # Default target
all: logs objdir backend cli $(SYMLINKS) all: logs objdir backend cli $(SYMLINKS)
...@@ -48,9 +53,12 @@ $(CLIOBJECTS) : $(OBJDIR)/%.o : $(CLISRCDIR)/%.c ...@@ -48,9 +53,12 @@ $(CLIOBJECTS) : $(OBJDIR)/%.o : $(CLISRCDIR)/%.c
$(GCC) $(CFLAGS) -c $^ -o $@ $(INCLUDES) $(LIBS) $(GCC) $(CFLAGS) -c $^ -o $@ $(INCLUDES) $(LIBS)
backend: $(BECPPOBJECTS) $(BECOBJECTS) backend: $(COMOBJECTS) $(BECPPOBJECTS) $(BECOBJECTS)
$(GXX) $(CXXFLAGS) $^ -o $(BEBINARY) $(INCLUDES) $(LIBS) $(GXX) $(CXXFLAGS) $^ -o $(BEBINARY) $(INCLUDES) $(LIBS)
$(COMOBJECTS) : $(OBJDIR)/%.o : $(COMSRCDIR)/%.c
$(GCC) $(CFLAGS) -c $^ -o $@ $(INCLUDES) $(LIBS)
$(FECOBJECTS) : $(OBJDIR)/%.o : $(FESRCDIR)/%.c $(FECOBJECTS) : $(OBJDIR)/%.o : $(FESRCDIR)/%.c
$(GCC) $(CFLAGS) -c $^ -o $@ $(INCLUDES) $(LIBS) $(GCC) $(CFLAGS) -c $^ -o $@ $(INCLUDES) $(LIBS)
...@@ -77,4 +85,4 @@ clean: ...@@ -77,4 +85,4 @@ clean:
rm -rf $(OBJDIR)/ $(BEBINARY) $(CLIBINARY) rm -rf $(OBJDIR)/ $(BEBINARY) $(CLIBINARY)
debug: debug:
@echo $(OBJECTS) @echo $(COMOBJECTS)
...@@ -30,17 +30,17 @@ ...@@ -30,17 +30,17 @@
//user created includes //user created includes
#include "communication.h" #include "communication.h"
#include "commands.h" #include "../../../common/commands.h"
#include "vrpn_tracker.hpp" #include "vrpn_tracker.hpp"
#include "type_def.h" #include "type_def.h"
#include "packet.h" #include "../../../common/packet.h"
#include "responseparam.h" #include "responseparam.h"
#include "update.h" #include "update.h"
#include "config.h" #include "config.h"
#include "cmHandler.h" #include "cmHandler.h"
#include "getparam.h" #include "getparam.h"
#include "setparam.h" #include "setparam.h"
#include "bitwise.h" #include "../../../common/bitwise.h"
#define QUAD_BT_ADDR "00:06:66:64:61:D6" #define QUAD_BT_ADDR "00:06:66:64:61:D6"
#define QUAD_BT_CHANNEL 0x01 #define QUAD_BT_CHANNEL 0x01
......
#include "commands.h" #include "../../../common/commands.h"
/* New stuff - this is nice and clean */ /* New stuff - this is nice and clean */
......
#ifndef _CMHANDLER_H #ifndef _CMHANDLER_H
#define _CMHANDLER_H #define _CMHANDLER_H
#include "controller.h" #include "../../../common/controller.h"
enum paramIndices { enum paramIndices {
PARAM_ROLL_P , PARAM_ROLL_P ,
...@@ -45,4 +45,4 @@ const char * cmToString(int msgType, const struct controller_message *cm); ...@@ -45,4 +45,4 @@ const char * cmToString(int msgType, const struct controller_message *cm);
struct controller_message * stringToCm(const char * string, struct controller_message *cm); struct controller_message * stringToCm(const char * string, struct controller_message *cm);
#endif /* _CMHANDLER_H */ #endif /* _CMHANDLER_H */
\ No newline at end of file
#include "communication.h" #include "communication.h"
#include "commands.h" #include "../../../common/commands.h"
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
......
#include "getparam.h" #include "getparam.h"
#include "commands.h" #include "../../../common/commands.h"
#include "bitwise.h" #include "../../../common/bitwise.h"
#include <sys/types.h> #include <sys/types.h>
......
#ifndef _getparam_h #ifndef _getparam_h
#define _getparam_h #define _getparam_h
#include "packet.h" #include "../../../common/packet.h"
#include "controller.h" #include "../../../common/controller.h"
#include <sys/types.h> #include <sys/types.h>
......
#include "responseparam.h" #include "responseparam.h"
#include "commands.h" #include "../../../common/commands.h"
#include "bitwise.h" #include "../../../common/bitwise.h"
#include <sys/types.h> #include <sys/types.h>
......
#ifndef _responseparam_h #ifndef _responseparam_h
#define _responseparam_h #define _responseparam_h
#include "packet.h" #include "../../../common/packet.h"
#include "controller.h" #include "../../../common/controller.h"
#include <sys/types.h> #include <sys/types.h>
......
#include "setparam.h" #include "setparam.h"
#include "commands.h" #include "../../../common/commands.h"
#include "bitwise.h" #include "../../../common/bitwise.h"
#include <sys/types.h> #include <sys/types.h>
......
#ifndef _setparam_h #ifndef _setparam_h
#define _setparam_h #define _setparam_h
#include "packet.h" #include "../../../common/packet.h"
#include "controller.h" #include "../../../common/controller.h"
#include <sys/types.h> #include <sys/types.h>
......
#include "update.h" #include "update.h"
#include "commands.h" #include "../../../common/commands.h"
#include "bitwise.h" #include "../../../common/bitwise.h"
#include <sys/types.h> #include <sys/types.h>
......
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