Merge pull request #1513 from paparazzi/pprzlink

Pprzlink

Here we go!
This commit is contained in:
Gautier Hattenberger
2016-01-23 22:10:14 +01:00
288 changed files with 906 additions and 12273 deletions
+3
View File
@@ -19,3 +19,6 @@
[submodule "sw/ext/mavlink"]
path = sw/ext/mavlink
url = https://github.com/paparazzi/mavlink.git
[submodule "sw/ext/pprzlink"]
path = sw/ext/pprzlink
url = https://github.com/paparazzi/pprzlink.git
+25 -54
View File
@@ -57,11 +57,10 @@ endif
# define some paths
#
LIB=sw/lib
STATICINCLUDE =$(PAPARAZZI_HOME)/var/include
STATICINCLUDE=$(PAPARAZZI_HOME)/var/include
CONF=$(PAPARAZZI_SRC)/conf
AIRBORNE=sw/airborne
SIMULATOR=sw/simulator
MULTIMON=sw/ground_segment/multimon
COCKPIT=sw/ground_segment/cockpit
TMTC=sw/ground_segment/tmtc
GENERATORS=$(PAPARAZZI_SRC)/sw/tools/generators
@@ -82,7 +81,7 @@ SUBDIRS = $(PPRZCENTER) $(MISC) $(LOGALIZER)
#
# xml files used as input for header generation
#
MESSAGES_XML = $(CONF)/messages.xml
CUSTOM_MESSAGES_XML = $(CONF)/messages.xml
ABI_XML = $(CONF)/abi.xml
UBX_XML = $(CONF)/ubx.xml
MTK_XML = $(CONF)/mtk.xml
@@ -91,20 +90,17 @@ XSENS_XML = $(CONF)/xsens_MTi-G.xml
#
# generated header files
#
MESSAGES_H=$(STATICINCLUDE)/messages.h
MESSAGES2_H=$(STATICINCLUDE)/messages2.h
PPRZLINK_DIR=sw/ext/pprzlink
PPRZLINK_INSTALL=$(PAPARAZZI_HOME)/var/lib/ocaml
MESSAGES_INSTALL=$(PAPARAZZI_HOME)/var
UBX_PROTOCOL_H=$(STATICINCLUDE)/ubx_protocol.h
MTK_PROTOCOL_H=$(STATICINCLUDE)/mtk_protocol.h
XSENS_PROTOCOL_H=$(STATICINCLUDE)/xsens_protocol.h
DL_PROTOCOL_H=$(STATICINCLUDE)/dl_protocol.h
DL_PROTOCOL2_H=$(STATICINCLUDE)/dl_protocol2.h
ABI_MESSAGES_H=$(STATICINCLUDE)/abi_messages.h
INTERMCU_MSG_H=$(STATICINCLUDE)/intermcu_msg.h
MAVLINK_DIR=$(STATICINCLUDE)/mavlink/
MAVLINK_PROTOCOL_H=$(MAVLINK_DIR)protocol.h
GEN_HEADERS = $(MESSAGES_H) $(UBX_PROTOCOL_H) $(MTK_PROTOCOL_H) $(XSENS_PROTOCOL_H) $(DL_PROTOCOL_H) $(ABI_MESSAGES_H) $(INTERMCU_MSG_H) $(MAVLINK_PROTOCOL_H)
GEN_HEADERS = $(UBX_PROTOCOL_H) $(MTK_PROTOCOL_H) $(XSENS_PROTOCOL_H) $(ABI_MESSAGES_H) $(MAVLINK_PROTOCOL_H)
all: ground_segment ext lpctools
@@ -139,11 +135,12 @@ ground_segment.opt: ground_segment cockpit.opt tmtc.opt
static: cockpit tmtc generators sim_static joystick static_h
libpprz: _save_build_version
$(MAKE) -C $(LIB)/ocaml
libpprzlink:
$(MAKE) -C $(EXT) pprzlink.update
$(Q)Q=$(Q) DESTDIR=$(PPRZLINK_INSTALL) $(MAKE) -C $(PPRZLINK_DIR) libpprzlink-install
multimon:
$(MAKE) -C $(MULTIMON)
libpprz: libpprzlink _save_build_version
$(MAKE) -C $(LIB)/ocaml
cockpit: libpprz
$(MAKE) -C $(COCKPIT)
@@ -151,10 +148,10 @@ cockpit: libpprz
cockpit.opt: libpprz
$(MAKE) -C $(COCKPIT) opt
tmtc: libpprz cockpit multimon
tmtc: libpprz cockpit
$(MAKE) -C $(TMTC)
tmtc.opt: libpprz cockpit.opt multimon
tmtc.opt: libpprz cockpit.opt
$(MAKE) -C $(TMTC) opt
generators: libpprz
@@ -184,24 +181,19 @@ $(PPRZCENTER): libpprz
$(LOGALIZER): libpprz
static_h: pprzlink_protocol $(GEN_HEADERS)
static_h: $(GEN_HEADERS)
$(MESSAGES_H) : $(MESSAGES_XML) generators
pprzlink_protocol :
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
@echo GENERATE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(GENERATORS)/gen_messages.out $< telemetry > $($@_TMP)
$(Q)mv $($@_TMP) $@
$(Q)chmod a+r $@
$(Q)test -d $(STATICLIB) || mkdir -p $(STATICLIB)
ifeq ("$(wildcard $(CUSTOM_MESSAGES_XML))","")
@echo GENERATE $@ with default messages
$(Q)Q=$(Q) MESSAGES_INSTALL=$(MESSAGES_INSTALL) VALIDATE_XML=FALSE $(MAKE) -C $(PPRZLINK_DIR) pymessages
else
@echo GENERATE $@ with custome messages from $(CUSTOM_MESSAGES_XML)
$(Q)Q=$(Q) MESSAGES_XML=$(CUSTOM_MESSAGES_XML) MESSAGES_INSTALL=$(MESSAGES_INSTALL) $(MAKE) -C $(PPRZLINK_DIR) pymessages
endif
$(MESSAGES2_H) : $(MESSAGES_XML) generators
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
@echo GENERATE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(GENERATORS)/gen_messages2.out $< telemetry > $($@_TMP)
$(Q)mv $($@_TMP) $@
$(Q)chmod a+r $@
$(UBX_PROTOCOL_H) : $(UBX_XML) generators
@echo GENERATE $@
@@ -224,20 +216,6 @@ $(XSENS_PROTOCOL_H) : $(XSENS_XML) generators
$(Q)mv $($@_TMP) $@
$(Q)chmod a+r $@
$(DL_PROTOCOL_H) : $(MESSAGES_XML) generators
@echo GENERATE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(GENERATORS)/gen_messages.out $< datalink > $($@_TMP)
$(Q)mv $($@_TMP) $@
$(Q)chmod a+r $@
$(DL_PROTOCOL2_H) : $(MESSAGES_XML) generators
@echo GENERATE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(GENERATORS)/gen_messages2.out $< datalink > $($@_TMP)
$(Q)mv $($@_TMP) $@
$(Q)chmod a+r $@
$(ABI_MESSAGES_H) : $(ABI_XML) generators
@echo GENERATE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
@@ -245,14 +223,6 @@ $(ABI_MESSAGES_H) : $(ABI_XML) generators
$(Q)mv $($@_TMP) $@
$(Q)chmod a+r $@
$(INTERMCU_MSG_H) : $(MESSAGES_XML) generators
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
@echo GENERATE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(GENERATORS)/gen_messages.out $< intermcu > $($@_TMP)
$(Q)mv $($@_TMP) $@
$(Q)chmod a+r $@
$(MAVLINK_PROTOCOL_H) :
$(Q)make -C $(PAPARAZZI_HOME)/sw/ext mavlink
@@ -298,6 +268,7 @@ dox:
clean:
$(Q)rm -fr dox build-stamp configure-stamp conf/%gconf.xml paparazzi
$(Q)rm -f $(GEN_HEADERS)
$(Q)MESSAGES_INSTALL=$(MESSAGES_INSTALL) $(MAKE) -C $(PPRZLINK_DIR) uninstall
$(Q)rm -fr $(MAVLINK_DIR)
$(Q)find . -mindepth 2 -name Makefile -a ! -path "./sw/ext/*" -exec sh -c 'echo "Cleaning {}"; $(MAKE) -C `dirname {}` $@' \;
$(Q)$(MAKE) -C $(EXT) clean
@@ -349,7 +320,7 @@ test_sim: all
prove tests/sim
.PHONY: all print_build_version _print_building _save_build_version update_google_version init dox ground_segment ground_segment.opt \
subdirs $(SUBDIRS) conf ext libpprz multimon cockpit cockpit.opt tmtc tmtc.opt generators\
subdirs $(SUBDIRS) conf ext libpprz cockpit cockpit.opt tmtc tmtc.opt generators\
static sim_static lpctools commands \
clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible \
test test_examples test_math test_sim test_all_confs
+2 -1
View File
@@ -28,9 +28,10 @@ include conf/Makefile.local
# main directory where the generated files and compilation results for an aircraft are stored
AIRCRAFT_BUILD_DIR = $(PAPARAZZI_HOME)/var/aircrafts/$(AIRCRAFT)
CONF=$(PAPARAZZI_HOME)/conf
VAR=$(PAPARAZZI_HOME)/var
CONF_XML ?= $(CONF)/conf.xml
AIRBORNE=sw/airborne
MESSAGES_XML = $(CONF)/messages.xml
MESSAGES_XML = $(VAR)/messages.xml
# make sure the TARGET variable is set if needed for current make target
ifneq (,$(findstring $(MAKECMDGOALS),all_ac_h radio_ac_h flight_plan_ac_h))
+1 -1
View File
@@ -33,7 +33,7 @@ CC = gcc
SIMDIR = $(PAPARAZZI_SRC)/sw/simulator
CAMLINCLUDES = -I $(LIBPPRZDIR) -I $(SIMDIR) -I $(OBJDIR)
PKG = -package glibivy,pprz
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz,pprzlink
SIMSITLML = $(OBJDIR)/simsitl.ml
SITLCMA = $(SIMDIR)/sitl.cma
OPT ?= 2
-5
View File
@@ -10,7 +10,6 @@
<!ATTLIST message
name CDATA #REQUIRED
id CDATA #REQUIRED
link CDATA #IMPLIED
>
<!ELEMENT description (#PCDATA)>
@@ -19,10 +18,6 @@
<!ATTLIST field
name CDATA #REQUIRED
type CDATA #REQUIRED
format CDATA #IMPLIED
unit CDATA #IMPLIED
values CDATA #IMPLIED
alt_unit CDATA #IMPLIED
alt_unit_coef CDATA #IMPLIED
>
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE protocol SYSTEM "messages.dtd">
<!DOCTYPE protocol SYSTEM "abi.dtd">
<protocol>
<msg_class name="airborne">
+1 -1
View File
@@ -110,7 +110,7 @@ setup_actuators.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
SETUP_ACTUATORS_MODEM_PORT_LOWER=$(shell echo $(MODEM_PORT) | tr A-Z a-z)
setup_actuators.CFLAGS += -DDOWNLINK -DDOWNLINK_DEVICE=$(SETUP_ACTUATORS_MODEM_PORT_LOWER) -DPPRZ_UART=$(SETUP_ACTUATORS_MODEM_PORT_LOWER)
setup_actuators.CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ
setup_actuators.srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c
setup_actuators.srcs += subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c
setup_actuators.srcs += subsystems/actuators.c
setup_actuators.srcs += $(SRC_FIRMWARE)/setup_actuators.c
@@ -196,7 +196,7 @@ sim.CFLAGS += -DSITL
sim.srcs += $(SRC_ARCH)/sim_ap.c
sim.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_TRANSPORT=ivy_tp -DDOWNLINK_DEVICE=ivy_tp
sim.srcs += subsystems/datalink/downlink.c $(SRC_FIRMWARE)/datalink.c subsystems/datalink/ivy_transport.c subsystems/datalink/telemetry.c $(SRC_FIRMWARE)/ap_downlink.c $(SRC_FIRMWARE)/fbw_downlink.c
sim.srcs += subsystems/datalink/downlink.c $(SRC_FIRMWARE)/datalink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/ivy_transport.c subsystems/datalink/telemetry.c $(SRC_FIRMWARE)/ap_downlink.c $(SRC_FIRMWARE)/fbw_downlink.c
sim.srcs += $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_adc_generic.c
@@ -7,7 +7,7 @@ ifeq ($(TARGET),fbw)
INTERMCU_PORT_LOWER = $(shell echo $(INTERMCU_PORT) | tr A-Z a-z)
fbw.CFLAGS += -DINTERMCU_LINK=$(INTERMCU_PORT_LOWER) -DUSE_$(INTERMCU_PORT) -D$(INTERMCU_PORT)_BAUD=B230400
fbw.CFLAGS += -DINTER_MCU_FBW
fbw.srcs += subsystems/datalink/pprz_transport.c
fbw.srcs += $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c
fbw.srcs += subsystems/intermcu/intermcu_fbw.c
else
INTERMCU_PORT ?= UART3
@@ -18,6 +18,6 @@ else
$(TARGET).CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
ap.srcs += subsystems/intermcu/intermcu_ap.c
ap.srcs += subsystems/datalink/pprz_transport.c
ap.srcs += (PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c
$(TARGET).srcs += subsystems/radio_control.c
endif
@@ -1,7 +1,7 @@
# Hey Emacs, this is a -*- makefile -*-
sdlog_CFLAGS = -DDOWNLINK -DUSE_PPRZLOG
sdlog_srcs = subsystems/datalink/downlink.c subsystems/datalink/pprzlog_transport.c
sdlog_srcs = subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprzlog_transport.c
ap.CFLAGS += $(sdlog_CFLAGS)
ap.srcs += $(sdlog_srcs)
@@ -32,4 +32,4 @@ ap.CFLAGS += -DMODEM_LED=$(MODEM_LED)
endif
ap.srcs += $(SRC_SUBSYSTEMS)/datalink/downlink.c $(SRC_SUBSYSTEMS)/datalink/bluegiga.c
ap.srcs += $(SRC_SUBSYSTEMS)/datalink/pprz_transport.c $(SRC_SUBSYSTEMS)/datalink/telemetry.c
ap.srcs += $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c $(SRC_SUBSYSTEMS)/datalink/telemetry.c
@@ -1,3 +1,3 @@
$(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_TRANSPORT=ivy_tp -DDOWNLINK_DEVICE=ivy_tp
$(TARGET).srcs += subsystems/datalink/ivy_transport.c
$(TARGET).srcs += $(PAPARAZZI_HOME)/var/share/pprzlink/src/ivy_transport.c
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/telemetry.c
@@ -7,4 +7,4 @@ $(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=superbitrf
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=SUPERBITRF
$(TARGET).srcs += peripherals/cyrf6936.c
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/superbitrf.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/superbitrf.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c
@@ -13,5 +13,5 @@ $(TARGET).CFLAGS += -D$(PPRZ_MODEM_PORT_UPPER)_BAUD=$(MODEM_BAUD)
$(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(PPRZ_MODEM_PORT_LOWER) -DPPRZ_UART=$(PPRZ_MODEM_PORT_LOWER)
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
$(TARGET).srcs += subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c
@@ -19,5 +19,5 @@ TELEM_CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ
$(TARGET).CFLAGS += $(MODEM_CFLAGS) $(TELEM_CFLAGS)
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
$(TARGET).srcs += subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c
@@ -4,7 +4,7 @@
$(TARGET).CFLAGS += -DDOWNLINK -DDOWNLINK_DEVICE=usb_serial -DPPRZ_UART=usb_serial
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ -DUSE_USB_SERIAL
$(TARGET).CFLAGS += -DPERIODIC_TELEMETRY
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
$(TARGET).srcs += subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c
ifeq ($(ARCH), lpc21)
$(TARGET).srcs += $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
@@ -10,7 +10,7 @@ W5100_MULTICAST_PORT ?= "1234"
$(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=chip0
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=W5100
$(TARGET).CFLAGS += -DW5100_IP=$(W5100_IP) -DW5100_SUBNET=$(W5100_SUBNET) -DW5100_MULTICAST_IP=$(W5100_MULTICAST_IP) -DW5100_MULTICAST_PORT=$(W5100_MULTICAST_PORT)
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/w5100.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/w5100.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c
ifeq ($(ARCH), lpc21)
# only an issue of setting the DRDY pin in w5100.c, which is stm32 specific
@@ -14,4 +14,4 @@ $(TARGET).CFLAGS += -D$(XBEE_MODEM_PORT_UPPER)_BAUD=$(MODEM_BAUD) -DXBEE_BAUD=$(
$(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(XBEE_MODEM_PORT_LOWER) -DXBEE_UART=$(XBEE_MODEM_PORT_LOWER)
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=xbee_tp -DDATALINK=XBEE
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/xbee.c subsystems/datalink/telemetry.c
$(TARGET).srcs += subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/xbee_transport.c subsystems/datalink/telemetry.c
+1 -1
View File
@@ -70,7 +70,7 @@ endif
# pprz downlink/datalink
COMMON_TELEMETRY_CFLAGS = -DDOWNLINK -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ
COMMON_TELEMETRY_SRCS = subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c
COMMON_TELEMETRY_SRCS = subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c
# check if we are using UDP
ifneq (,$(findstring UDP, $(MODEM_DEV)))
-2909
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -54,7 +54,7 @@ Do not use start/stop functionality of the module, the module is not intended to
ap.CFLAGS += -DLOGGER_LED=$(LOGGER_LED)
endif
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/pprzlog_transport.c
ap.srcs += subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprzlog_transport.c
include $(CFG_SHARED)/spi_master.makefile
</raw>
-22
View File
@@ -1,22 +0,0 @@
<!-- Table of default units convertion -->
<!-- used to convert from unit to alt_unit (messages) or code_unit (airframe) -->
<units>
<unit from="m" to="ft" coef="3.28084"/>
<unit from="ft" to="m" coef="0.3048"/>
<unit from="m" to="cm" coef="100."/>
<unit from="cm" to="m" coef="0.01"/>
<unit from="m/s" to="cm/s" coef="100."/>
<unit from="cm/s" to="m/s" coef="0.01"/>
<unit from="m" to="mm" coef="1000."/>
<unit from="mm" to="m" coef="0.001"/>
<unit from="m/s" to="mm/s" coef="1000."/>
<unit from="mm/s" to="m/s" coef="0.001"/>
<unit from="decideg" to="deg" coef="0.1"/>
<unit from="deg" to="decideg" coef="10."/>
<unit from="centideg" to="deg" coef="0.01"/>
<unit from="deg" to="centideg" coef="100."/>
<unit from="deg" to="rad" coef="0.0174532925" auto="code"/>
<unit from="rad" to="deg" coef="57.2957795131" auto="display"/>
<unit from="deg/s" to="rad/s" coef="0.0174532925" auto="code"/>
<unit from="rad/s" to="deg/s" coef="57.2957795131" auto="display"/>
</units>
+7 -3
View File
@@ -34,13 +34,17 @@ OCAMLC = ocamlfind ocamlc
OCAMLOPT = ocamlfind ocamlopt
OCAMLDEP = ocamlfind ocamldep
OCAMLMKLIB = ocamlmklib
OCAMLLEX=ocamllex
OCAMLYACC=ocamlyacc
OCAMLLIBDIR=$(shell $(OCAMLC) -where)
LIBPPRZLINKDIR = $(PAPARAZZI_HOME)/var/lib/ocaml
LIBPPRZDIR = $(PAPARAZZI_SRC)/sw/lib/ocaml
LIBPPRZCMA = $(LIBPPRZDIR)/lib-pprz.cma
LIBPPRZCMXA = $(LIBPPRZCMA:.cma=.cmxa)
XLIBPPRZCMA = $(LIBPPRZDIR)/xlib-pprz.cma
XLIBPPRZCMXA = $(XLIBPPRZCMA:.cma=.cmxa)
OCAMLDLL = -dllpath $(LIBPPRZDIR)
OCAMLXDLL = -dllpath $(LIBPPRZDIR)
OCAMLDLL = -dllpath $(LIBPPRZDIR),$(LIBPPRZLINKDIR)
OCAMLXDLL = -dllpath $(LIBPPRZDIR),$(LIBPPRZLINKDIR)
OCAMLPATH:=$(shell echo $(LIBPPRZDIR):$(OCAMLPATH))
OCAMLPATH:=$(shell echo $(LIBPPRZLINKDIR):$(LIBPPRZDIR):$(OCAMLPATH))
export OCAMLPATH
@@ -32,7 +32,7 @@
#define SPI_SLAVE_HS_ARCH_H
#include "std.h"
#include "mcu_periph/link_device.h"
#include "pprzlink/pprzlink_device.h"
struct spi_slave_hs {
/** Generic device interface */
+1 -1
View File
@@ -35,7 +35,7 @@
// Downlink
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#ifndef IMU_APOGEE_CHAN_X
+1 -1
View File
@@ -36,7 +36,7 @@
#include "subsystems/abi.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#ifdef BARO_PERIODIC_FREQUENCY
+1 -1
View File
@@ -36,7 +36,7 @@
#include "subsystems/abi.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#ifdef BARO_PERIODIC_FREQUENCY
+1 -1
View File
@@ -38,7 +38,7 @@
// Downlink
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
+1 -1
View File
@@ -38,7 +38,7 @@
// Downlink
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#if !defined KROOZ_LOWPASS_FILTER && !defined KROOZ_SMPLRT_DIV
+1 -1
View File
@@ -38,7 +38,7 @@
// Downlink
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
+1 -1
View File
@@ -37,7 +37,7 @@
// Downlink
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
+1 -1
View File
@@ -165,7 +165,7 @@ static inline void autopilot_ClearSettings(float clear)
}
#if DOWNLINK
#include "subsystems/datalink/transport.h"
#include "pprzlink/pprzlink_transport.h"
extern void send_autopilot_version(struct transport_tx *trans, struct link_device *dev);
#endif
@@ -13,7 +13,7 @@
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "generated/settings.h"
@@ -6,7 +6,7 @@
#include "mcu_periph/uart.h"
#include "mcu_arch.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "armVIC.h"
+1 -1
View File
@@ -179,7 +179,7 @@ static inline void autopilot_ClearSettings(float clear)
}
#if DOWNLINK
#include "subsystems/datalink/transport.h"
#include "pprzlink/pprzlink_transport.h"
extern void send_autopilot_version(struct transport_tx *trans, struct link_device *dev);
#endif
+2 -2
View File
@@ -34,8 +34,8 @@
#include "generated/settings.h"
#include "subsystems/datalink/downlink.h"
#include "messages.h"
#include "dl_protocol.h"
#include "pprzlink/messages.h"
#include "pprzlink/dl_protocol.h"
#include "mcu_periph/uart.h"
#if defined RADIO_CONTROL && defined RADIO_CONTROL_TYPE_DATALINK
@@ -45,7 +45,7 @@
#include "math/pprz_algebra_int.h"
#include "subsystems/datalink/downlink.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "mcu_periph/uart.h"
struct EnuCoor_i navigation_target;
+1 -1
View File
@@ -4,7 +4,7 @@
#include "led.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
static inline void main_init(void);
+1 -1
View File
@@ -4,7 +4,7 @@
#include "led.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
static inline void main_init(void);
+1 -1
View File
@@ -4,7 +4,7 @@
#include "led.h"
#include "mcu_periph/usb_serial.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
static inline void main_init(void);
+2 -2
View File
@@ -4,12 +4,12 @@
#include "led.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "subsystems/datalink/datalink.h"
#include "generated/settings.h"
#include "dl_protocol.h"
#include "pprzlink/dl_protocol.h"
#include "wt_servo.h"
+2 -2
View File
@@ -4,12 +4,12 @@
#include "led.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "subsystems/datalink/datalink.h"
#include "generated/settings.h"
#include "dl_protocol.h"
#include "pprzlink/dl_protocol.h"
#include "i2c.h"
#include "mb_twi_controller_mkk.h"
-58
View File
@@ -1,58 +0,0 @@
/*
* Copyright (C) 2014 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/>.
*
*/
/** \file mcu_periph/link_device.h
* generic device header
*/
#ifndef LINK_DEVICE_H
#define LINK_DEVICE_H
#include <inttypes.h>
/** Function pointers definition
*
* they are used to cast the real functions with the correct type
* to store in the device structure
*/
typedef int (*check_free_space_t)(void *, uint8_t);
typedef void (*put_byte_t)(void *, uint8_t);
typedef void (*send_message_t)(void *);
typedef int (*char_available_t)(void *);
typedef uint8_t (*get_byte_t)(void *);
/** Device structure
*/
struct link_device {
check_free_space_t check_free_space; ///< check if transmit buffer is not full
put_byte_t put_byte; ///< put one byte
send_message_t send_message; ///< send completed buffer
char_available_t char_available; ///< check if a new character is available
get_byte_t get_byte; ///< get a new char
void *periph; ///< pointer to parent implementation
uint16_t nb_msgs; ///< The number of messages send
uint8_t nb_ovrn; ///< The number of overruns
uint32_t nb_bytes; ///< The number of bytes send
};
#endif // LINK_DEVICE_H
+1
View File
@@ -246,6 +246,7 @@ void uart_periph_init(struct uart_periph *p)
p->device.send_message = (send_message_t)null_function;
p->device.char_available = (char_available_t)uart_char_available;
p->device.get_byte = (get_byte_t)uart_getch;
p->device.set_baudrate = (set_baudrate_t)uart_periph_set_baudrate;
#if PERIODIC_TELEMETRY
// the first to register do it for the others
+1 -1
View File
@@ -29,7 +29,7 @@
#define MCU_PERIPH_UART_H
#include "mcu_periph/uart_arch.h"
#include "mcu_periph/link_device.h"
#include "pprzlink/pprzlink_device.h"
#include "std.h"
#ifndef UART_RX_BUFFER_SIZE
+1 -1
View File
@@ -30,7 +30,7 @@
#include "std.h"
#include "mcu_periph/udp_arch.h"
#include "mcu_periph/link_device.h"
#include "pprzlink/pprzlink_device.h"
#define UDP_RX_BUFFER_SIZE 256
#define UDP_TX_BUFFER_SIZE 256
+1 -1
View File
@@ -30,7 +30,7 @@
#include <inttypes.h>
#include "std.h"
#include "mcu_periph/link_device.h"
#include "pprzlink/pprzlink_device.h"
struct usb_serial_periph {
/** Generic device interface */
+1 -1
View File
@@ -1,7 +1,7 @@
#include "adc_generic.h"
#include "mcu_periph/adc.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include BOARD_CONFIG
+1 -1
View File
@@ -27,7 +27,7 @@
#include "led.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "max11040.h"
#include "adcs/max11040_hw.h"
@@ -8,7 +8,7 @@
#include "firmwares/fixedwing/guidance/guidance_v.h"
#include "state.h"
#include "messages.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "mcu_periph/uart.h"
#include "generated/airframe.h"

Some files were not shown because too many files have changed in this diff Show More