Skip to content

Commit

Permalink
Merge branch 'devel' of github.com:monashuas/cmavnode into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
JMare committed May 18, 2016
2 parents 41ac913 + 28bdc50 commit 67449ea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
BIN = bin/cmavnode
CPP_FILES := $(wildcard src/*.cpp)
OBJ_FILES := $(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
LD_FLAGS := -std=c++14 -ggdb -lboost_program_options -lpthread -lboost_thread -lboost_system
CC_FLAGS := -std=c++14 -ggdb -DELPP_NO_DEFAULT_LOG_FILE -DELPP_STACKTRACE_ON_CRASH -DELPP_THREAD_SAFE
LD_FLAGS := -std=c++11 -lboost_program_options -lpthread -lboost_thread -lboost_system
CC_FLAGS := -std=c++11 -DELPP_NO_DEFAULT_LOG_FILE -DELPP_STACKTRACE_ON_CRASH -DELPP_THREAD_SAFE

all: CC_FLAGS += -DNDEBUG
all: $(BIN)

debug: CC_FLAGS += -ggdb
debug: LD_FLAGS += -ggdb
debug: $(BIN)

$(BIN): $(OBJ_FILES)
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ Supports UDP, and Serial is being worked on.

- Install dependencies

sudo pacman -S boost
sudo apt-get install libboost-all-dev
Arch Linux: sudo pacman -S boost
Ubuntu: sudo apt-get install libboost-all-dev
* Build cmavnode

mkdir bin && make
make

(Note: On ubuntu 14.04 and other operating systems with old versions of g++ it will be nescasary to change the "-stdc++14" flag in the makefile to "-stdc++1y")
For verbose logging of all mavlink messages, and debugger flags in executable:

make debug

## Usage

bin/cmavnode --socket=<targetip>:<targetport:listenport --serial=<port>:<baudrate>
./cmavnode --socket=<targetip>:<targetport:listenport --serial=<port>:<baudrate>

For example, typical usage on a companion computer would be to have a serial port connecting to the autopilot, a socket forwarding packets to the ground, and a socket forwarding packets to other companion computer software. (e.g. dronekit) This would be done as follows

bin/cmavnode --socket=192.168.1.10:14550:14555 --socket=0.0.0.0:14551:14552 --serial=/dev/ttyAMA0:57600
./cmavnode --socket=192.168.1.10:14550:14555 --socket=0.0.0.0:14551:14552 --serial=/dev/ttyAMA0:57600

## Routing Logic

Expand Down
Empty file added bin/bin.keep
Empty file.
Empty file added obj/bin.keep
Empty file.

0 comments on commit 67449ea

Please sign in to comment.