Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is following the roadmap as described here: http://wiki.paparazziuav.org/wiki/Roadmap#Communication_Roadmap Header size is increased by 2 bytes, allowing to include receiver, class and component IDs to the two existing byte (sender and message IDs). This will allow in particular to send messages from aircraft to aircraft without ambiguity. All libraries have been updated (except for IVY part, unchanged but compatible). The version to be used is selected during the install. The generated C code has backward compatible macros and functions, plus new API to use full capabilities of the new protocol.
- Loading branch information
1 parent
4b883e6
commit 3d38267
Showing
67 changed files
with
4,741 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ | |
|
||
/build | ||
/var | ||
/.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# Hey Emacs, this is a -*- makefile -*- | ||
# | ||
# Copyright (C) 2003 Pascal Brisset, Antoine Drouin | ||
# Copyright (C) 2015 Gautier Hattenberger <gautier.hattenberger@enac.fr> | ||
# | ||
# This file is part of paparazzi. | ||
# | ||
# paparazzi is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2, or (at your option) | ||
# any later version. | ||
# | ||
# paparazzi is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with paparazzi; see the file COPYING. If not, see | ||
# <http://www.gnu.org/licenses/>. | ||
# | ||
|
||
# Quiet compilation | ||
Q=@ | ||
|
||
# redirect output if quiet compilation | ||
ifeq ($(Q),@) | ||
QUIET= -quiet | ||
Q_OUT= >/dev/null 2>&1 | ||
else | ||
Q_OUT= | ||
endif | ||
|
||
|
||
OCAMLBUILD=ocamlbuild -use-ocamlfind | ||
CAMLP4_DEFS ?= | ||
|
||
# | ||
# NOTE: due to a bug in older ocamlbuild versions the build-dir can NOT be absolute | ||
# see http://caml.inria.fr/mantis/view.php?id=5503 | ||
# | ||
OCAML_VERSION := $(shell ocamlc -version) | ||
OCAML_MAJOR := $(shell echo $(OCAML_VERSION) | cut -f1 -d.) | ||
OCAMLC_MINOR := $(shell echo $(OCAML_VERSION) | cut -f2 -d.) | ||
ifeq ($(shell test $(OCAML_MAJOR) -lt 4; echo $$?),0) | ||
# need to use an old buggy ocaml(build) version: build-dir MUST be relative | ||
BUILDDIR ?= ../../../build/ocaml/pprzlink | ||
else | ||
# using a recent ocaml(build) version without THAT particular bug, | ||
# but build-dir MUST NOT contain .. | ||
# so use some magic here to get a normalized absolute path if PPRZLINK_DIR is not set | ||
PPRZLINK_DIR ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST)))/../../..) | ||
BUILDDIR ?= $(PPRZLINK_DIR)/build/ocaml/pprzlink | ||
|
||
ifeq ($(shell test $(OCAMLC_MINOR) -ge 2; echo $$?),0) | ||
# the Bytes module is available since OCaml 4.02.0 | ||
CAMLP4_DEFS += -DHAS_BYTES_MODULE | ||
endif | ||
endif | ||
|
||
INSTALL_FLAGS ?= | ||
# use this option leave ocamlfind ldconf file unchanged | ||
INSTALL_FLAGS += -ldconf ignore | ||
DESTDIR ?= | ||
ifneq ($(DESTDIR),) | ||
INSTALL_FLAGS += -destdir $(DESTDIR) | ||
endif | ||
|
||
PP_OPTS = -pp "camlp4o pa_macro.cmo $(CAMLP4_DEFS)" | ||
INSTALL_FILES = $(shell ls $(BUILDDIR)/*.so $(BUILDDIR)/*.a $(BUILDDIR)/*.mli $(BUILDDIR)/*.cm* $(BUILDDIR)/common/*.mli $(BUILDDIR)/common/*.cm*) | ||
|
||
|
||
all: byte native | ||
|
||
byte: _tags META | ||
@echo Build bytecode lib | ||
$(Q)test -d $(BUILDDIR) || mkdir -p $(BUILDDIR) | ||
$(Q)$(OCAMLBUILD) $(QUIET) $(PP_OPTS) -build-dir $(BUILDDIR) -I common lib-pprzlink.cma | ||
$(Q)cp META $(BUILDDIR) | ||
|
||
# byte with statically linked libs | ||
static: _tags META | ||
@echo Build bytecode lib with static linking | ||
$(Q)test -d $(BUILDDIR) || mkdir -p $(BUILDDIR) | ||
$(Q)$(OCAMLBUILD) $(QUIET) -build-dir $(BUILDDIR) -tag static -I common lib-pprzlink.cma | ||
$(Q)cp META $(BUILDDIR) | ||
|
||
native: _tags META | ||
@echo Build native lib | ||
$(Q)test -d $(BUILDDIR) || mkdir -p $(BUILDDIR) | ||
$(Q)$(OCAMLBUILD) $(QUIET) $(PP_OPTS) -build-dir $(BUILDDIR) -I common lib-pprzlink.cmxa | ||
$(Q)cp META $(BUILDDIR) | ||
|
||
install: clean_lib byte native META | ||
@echo INSTALL at location $(DESTDIR) | ||
$(Q)test -d $(DESTDIR) || mkdir -p $(DESTDIR) | ||
$(Q)ocamlfind remove $(INSTALL_FLAGS) pprzlink $(Q_OUT) | ||
$(Q)ocamlfind install $(INSTALL_FLAGS) pprzlink META $(INSTALL_FILES) $(Q_OUT) | ||
|
||
UNAME = $(shell uname -s) | ||
ifeq ("$(UNAME)","Darwin") | ||
MKTEMP = gmktemp | ||
else | ||
MKTEMP = mktemp | ||
endif | ||
|
||
clean : | ||
$(Q)rm -f *.cm* *.out *.opt .depend *.a *.o *.so | ||
$(Q)ocamlbuild -clean -classic-display -build-dir $(BUILDDIR) | ||
|
||
# test if an other version of the lib is installed and remove if needed | ||
clean_lib: | ||
@echo Check for already installed pprzlink ocaml lib | ||
ifneq ("$(wildcard $(DESTDIR)/pprzlink/META)","") | ||
@echo ' -> found lib version $(shell grep version $(DESTDIR)/pprzlink/META | cut -d \" -f2) while installing $(PPRZLINK_LIB_VERSION)' | ||
ifneq ($(shell grep version $(DESTDIR)/pprzlink/META | cut -d \" -f2), $(PPRZLINK_LIB_VERSION)) | ||
@echo ' -> removing files' | ||
$(Q)ocamlbuild -clean -classic-display -build-dir $(BUILDDIR) | ||
$(Q)ocamlfind remove $(INSTALL_FLAGS) pprzlink $(Q_OUT) | ||
endif | ||
endif | ||
|
||
.PHONY: all byte static native install install_local clean clean_lib |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Hey Emacs, this is a -*- makefile -*- | ||
# | ||
# Copyright (C) 2017 Fabien Garcia <fabien.garcia@enac.fr> | ||
# | ||
# This file is part of paparazzi. | ||
# | ||
# paparazzi is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2, or (at your option) | ||
# any later version. | ||
# | ||
# paparazzi is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with paparazzi; see the file COPYING. If not, see | ||
# <http://www.gnu.org/licenses/>. | ||
# | ||
|
||
MAKE = make | ||
|
||
all: | ||
|
||
install: | ||
# $(Q)cp ../../common/C/*.c $(MESSAGES_LIB) | ||
$(Q)cp ../../common/C/*.h $(MESSAGES_INCLUDE) | ||
$(Q)cp ./*.h $(MESSAGES_INCLUDE) | ||
$(Q)cp ./*.c $(MESSAGES_LIB) | ||
|
||
|
||
.PHONY: install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../common/ocaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Hey Emacs, this is a -*- makefile -*- | ||
# | ||
# Copyright (C) 2017 Fabien Garcia <fabien.garcia@enac.fr> | ||
# | ||
# This file is part of paparazzi. | ||
# | ||
# paparazzi is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2, or (at your option) | ||
# any later version. | ||
# | ||
# paparazzi is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with paparazzi; see the file COPYING. If not, see | ||
# <http://www.gnu.org/licenses/>. | ||
# | ||
|
||
MAKE = make | ||
|
||
all: | ||
|
||
install: | ||
# Install correct version python library to DESTDIR | ||
@echo INSTALL at location $(DESTDIR) | ||
$(Q)test -d $(DESTDIR) || mkdir -p $(DESTDIR) | ||
$(Q)cp -r pprzlink $(DESTDIR) | ||
|
||
|
||
.PHONY: all install | ||
|
Oops, something went wrong.