diff --git a/.gitignore b/.gitignore
index 56364c34ca..91fcea346b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
*.out
*~
+*.swp
*.pyc
@@ -16,15 +17,35 @@
*.aux
+# Debian related files
+*.deb
+*.dsc
+*.changes
+*.substvars
+*.debhelper.log
+*-stamp
+/debian/control
+/debian/changelog
+/debian/files
+/debian/paparazzi-arm7
+/debian/paparazzi-avr
+/debian/paparazzi-dev
+/debian/paparazzi-bin
+/sw/lib/ocaml/ivy/debian/changelog
+/sw/lib/ocaml/ivy/debian/files
+/sw/lib/ocaml/ivy/debian/ivy-ocaml
+
/var
/dox
+/paparazzi
# /conf/
/conf/conf.xml
/conf/conf.xml.20*
/conf/control_panel.xml
/conf/%gconf.xml
+/conf/srtm_data/*
# /doc/pprz_algebra/
/doc/pprz_algebra/headfile.log
@@ -77,6 +98,7 @@
# /sw/simulator/
/sw/simulator/gaia
/sw/simulator/simhitl
+/sw/simulator/launchsitl
# /sw/supervision/
/sw/supervision/gtk_process.ml
@@ -86,3 +108,17 @@
# /sw/tools/
/sw/tools/fp_parser.ml
/sw/tools/wiki_gen/wiki_gen
+
+# /sw/ground_segment/joystick
+/sw/ground_segment/joystick/test_stick
+
+# /sw/airborne/arch/lpc21/test/bootloader
+/sw/airborne/arch/lpc21/test/bootloader/bl.dmp
+/sw/airborne/arch/lpc21/test/bootloader/bl.hex
+/sw/airborne/arch/lpc21/test/bootloader/bl.map
+/sw/airborne/arch/lpc21/test/bootloader/bl.elf
+/sw/airborne/arch/lpc21/test/bootloader/bl_ram.dmp
+/sw/airborne/arch/lpc21/test/bootloader/bl_ram.hex
+/sw/airborne/arch/lpc21/test/bootloader/bl_ram.map
+/sw/airborne/arch/lpc21/test/bootloader/bl_ram.elf
+/sw/airborne/arch/lpc21/test/bootloader/crt.lst
diff --git a/Doxyfile b/Doxyfile
index fb6c91fc1e..934897d58e 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.2
+# Doxyfile 1.6.3
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
@@ -14,524 +14,669 @@
# Project related configuration options
#---------------------------------------------------------------------------
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = Paparazzi3
+PROJECT_NAME = Paparazzi
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 3
+PROJECT_NUMBER = 4
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = dox
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
# otherwise cause performance problems for the file system.
CREATE_SUBDIRS = NO
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
-# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
-# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
-# Swedish, and Ukrainian.
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
OUTPUT_LANGUAGE = English
-# This tag can be used to specify the encoding used in the generated output.
-# The encoding is not always determined by the language that is chosen,
-# but also whether or not the output is meant for Windows or non-Windows users.
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
-# forces the Windows encoding (this is the default for the Windows binary),
-# whereas setting the tag to NO uses a Unix-style encoding (the default for
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
# Set to NO to disable this.
BRIEF_MEMBER_DESC = YES
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
REPEAT_BRIEF = YES
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
# "represents" "a" "an" "the"
-ABBREVIATE_BRIEF =
+ABBREVIATE_BRIEF =
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
# description.
ALWAYS_DETAILED_SEC = NO
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
INLINE_INHERITED_MEMB = NO
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
# to NO the shortest path that makes the file name unique will be used.
FULL_PATH_NAMES = YES
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
# path to strip.
-STRIP_FROM_PATH =
+STRIP_FROM_PATH =
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
# are normally passed to the compiler using the -I flag.
-STRIP_FROM_INC_PATH =
+STRIP_FROM_INC_PATH =
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
# doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = NO
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like the Qt-style comments (thus requiring an
-# explicit @brief command for a brief description.
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
JAVADOC_AUTOBRIEF = NO
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
# description. Set this tag to YES if you prefer the old behaviour instead.
MULTILINE_CPP_IS_BRIEF = NO
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
-# documentation.
-
-DETAILS_AT_TOP = YES
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
# re-implements.
INHERIT_DOCS = YES
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
# be part of the file/class/namespace that contains it.
SEPARATE_MEMBER_PAGES = NO
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
TAB_SIZE = 2
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
-ALIASES =
+ALIASES =
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
# of all members will be omitted, etc.
OPTIMIZE_OUTPUT_FOR_C = YES
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
-# only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
-# will look different, etc.
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
OPTIMIZE_OUTPUT_JAVA = NO
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses.
+# With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
+# The format is ext=language, where ext is a file extension, and language is one of
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
# the \nosubgrouping command.
SUBGROUPING = YES
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
EXTRACT_ALL = YES
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation.
EXTRACT_PRIVATE = YES
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
EXTRACT_STATIC = YES
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
# If set to NO only classes defined in header files are included.
EXTRACT_LOCAL_CLASSES = YES
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
# If set to NO (the default) only methods in the interface are included.
EXTRACT_LOCAL_METHODS = NO
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
# This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_MEMBERS = NO
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_CLASSES = NO
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
# documentation.
HIDE_FRIEND_COMPOUNDS = NO
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
# function's detailed documentation block.
HIDE_IN_BODY_DOCS = NO
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.
INTERNAL_DOCS = NO
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
CASE_SENSE_NAMES = YES
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
# documentation. If set to YES the scope will be hidden.
HIDE_SCOPE_NAMES = NO
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
# of that file.
SHOW_INCLUDE_FILES = YES
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
INLINE_INFO = YES
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
# declaration order.
SORT_MEMBER_DOCS = YES
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
# declaration order.
SORT_BRIEF_DOCS = NO
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
+# Note: This option applies only to the class list, not to the
# alphabetical list.
SORT_BY_SCOPE_NAME = NO
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
GENERATE_TODOLIST = YES
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
# commands in the documentation.
GENERATE_TESTLIST = YES
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
# commands in the documentation.
GENERATE_BUGLIST = YES
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
# \deprecated commands in the documentation.
GENERATE_DEPRECATEDLIST= YES
-# The ENABLED_SECTIONS tag can be used to enable conditional
+# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
-ENABLED_SECTIONS =
+ENABLED_SECTIONS =
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
# command in the documentation regardless of this setting.
MAX_INITIALIZER_LINES = 30
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
# list will mention the files that were used to generate the documentation.
SHOW_USED_FILES = YES
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation.
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
SHOW_DIRECTORIES = YES
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from the
-# version control system). Doxygen will invoke the program by executing (via
-# popen()) the command , where is the value of
-# the FILE_VERSION_FILTER tag, and is the name of an input file
-# provided by doxygen. Whatever the progam writes to standard output
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command , where is the value of
+# the FILE_VERSION_FILTER tag, and is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
# is used as the file version. See the manual for examples.
-FILE_VERSION_FILTER =
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
+
+LAYOUT_FILE =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-# The QUIET tag can be used to turn on/off the messages that are generated
+# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
QUIET = NO
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
# NO is used.
WARNINGS = YES
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
# automatically be disabled.
WARN_IF_UNDOCUMENTED = YES
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
# don't exist or using markup commands wrongly.
WARN_IF_DOC_ERROR = YES
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
# documentation.
WARN_NO_PARAMDOC = NO
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
# be obtained via FILE_VERSION_FILTER)
WARN_FORMAT = "$file:$line: $text"
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
# to stderr.
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = sw/airborne/booz_priv sw/airborne/booz_priv/ sw/airborne/booz_priv/arm7 sw/airborne/ sw/airborne/arm7
+INPUT = sw/airborne sw/airborne/math
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
-FILE_PATTERNS =
+INPUT_ENCODING = UTF-8
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
RECURSIVE = NO
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
-EXCLUDE =
+EXCLUDE = var
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
# from the input.
EXCLUDE_SYMLINKS = NO
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
-EXCLUDE_PATTERNS =
+EXCLUDE_PATTERNS =
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
# the \include command).
-EXAMPLE_PATH =
+EXAMPLE_PATH =
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
-EXAMPLE_PATTERNS =
+EXAMPLE_PATTERNS =
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
# Possible values are YES and NO. If left blank NO is used.
EXAMPLE_RECURSIVE = NO
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
# the \image command).
-IMAGE_PATH =
+IMAGE_PATH =
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command , where
-# is the value of the INPUT_FILTER tag, and is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command , where
+# is the value of the INPUT_FILTER tag, and is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
# ignored.
-INPUT_FILTER =
+INPUT_FILTER =
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
# is applied to all files.
-FILTER_PATTERNS =
+FILTER_PATTERNS =
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
# files to browse (i.e. when SOURCE_BROWSER is set to YES).
FILTER_SOURCE_FILES = NO
@@ -540,38 +685,54 @@ FILTER_SOURCE_FILES = NO
# configuration options related to source browsing
#---------------------------------------------------------------------------
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
# VERBATIM_HEADERS is set to NO.
SOURCE_BROWSER = YES
-# Setting the INLINE_SOURCES tag to YES will include the body
+# Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation.
INLINE_SOURCES = NO
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
STRIP_CODE_COMMENTS = YES
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
-# then for each documented function all documented
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
# functions referencing it will be listed.
REFERENCED_BY_RELATION = YES
-# If the REFERENCES_RELATION tag is set to YES (the default)
-# then for each documented function all documented entities
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
# called/used by that function will be listed.
REFERENCES_RELATION = YES
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES
@@ -580,279 +741,424 @@ VERBATIM_HEADERS = YES
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
# contains a lot of classes, structs, unions or interfaces.
ALPHABETICAL_INDEX = NO
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20])
COLS_IN_ALPHA_INDEX = 5
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
# should be ignored while generating the index headers.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
# generate HTML output.
GENERATE_HTML = YES
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
HTML_OUTPUT = html
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
# doxygen will generate files with .html extension.
HTML_FILE_EXTENSION = .html
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
# standard header.
-HTML_HEADER =
+HTML_HEADER =
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
# standard footer.
-HTML_FOOTER =
+HTML_FOOTER =
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
# stylesheet in the HTML output directory as well, or it will be erased!
-HTML_STYLESHEET =
+HTML_STYLESHEET =
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
HTML_ALIGN_MEMBERS = YES
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = YES
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
# of the generated HTML documentation.
GENERATE_HTMLHELP = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
# written to the html output directory.
-CHM_FILE =
+CHM_FILE =
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
# the HTML help compiler on the generated index.hhp.
-HHC_LOCATION =
+HHC_LOCATION =
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
# it should be included in the master .chm file (NO).
GENERATE_CHI = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
# normal table of contents (NO) in the .chm file.
BINARY_TOC = NO
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
# to the contents of the HTML help documentation and to the tree view.
TOC_EXPAND = NO
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# Qt Help Project / Custom Filters .
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# Qt Help Project / Filter Attributes .
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
DISABLE_INDEX = NO
-# This tag can be used to set the number of enum values (range [1..20])
+# This tag can be used to set the number of enum values (range [1..20])
# that doxygen will group on one line in the generated HTML documentation.
ENUM_VALUES_PER_LINE = 4
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
GENERATE_TREEVIEW = NO
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
# is shown.
TREEVIEW_WIDTH = 250
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH = NO
+
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
-GENERATE_LATEX = YES
+GENERATE_LATEX = NO
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `latex' will be used as the default path.
LATEX_OUTPUT = latex
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
LATEX_CMD_NAME = latex
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
# default command name.
MAKEINDEX_CMD_NAME = makeindex
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_LATEX = NO
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
# executive. If left blank a4wide will be used.
PAPER_TYPE = a4wide
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
# packages that should be included in the LaTeX output.
-EXTRA_PACKAGES =
+EXTRA_PACKAGES =
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
# standard header. Notice: only use this tag if you know what you are doing!
-LATEX_HEADER =
+LATEX_HEADER =
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
PDF_HYPERLINKS = NO
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation.
USE_PDFLATEX = NO
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
# This option is also used when generating formulas in HTML.
LATEX_BATCHMODE = NO
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
# in the output.
LATEX_HIDE_INDICES = NO
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
# other RTF readers or editors.
GENERATE_RTF = NO
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `rtf' will be used as the default path.
RTF_OUTPUT = rtf
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_RTF = NO
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
# Note: wordpad (write) and others do not support links.
RTF_HYPERLINKS = NO
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
-# Set optional variables used in the generation of an rtf document.
+# Set optional variables used in the generation of an rtf document.
# Syntax is similar to doxygen's config file.
-RTF_EXTENSIONS_FILE =
+RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
GENERATE_MAN = NO
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `man' will be used as the default path.
MAN_OUTPUT = man
-# The MAN_EXTENSION tag determines the extension that is added to
+# The MAN_EXTENSION tag determines the extension that is added to
# the generated man pages (default is the subroutine's section .3)
MAN_EXTENSION = .3
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
# would be unable to find the correct page. The default is NO.
MAN_LINKS = NO
@@ -861,33 +1167,33 @@ MAN_LINKS = NO
# configuration options related to the XML output
#---------------------------------------------------------------------------
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
# the code including all documentation.
GENERATE_XML = NO
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `xml' will be used as the default path.
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
# syntax of the XML files.
-XML_SCHEMA =
+XML_SCHEMA =
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
# syntax of the XML files.
-XML_DTD =
+XML_DTD =
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
# enabling this will significantly increase the size of the XML output.
XML_PROGRAMLISTING = YES
@@ -896,10 +1202,10 @@ XML_PROGRAMLISTING = YES
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
# and incomplete at the moment.
GENERATE_AUTOGEN_DEF = NO
@@ -908,311 +1214,341 @@ GENERATE_AUTOGEN_DEF = NO
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
# moment.
GENERATE_PERLMOD = NO
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
# to generate PDF and DVI output from the Perl module output.
PERLMOD_LATEX = NO
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
# and Perl will parse it just the same.
PERLMOD_PRETTY = YES
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
# Makefile don't overwrite each other's variables.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
+# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
# files.
ENABLE_PREPROCESSING = YES
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES.
MACRO_EXPANSION = NO
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
EXPAND_ONLY_PREDEF = NO
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
SEARCH_INCLUDES = YES
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
# the preprocessor.
-INCLUDE_PATH = var/BOOZ2_flixr var/include sw/include sw/airborne/booz_priv sw/airborne/booz_priv/ sw/airborne/booz_priv/arm7 sw/airborne/ sw/airborne/arm7 var/BOOZ2_flixr
+INCLUDE_PATH = sw/include \
+ sw/airborne
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
# be used.
-INCLUDE_FILE_PATTERNS =
+INCLUDE_FILE_PATTERNS =
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
-PREDEFINED = KILL_SWITCH USE_BUSS_TWI_BLMC USE_AMI601
+PREDEFINED = KILL_SWITCH \
+ USE_BUSS_TWI_BLMC \
+ USE_AMI601
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
-EXPAND_AS_DEFINED =
+EXPAND_AS_DEFINED =
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
# the parser if not removed.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration::additions related to external references
#---------------------------------------------------------------------------
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
# does not have to be run to correct the links.
# Note that each tag file must have a unique name
# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
+# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
-TAGFILES =
+TAGFILES =
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.
-GENERATE_TAGFILE =
+GENERATE_TAGFILE =
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
# will be listed.
ALLEXTERNALS = NO
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
# be listed.
EXTERNAL_GROUPS = YES
-# The PERL_PATH should be the absolute path and name of the perl script
+# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration options related to the dot tool
#---------------------------------------------------------------------------
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
# powerful graphs.
CLASS_DIAGRAMS = YES
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
# or is not a class.
HIDE_UNDOC_RELATIONS = YES
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)
HAVE_DOT = YES
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
# the CLASS_DIAGRAMS tag to NO.
CLASS_GRAPH = YES
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
# class references variables) of the class with other documented classes.
COLLABORATION_GRAPH = YES
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for groups, showing the direct groups dependencies
GROUP_GRAPHS = YES
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
UML_LOOK = NO
-# If set to YES, the inheritance and collaboration graphs will show the
+# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.
TEMPLATE_RELATIONS = NO
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
# other documented files.
INCLUDE_GRAPH = YES
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
# indirectly include this file.
INCLUDED_BY_GRAPH = YES
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
-CALL_GRAPH = NO
+CALL_GRAPH = YES
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
# will graphical hierarchy of all classes instead of a textual one.
GRAPHICAL_HIERARCHY = YES
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
# in a graphical way. The dependency relations are determined by the #include
# relations between the files in the directories.
DIRECTORY_GRAPH = YES
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. Possible values are png, jpg, or gif
# If left blank png will be used.
-DOT_IMAGE_FORMAT = png
+DOT_IMAGE_FORMAT = gif
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
-DOT_PATH =
+DOT_PATH =
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
# \dotfile command).
-DOTFILE_DIRS =
+DOTFILE_DIRS =
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-MAX_DOT_GRAPH_WIDTH = 1024
+DOT_GRAPH_MAX_NODES = 50
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that a graph may be further truncated if the graph's
-# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
-# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
-# the graph is not depth-constrained.
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
MAX_DOT_GRAPH_DEPTH = 0
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, which results in a white background.
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
DOT_TRANSPARENT = NO
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
# support this, this feature is disabled by default.
DOT_MULTI_TARGETS = NO
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
# arrows in the dot generated graphs.
GENERATE_LEGEND = YES
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
# the various graphs.
DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = NO
diff --git a/Makefile b/Makefile
index d1f4c2f58e..516f73a2ec 100644
--- a/Makefile
+++ b/Makefile
@@ -60,14 +60,14 @@ XSENS_XML = $(CONF)/xsens_MTi-G.xml
TOOLS=$(PAPARAZZI_SRC)/sw/tools
HAVE_ARM_NONE_EABI_GCC := $(shell which arm-none-eabi-gcc)
ifeq ($(strip $(HAVE_ARM_NONE_EABI_GCC)),)
-#ARMGCC=/opt/paparazzi/bin/arm-elf-gcc
-ARMGCC=/usr/bin/arm-elf-gcc
+ARMGCC=$(shell which arm-elf-gcc)
else
ARMGCC=$(HAVE_ARM_NONE_EABI_GCC)
endif
+OCAML=$(shell which ocaml)
+OCAMLRUN=$(shell which ocamlrun)
-
-all: static conf
+all: commands static conf
static : lib center tools cockpit multimon tmtc logalizer lpc21iap sim_static static_h usb_lib
@@ -211,6 +211,7 @@ clean:
rm -f $(MESSAGES_H) $(MESSAGES2_H) $(UBX_PROTOCOL_H) $(DL_PROTOCOL_H)
find . -mindepth 2 -name Makefile -exec sh -c '$(MAKE) -C `dirname {}` $@' \;
find . -name '*~' -exec rm -f {} \;
+ rm -f paparazzi sw/simulator/launchsitl
cleanspaces:
find ./sw/airborne -name '*.[ch]' -exec sed -i {} -e 's/[ \t]*$$//' \;
@@ -219,16 +220,32 @@ cleanspaces:
find ./sw -name '*.mli' -exec sed -i {} -e 's/[ \t]*$$//' ';'
find ./conf -name '*.xml' -exec sed -i {} -e 's/[ \t]*$$//' ';'
+distclean : dist_clean
dist_clean : clean
+ rm -r conf/srtm_data
ab_clean:
find sw/airborne -name '*~' -exec rm -f {} \;
test_all_example_airframes:
- $(MAKE) AIRCRAFT=BOOZ2_A2 clean_ac ap
- $(MAKE) AIRCRAFT=MJ5 clean_ac ap sim
- $(MAKE) AIRCRAFT=TJ1 clean_ac ap sim
- $(MAKE) AIRCRAFT=HITL clean_ac ap
- $(MAKE) AIRCRAFT=DM clean_ac ap sim
- $(MAKE) AIRCRAFT=CSC clean_ac ap
+ $(MAKE) AIRCRAFT=BOOZ2_A1 clean_ac ap sim
+ $(MAKE) AIRCRAFT=Microjet clean_ac ap sim
+ $(MAKE) AIRCRAFT=Tiny_IMU clean_ac ap
+ $(MAKE) AIRCRAFT=EasyStar_ETS clean_ac ap sim
+
+commands: paparazzi sw/simulator/launchsitl
+
+paparazzi:
+ cat src/paparazzi | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
+ chmod a+x $@
+
+sw/simulator/launchsitl:
+ cat src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
+ chmod a+x $@
+
+#.SUFFIXES: .hgt.zip
+
+%.hgt.zip:
+ cd data/srtm; $(MAKE) $(@)
+
diff --git a/Makefile.ac b/Makefile.ac
index 93e3c50fc1..3e8d6c7ec1 100644
--- a/Makefile.ac
+++ b/Makefile.ac
@@ -53,14 +53,13 @@ TUNING_H=$(AC_GENERATED)/tuning.h
SUPERVISION=./paparazzi
MAKE=make PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME)
MODULES_H=$(AC_GENERATED)/modules.h
-MODULES_DIR=$(PAPARAZZI_HOME)/conf/modules/
AIRCRAFT_MD5=$(AIRCRAFT_CONF_DIR)/aircraft.md5
# "make Q=''" to get full echo
Q=@
init:
- @[ -d $(PAPARAZZI_HOME) ] || (echo "Copying config example in your $(PAPARAZZI_HOME) directory"; mkdir -p $(PAPARAZZI_HOME); cp -a conf $(PAPARAZZI_HOME); cp -a data $(PAPARAZZI_HOME); mkdir -p $(PAPARAZZI_HOME)/var/maps; mv $(PAPARAZZI_HOME)/data/maps/trtqtttqtsrrt*.jpg $(PAPARAZZI_HOME)/var/maps; mkdir -p $(PAPARAZZI_HOME)/var/include)
+ @[ -d $(PAPARAZZI_HOME) ] || (echo "Copying config example in your $(PAPARAZZI_HOME) directory"; mkdir -p $(PAPARAZZI_HOME); cp -a conf $(PAPARAZZI_HOME); cp -a data $(PAPARAZZI_HOME); mkdir -p $(PAPARAZZI_HOME)/var/maps; mkdir -p $(PAPARAZZI_HOME)/var/include)
demo:
$(SUPERVISION)
@@ -132,7 +131,7 @@ $(TUNING_H) : $(SETTINGS_XMLS) $(CONF_XML) $(TOOLS)/gen_tuning.out
$(MODULES_H) : $(CONF)/$(AIRFRAME_XML) $(TOOLS)/gen_modules.out $(CONF)/modules/*.xml
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
@echo BUILD $@
- $(Q)$(TOOLS)/gen_modules.out $(MODULES_DIR) $(SETTINGS_MODULES) $< > $@
+ $(Q)$(TOOLS)/gen_modules.out $(SETTINGS_MODULES) $< > $@
$(Q)chmod a+r $@
$(SETTINGS_MODULES) : $(MODULES_H)
diff --git a/Makefile.install b/Makefile.install
index 978a38ec64..1acf59704f 100644
--- a/Makefile.install
+++ b/Makefile.install
@@ -19,13 +19,11 @@ install_data:
$(INSTALL) -d $(DESTDIR)/data/maps
$(INSTALLDATA) data/maps/muret_UTM.xml data/maps/muret_UTM.gif $(DESTDIR)/data/maps
$(INSTALL) -d $(DESTDIR)/data/pictures/gcs_icons
- $(INSTALLDATA) var/maps/trtqtttqtsrrtstq*.jpg var/maps/trtqtttqtsrrttsr*.jpg $(DESTDIR)/data/maps
$(INSTALLDATA) data/pictures/*.gif data/pictures/*.svg data/pictures/*.jpg data/pictures/*.png $(DESTDIR)/data/pictures
$(INSTALLDATA) data/pictures/gcs_icons/*.png $(DESTDIR)/data/pictures/gcs_icons
$(INSTALL) -d $(PREFIX)/usr/share/pixmaps
$(INSTALLDATA) data/pictures/penguin_icon.png $(PREFIX)/usr/share/pixmaps/paparazzi.png
$(INSTALL) -d $(DESTDIR)/data/srtm
- $(INSTALLDATA) data/srtm/N43E001.hgt.bz2 $(DESTDIR)/data/srtm
install_conf:
@@ -37,17 +35,27 @@ install_conf:
$(INSTALLDATA) conf/gui.xml $(DESTDIR)/conf/
$(INSTALL) -d $(DESTDIR)/conf/airframes
$(INSTALLDATA) conf/airframes/airframe.dtd $(DESTDIR)/conf/airframes
- $(INSTALLDATA) conf/airframes/microjet5.xml $(DESTDIR)/conf/airframes
- $(INSTALLDATA) conf/airframes/twinstar1.xml $(DESTDIR)/conf/airframes
- $(INSTALLDATA) conf/airframes/twinjet1.xml $(DESTDIR)/conf/airframes
- $(INSTALLDATA) conf/airframes/tiny_hitl.xml $(DESTDIR)/conf/airframes
- $(INSTALLDATA) conf/airframes/booz2_a2.xml $(DESTDIR)/conf/airframes
+ $(INSTALLDATA) conf/airframes/microjet_example.xml $(DESTDIR)/conf/airframes
+ $(INSTALLDATA) conf/airframes/twinstar_example.xml $(DESTDIR)/conf/airframes
+ $(INSTALLDATA) conf/airframes/twinjet_example.xml $(DESTDIR)/conf/airframes
+ $(INSTALLDATA) conf/airframes/example_twog_analogimu.xml $(DESTDIR)/conf/airframes
$(INSTALL) -d $(DESTDIR)/conf/autopilot
$(INSTALLDATA) conf/autopilot/*.makefile $(DESTDIR)/conf/autopilot
$(INSTALLDATA) conf/autopilot/*.h $(DESTDIR)/conf/autopilot
+ $(INSTALL) -d $(DESTDIR)/conf/autopilot/subsystems
+ $(INSTALLDATA) conf/autopilot/subsystems/*.makefile $(DESTDIR)/conf/autopilot/subsystems
+ $(INSTALL) -d $(DESTDIR)/conf/autopilot/subsystems/fixedwing
+ $(INSTALLDATA) conf/autopilot/subsystems/fixedwing/*.makefile $(DESTDIR)/conf/autopilot/subsystems/fixedwing
+ $(INSTALL) -d $(DESTDIR)/conf/autopilot/subsystems/rotorcraft
+ $(INSTALLDATA) conf/autopilot/subsystems/rotorcraft/*.makefile $(DESTDIR)/conf/autopilot/subsystems/rotorcraft
+ $(INSTALL) -d $(DESTDIR)/conf/autopilot/subsystems/shared
+ $(INSTALLDATA) conf/autopilot/subsystems/shared/*.makefile $(DESTDIR)/conf/autopilot/subsystems/shared
$(INSTALL) -d $(DESTDIR)/conf/flight_plans
$(INSTALLDATA) conf/flight_plans/*.dtd $(DESTDIR)/conf/flight_plans
$(INSTALLDATA) conf/flight_plans/*.xml $(DESTDIR)/conf/flight_plans
+ $(INSTALL) -d $(DESTDIR)/conf/modules
+ $(INSTALLDATA) conf/modules/*.dtd $(DESTDIR)/conf/modules
+ $(INSTALLDATA) conf/modules/*.xml $(DESTDIR)/conf/modules
$(INSTALL) -d $(DESTDIR)/conf/gps
$(INSTALLDATA) conf/gps/Makefile $(DESTDIR)/conf/gps
$(INSTALLDATA) conf/gps/ublox_conf.c $(DESTDIR)/conf/gps
@@ -111,16 +119,12 @@ install_libs:
install_tools:
$(INSTALLDATA) Makefile.ac $(DESTDIR)
- $(INSTALL) -d $(DESTDIR)/sw/tools/
$(INSTALLDATA) conf/Makefile* $(DESTDIR)/conf
+ $(INSTALL) -d $(DESTDIR)/sw/tools/
$(INSTALL) sw/tools/*.out $(DESTDIR)/sw/tools/
rm -f $(DESTDIR)/sw/tools/gen_flight_plan.out
- $(INSTALLDATA) sw/tools/fp_syntax.cmo $(DESTDIR)/sw/tools
- $(INSTALLDATA) sw/tools/fp_parser.cmo $(DESTDIR)/sw/tools
- $(INSTALLDATA) sw/tools/fp_lexer.cmo $(DESTDIR)/sw/tools
$(INSTALLDATA) sw/tools/fp_proc.cmo $(DESTDIR)/sw/tools
$(INSTALLDATA) sw/tools/gen_flight_plan.cmo $(DESTDIR)/sw/tools
- $(INSTALLDATA) sw/tools/extract_makefile.ml $(DESTDIR)/sw/tools/
$(INSTALLDATA) sw/tools/gen_aircraft.ml $(DESTDIR)/sw/tools/
$(INSTALLDATA) sw/tools/gen_airframe.ml $(DESTDIR)/sw/tools/
$(INSTALLDATA) sw/tools/gen_messages.ml $(DESTDIR)/sw/tools/
@@ -130,6 +134,14 @@ install_tools:
$(INSTALLDATA) sw/tools/gen_settings.ml $(DESTDIR)/sw/tools/
$(INSTALLDATA) sw/tools/gen_tuning.ml $(DESTDIR)/sw/tools/
$(INSTALLDATA) sw/tools/gen_ubx.ml $(DESTDIR)/sw/tools/
+ $(INSTALLDATA) sw/tools/gen_xsens.ml $(DESTDIR)/sw/tools/
+ $(INSTALLDATA) sw/tools/gen_modules.ml $(DESTDIR)/sw/tools/
+ $(INSTALLDATA) sw/tools/gen_common.cmo $(DESTDIR)/sw/tools/
+ $(INSTALL) -d $(DESTDIR)/sw/tools/calibration
+ $(INSTALLDATA) sw/tools/calibration/calibrate.py $(DESTDIR)/sw/tools/calibration
+ $(INSTALLDATA) sw/tools/calibration/calibrate_gyro.py $(DESTDIR)/sw/tools/calibration
+ $(INSTALLDATA) sw/tools/calibration/calibration_utils.py $(DESTDIR)/sw/tools/calibration
+ $(INSTALLDATA) sw/tools/calibration/README $(DESTDIR)/sw/tools/calibration
$(INSTALL) -d $(DESTDIR)/sw/ground_segment/lpc21iap
$(INSTALL) sw/ground_segment/lpc21iap/lpc21iap $(DESTDIR)/sw/ground_segment/lpc21iap/
$(INSTALL) -d $(DESTDIR)/sw/simulator
@@ -142,7 +154,7 @@ install_tools:
install_airborne_sources:
$(INSTALL) -d $(DESTDIR)/sw/
- tar --exclude=CVS -cf - sw/airborne/ | tar -C $(DESTDIR) -xf -
+ tar -cf - sw/airborne/ | tar -C $(DESTDIR) -xf -
$(INSTALL) -d $(DESTDIR)/sw/include
$(INSTALLDATA) sw/include/std.h $(DESTDIR)/sw/include
$(INSTALLDATA) var/include/*.h $(DESTDIR)/sw/include
diff --git a/conf/Makefile.sim b/conf/Makefile.sim
index fea3dd1379..8830edd81d 100644
--- a/conf/Makefile.sim
+++ b/conf/Makefile.sim
@@ -35,7 +35,7 @@ CC = g++
endif
OCAMLC = ocamlc
SIMDIR = $(PAPARAZZI_SRC)/sw/simulator
-CAMLINCLUDES = -I +lablgtk2 -I $(PAPARAZZI_SRC)/sw/lib/ocaml -I $(SIMDIR) -I +xml-light
+CAMLINCLUDES = $(shell ocamlfind query -r -i-format lablgtk2) -I $(PAPARAZZI_SRC)/sw/lib/ocaml -I $(SIMDIR) $(shell ocamlfind query -r -i-format xml-light)
SIMSITLML = $(OBJDIR)/simsitl.ml
MYGTKINITCMO = myGtkInit.cmo
SITLCMA = $(SIMDIR)/sitl.cma
diff --git a/conf/Makefile.stm32 b/conf/Makefile.stm32
index c361279f28..00f6b6caf8 100644
--- a/conf/Makefile.stm32
+++ b/conf/Makefile.stm32
@@ -53,6 +53,18 @@ SIZE = $(GCC_BIN_PREFIX)-size
RM = rm
OOCD = $(TOOLCHAIN_DIR)/bin/openocd
+# If we can't find the toolchain then try picking up the compilers from the path
+ifeq ($(TOOLCHAIN_DIR),)
+CC = $(shell which arm-none-eabi-gcc)
+LD = $(shell which arm-none-eabi-gcc)
+CP = $(shell which arm-none-eabi-objcopy)
+DMP = $(shell which arm-none-eabi-objdump)
+NM = $(shell which arm-none-eabi-nm)
+SIZE = $(shell which arm-none-eabi-size)
+OOCD = $(shell which openocd)
+GCC_LIB_DIR=$(shell dirname `which arm-none-eabi-gcc`)/../arm-none-eabi/lib
+endif
+
LOADER=/home/poine/work/stm32/stm32loader-a3c51c26ad6c/stm32loader.py
ifndef $(TARGET).OOCD_INTERFACE
@@ -87,14 +99,20 @@ LDSCRIPT = $($(TARGET).LDSCRIPT)
endif
endif
-CFLAGS = -I. -I./$(ARCH) $(INCLUDES) -D__thumb2__ -Wall -c -msoft-float -O$(OPT)
+UNAME = $(shell uname -s)
+
+CFLAGS = -I. -I./$(ARCH) $(INCLUDES) -D__thumb2__ -Wall -msoft-float -O$(OPT)
CFLAGS += -Wl,gc-sections
CFLAGS += -mcpu=$(MCU) -mthumb -ansi
+ifeq ("$(UNAME)","Darwin")
+CFLAGS += -mfix-cortex-m3-ldrd
+endif
CFLAGS += -std=gnu99
#CFLAGS += -malignment-traps
-CFLAGS += -fno-common -g$(DEBUG)
+CFLAGS += -fno-common
+CFLAGS += -g$(DEBUG)
CFLAGS += -ffunction-sections -fdata-sections
-CFLAGS += -Wall -Wimplicit
+CFLAGS += -Wimplicit
CFLAGS += -Wcast-align
CFLAGS += -Wpointer-arith -Wswitch
CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
@@ -108,9 +126,16 @@ CFLAGS += -Wswitch-default
CFLAGS += $($(TARGET).CFLAGS)
AFLAGS = -ahls -mapcs-32
+ifeq ("$(UNAME)","Darwin")
+AFLAGS += -mcpu=$(MCU) -mthumb
+endif
AFLAGS += -x assembler-with-cpp -Wa,-adhlns=$(OBJDIR)/$(<:.S=.lst),--g$(DEBUG)
+ifeq ("$(UNAME)","Darwin")
+LDFLAGS = -T$(LDSCRIPT) -nostartfiles -O$(OPT) --gc-sections -mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
+else
LDFLAGS = -D__thumb2__ -T$(LDSCRIPT) -nostartfiles -L$(GCC_LIB_DIR) -O$(OPT) --gc-sections
+endif
LDFLAGS += -Wl,-Map=$(OBJDIR)/$(TARGET).map,--cref,--gc-sections
LDLIBS += -lc -lm -lgcc -lcmsis -lstm32
@@ -123,7 +148,17 @@ ODFLAGS = -S
# Default target.
-all: sizebefore build sizeafter
+all: printcommands sizebefore build sizeafter
+
+printcommands:
+ @echo "Using CC = $(CC)"
+ @echo "Using LD = $(LD)"
+ @echo "Using CP = $(CP)"
+ @echo "Using DMP = $(DMP)"
+ @echo "Using NM = $(NM)"
+ @echo "Using SIZE = $(SIZE)"
+ @echo "Using RM = $(RM)"
+ @echo "Using OOCD = $(OOCD)"
build: elf bin hex
# lss sym
@@ -188,15 +223,17 @@ ifeq ($(FLASH_MODE),SERIAL)
upload: $(OBJDIR)/$(TARGET).bin
$(LOADER) -p /dev/ttyUSB0 -b 115200 -e -w -v $^
else ifeq ($(FLASH_MODE),JTAG)
-upload: $(OBJDIR)/$(TARGET).bin
- @echo -e " OOCD\t$<"
+upload: $(OBJDIR)/$(TARGET).elf
+ @echo " OOCD\t$<"
$(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \
- -f board/$(OOCD_BOARD).cfg \
- -c init \
- -c "reset halt" \
- -c "flash write_image erase $(OBJDIR)/$(TARGET).bin 0x08000000" \
- -c reset \
- -c shutdown
+ -f board/$(OOCD_BOARD).cfg \
+ -c init \
+ -c "reset halt" \
+ -c "reset init" \
+ -c "stm32x mass_erase 0" \
+ -c "flash write_image $<" \
+ -c reset \
+ -c shutdown
else
upload:
@echo unknown flash_mode $(FLASH_MODE)
diff --git a/conf/airframes/AirborneCodeReorg/LisaFw.xml b/conf/airframes/AirborneCodeReorg/LisaFw.xml
index ee5d66b914..15baa30976 100644
--- a/conf/airframes/AirborneCodeReorg/LisaFw.xml
+++ b/conf/airframes/AirborneCodeReorg/LisaFw.xml
@@ -166,10 +166,10 @@
-
-
-
-
+
+
+
+
@@ -185,8 +185,8 @@
-
-
+
+
@@ -194,14 +194,14 @@
-
+
diff --git a/conf/airframes/AirborneCodeReorg/TinyFw.xml b/conf/airframes/AirborneCodeReorg/TinyFw.xml
index e67e97d6f3..160460fe9a 100644
--- a/conf/airframes/AirborneCodeReorg/TinyFw.xml
+++ b/conf/airframes/AirborneCodeReorg/TinyFw.xml
@@ -161,10 +161,10 @@
-
-
-
-
+
+
+
+
@@ -179,7 +179,7 @@
-
+
diff --git a/conf/airframes/ENAC/fixed-wing/drops.xml b/conf/airframes/ENAC/fixed-wing/drops.xml
index cf7359cc92..289865ccae 100644
--- a/conf/airframes/ENAC/fixed-wing/drops.xml
+++ b/conf/airframes/ENAC/fixed-wing/drops.xml
@@ -221,7 +221,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -233,11 +233,11 @@ ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_AUTO1
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
@@ -269,7 +269,7 @@ ap.srcs += subsystems/navigation/snav.c
# include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
sim.ARCHDIR = $(ARCHI)
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl_a.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
sim.srcs += subsystems/navigation/nav_line.c subsystems/navigation/nav_survey_rectangle.c
diff --git a/conf/airframes/ENAC/fixed-wing/firestorm.xml b/conf/airframes/ENAC/fixed-wing/firestorm.xml
index fa11fa8574..124a14b520 100644
--- a/conf/airframes/ENAC/fixed-wing/firestorm.xml
+++ b/conf/airframes/ENAC/fixed-wing/firestorm.xml
@@ -213,7 +213,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -225,7 +225,7 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
@@ -262,7 +262,7 @@ ap.CFLAGS += -DUSE_MODULES
# Config for SITL simulation
#include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
sim.ARCHDIR = $(ARCHI)
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
diff --git a/conf/airframes/ENAC/fixed-wing/funjet1.xml b/conf/airframes/ENAC/fixed-wing/funjet1.xml
index 80580c7832..47d29560c7 100644
--- a/conf/airframes/ENAC/fixed-wing/funjet1.xml
+++ b/conf/airframes/ENAC/fixed-wing/funjet1.xml
@@ -232,7 +232,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -244,11 +244,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
@@ -298,7 +298,7 @@ ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150
# Config for SITL simulation
#include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
sim.ARCHDIR = $(ARCHI)
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
@@ -317,8 +317,8 @@ sim.srcs += subsystems/navigation/nav_line.c subsystems/navigation/nav_survey_re
# a test program to setup actuators
setup_actuators.ARCHDIR = $(ARCHI)
-setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART1 -DUART1_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart1
-setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/servos_4015_hw.c main.c
+setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART1 -DUART1_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart1
+setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/servos_4015_hw.c main.c
diff --git a/conf/airframes/ENAC/fixed-wing/funjet2.xml b/conf/airframes/ENAC/fixed-wing/funjet2.xml
index 0d224a5e6c..a10debf64c 100644
--- a/conf/airframes/ENAC/fixed-wing/funjet2.xml
+++ b/conf/airframes/ENAC/fixed-wing/funjet2.xml
@@ -14,15 +14,15 @@
-
-
+
+
@@ -36,7 +36,7 @@
-
+
@@ -51,11 +51,11 @@
-
+
-
+
@@ -106,8 +106,8 @@
-
-
+
+
diff --git a/conf/airframes/ENAC/fixed-wing/funjet2_nc.xml b/conf/airframes/ENAC/fixed-wing/funjet2_nc.xml
index 354a60858e..b02cd6ec66 100644
--- a/conf/airframes/ENAC/fixed-wing/funjet2_nc.xml
+++ b/conf/airframes/ENAC/fixed-wing/funjet2_nc.xml
@@ -14,8 +14,8 @@
-
-
+
+
@@ -23,20 +23,15 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
+
@@ -54,11 +49,11 @@
-
+
-
+
diff --git a/conf/airframes/ENAC/fixed-wing/funjet2_new.xml b/conf/airframes/ENAC/fixed-wing/funjet2_new.xml
new file mode 100644
index 0000000000..83436e97ef
--- /dev/null
+++ b/conf/airframes/ENAC/fixed-wing/funjet2_new.xml
@@ -0,0 +1,234 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/airframes/ENAC/fixed-wing/merlin.xml b/conf/airframes/ENAC/fixed-wing/merlin.xml
index 51ce75f968..2ab3b975ac 100644
--- a/conf/airframes/ENAC/fixed-wing/merlin.xml
+++ b/conf/airframes/ENAC/fixed-wing/merlin.xml
@@ -10,20 +10,16 @@
-
-
-
-
+
+
-
-
-
-
+
+
-
-
+
+
@@ -33,6 +29,10 @@
+
+
+
+
@@ -169,6 +169,7 @@
+
diff --git a/conf/airframes/ENAC/fixed-wing/minimag1.xml b/conf/airframes/ENAC/fixed-wing/minimag1.xml
index 959e0eabdc..714f48dc14 100644
--- a/conf/airframes/ENAC/fixed-wing/minimag1.xml
+++ b/conf/airframes/ENAC/fixed-wing/minimag1.xml
@@ -1,19 +1,54 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
+
+
@@ -51,11 +86,9 @@
-
-
-
-
-
-include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
-
-FLASH_MODE=IAP
-
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_0_99.h\" -DLED -DTIME_LED=1
-ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
-
-ap.srcs += commands.c
-
-ap.CFLAGS += -DACTUATORS=\"servos_4015_MAT_hw.h\" -DSERVOS_4015_MAT
-ap.srcs += $(SRC_ARCH)/servos_4015_MAT_hw.c actuators.c
-
-ap.CFLAGS += -DRADIO_CONTROL
-ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
-
-ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
-
-#TRANSPARENT ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-#TRANSPARENT ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
-
-
-ap.CFLAGS += -DINTER_MCU
-ap.srcs += inter_mcu.c
-
-ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_4
-ap.srcs += $(SRC_ARCH)/adc_hw.c
-
-ap.CFLAGS += -DUSE_GPS -DUBX -DUSE_UART1 -DGPS_LINK=Uart1 -DUART1_BAUD=B19200
-
-ap.srcs += gps_ubx.c gps.c latlong.c
-
-ap.CFLAGS += -DUSE_INFRARED -DALT_KALMAN
-ap.srcs += infrared.c estimator.c
-
-ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM
-ap.srcs += subsystems/nav.c fw_h_ctl.c fw_v_ctl.c subsystems/navigation/nav_survey_rectangle.c subsystems/navigation/nav_line.c
-
-# Config for SITL simulation
-include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
-sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
-sim.srcs += subsystems/navigation/nav_survey_rectangle.c subsystems/navigation/nav_line.c
-
-
+
+
diff --git a/conf/airframes/ENAC/fixed-wing/slayer2.xml b/conf/airframes/ENAC/fixed-wing/slayer2.xml
index 4a74c62cd5..5be6b30153 100644
--- a/conf/airframes/ENAC/fixed-wing/slayer2.xml
+++ b/conf/airframes/ENAC/fixed-wing/slayer2.xml
@@ -201,7 +201,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_0_99.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_0_99.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -213,7 +213,7 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
# AEROCOMM
# ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
@@ -221,7 +221,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# RADIOTRONIX
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
@@ -241,7 +241,7 @@ ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM
ap.srcs += subsystems/nav.c fw_h_ctl.c fw_v_ctl.c subsystems/navigation/nav_survey_rectangle.c subsystems/navigation/traffic_info.c subsystems/navigation/nav_line.c
# Camera power switch on ADC_7 pin
-ap.CFLAGS += -DLED_3_BANK=0 -DLED_3_PIN=10 -DPOWER_SWITCH_LED=3
+ap.CFLAGS += -DUSE_LED_3_BANK=0 -DUSE_LED_3_PIN=10 -DPOWER_SWITCH_LED=3
ap.CFLAGS += -DUSE_GYRO -DADXRS150
@@ -271,7 +271,7 @@ ap.CFLAGS += -D BARO_MS5534A_W1=0xAC20 -D BARO_MS5534A_W2=0x87D9 -D BARO_MS5534A
# Config for SITL simulation
#include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
sim.ARCHDIR = $(ARCHI)
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DUSE_BARO_MS5534A
diff --git a/conf/airframes/ENAC/fixed-wing/soarzi.xml b/conf/airframes/ENAC/fixed-wing/soarzi.xml
index 03f799119b..e0cf78c35f 100644
--- a/conf/airframes/ENAC/fixed-wing/soarzi.xml
+++ b/conf/airframes/ENAC/fixed-wing/soarzi.xml
@@ -179,7 +179,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_0_99.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_0_99.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -191,10 +191,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#XBEE ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#XBEE ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#XBEE ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/ENAC/fixed-wing/solarstorm.xml b/conf/airframes/ENAC/fixed-wing/solarstorm.xml
index 7c1cf6a949..ec953714e9 100644
--- a/conf/airframes/ENAC/fixed-wing/solarstorm.xml
+++ b/conf/airframes/ENAC/fixed-wing/solarstorm.xml
@@ -206,7 +206,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -218,7 +218,7 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
@@ -253,7 +253,7 @@ ap.CFLAGS += -DUSE_MODULES
# Config for SITL simulation
#include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
sim.ARCHDIR = $(ARCHI)
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl_a.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
diff --git a/conf/airframes/ENAC/fixed-wing/spocII.xml b/conf/airframes/ENAC/fixed-wing/spocII.xml
index a0c71c742f..675df4be66 100644
--- a/conf/airframes/ENAC/fixed-wing/spocII.xml
+++ b/conf/airframes/ENAC/fixed-wing/spocII.xml
@@ -212,7 +212,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -225,7 +225,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#TRANSPARENT
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
@@ -253,7 +253,7 @@ ap.CFLAGS += -DUSE_ADC_3 -DADC_CHANNEL_CURRENT=ADC_3
# Config for SITL simulation
#include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
sim.ARCHDIR = $(ARCHI)
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
@@ -274,8 +274,8 @@ jsbsim.srcs += $(SIMDIR)/sim_ac_fw.c
# a test program to setup actuators
setup_actuators.ARCHDIR = $(ARCHI)
-setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART1 -DUART1_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart1
-setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/servos_4015_hw.c main.c
+setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART1 -DUART1_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart1
+setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/servos_4015_hw.c main.c
diff --git a/conf/airframes/ENAC/fixed-wing/twinjet2.xml b/conf/airframes/ENAC/fixed-wing/twinjet2.xml
index 4acf157a96..c118819f03 100644
--- a/conf/airframes/ENAC/fixed-wing/twinjet2.xml
+++ b/conf/airframes/ENAC/fixed-wing/twinjet2.xml
@@ -15,25 +15,20 @@
-
-
+
+
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
@@ -230,7 +225,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.CFLAGS += -DINTER_MCU
@@ -247,11 +242,11 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
########## Modems
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
########## ADC
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3
@@ -303,7 +298,7 @@ ap.CFLAGS += -DUSE_MODULES
#include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
sim.ARCHDIR = $(ARCHI)
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl_a.c fw_v_ctl_n.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DPITCH_TRIM -DALT_KALMAN
diff --git a/conf/airframes/ENAC/quadrotor/blender.xml b/conf/airframes/ENAC/quadrotor/blender.xml
index a419019daa..72313de308 100644
--- a/conf/airframes/ENAC/quadrotor/blender.xml
+++ b/conf/airframes/ENAC/quadrotor/blender.xml
@@ -1,20 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -218,7 +232,7 @@
-
+
@@ -228,22 +242,4 @@
-
-
-ap.CFLAGS += -DGUIDANCE_H_USE_REF
-
-ap.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT -DBOOZ_START_DELAY=3 -DUSE_PWM1
-ap.CFLAGS += -DBOOZ_ACTUATORS_MAX_THRUST=160 -DBOOZ_THRUST_LOWPASS=17
-
-ap.srcs += $(SRC_BOOZ_ARCH)/booz2_pwm_hw.c
-
-sim.CFLAGS += -DBSM_PARAMS=\"booz_sensors_model_params_booz2_a2.h\"
-sim.CFLAGS += -DNPS_NO_SUPERVISION
-
-sim.CFLAGS += -DGUIDANCE_H_USE_REF
-sim.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT -DBOOZ_START_DELAY=3
-sim.srcs += $(SRC_BOOZ_SIM)/booz2_pwm_hw.c
-
-
-
diff --git a/conf/airframes/ENAC/quadrotor/booz2_g1.xml b/conf/airframes/ENAC/quadrotor/booz2_g1.xml
index 625bf730dd..b1405b3931 100644
--- a/conf/airframes/ENAC/quadrotor/booz2_g1.xml
+++ b/conf/airframes/ENAC/quadrotor/booz2_g1.xml
@@ -1,6 +1,7 @@
+
@@ -9,17 +10,28 @@
+
+
+
+
+
-
+
+
+
+
+
-
+
+
+
@@ -220,21 +232,4 @@
-
-
-
-ap.CFLAGS += -DGUIDANCE_H_USE_REF
-ap.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT -DBOOZ_START_DELAY=3
-
-ap.srcs += $(SRC_BOOZ_ARCH)/booz2_pwm_hw.c
-
-sim.CFLAGS += -DBSM_PARAMS=\"booz_sensors_model_params_booz2_a2.h\"
-sim.CFLAGS += -DNPS_NO_SUPERVISION
-sim.CFLAGS += -DGUIDANCE_H_USE_REF
-sim.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT -DBOOZ_START_DELAY=3
-
-sim.srcs += $(SRC_BOOZ_SIM)/booz2_pwm_hw.c
-
-
-
diff --git a/conf/airframes/ENAC/quadrotor/g1_vision.xml b/conf/airframes/ENAC/quadrotor/g1_vision.xml
new file mode 100644
index 0000000000..0c630fdb66
--- /dev/null
+++ b/conf/airframes/ENAC/quadrotor/g1_vision.xml
@@ -0,0 +1,243 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ARCH=lpc21
+ARCHI=arm7
+BOARD_CFG = \"boards/booz2_v1_0.h\"
+FLASH_MODE=IAP
+
+# prevents motors from ever starting
+#ap.CFLAGS += -DKILL_MOTORS
+
+include $(PAPARAZZI_SRC)/conf/autopilot/booz2_common.makefile
+include $(CFG_BOOZ)/booz2_autopilot.makefile
+include $(CFG_BOOZ)/booz2_test_progs.makefile
+ap.CFLAGS += -DBOOZ_FAILSAFE_GROUND_DETECT
+
+sim.CFLAGS += -DBSM_PARAMS=\"booz_sensors_model_params_booz2_a2.h\"
+sim.CFLAGS += -DNPS_NO_SUPERVISION
+include $(CFG_BOOZ)/booz2_simulator_nps.makefile
+
+ap.CFLAGS += -DMODEM_BAUD=B57600
+include $(CFG_BOOZ)/subsystems/booz2_actuators_asctec.makefile
+include $(CFG_BOOZ)/subsystems/booz2_radio_control_ppm.makefile
+include $(CFG_BOOZ)/subsystems/booz2_imu_b2v1_1.makefile
+#include $(CFG_BOOZ)/subsystems/booz2_gps.makefile
+include $(CFG_BOOZ)/subsystems/booz2_analog_bat_baro.makefile
+include $(CFG_BOOZ)/subsystems/booz2_fms_datalink.makefile
+
+include $(CFG_BOOZ)/subsystems/booz2_ahrs_cmpl.makefile
+
+#include $(CFG_BOOZ)/subsystems/booz2_ins_hff.makefile
+#ap.CFLAGS += -DR_POS=0.1
+
+ap.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT -DBOOZ_START_DELAY=3
+sim.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT -DBOOZ_START_DELAY=3
+
+ap.CFLAGS += -DUSE_MODULES
+
+
+
+
diff --git a/conf/airframes/ENAC/quadrotor/mkk1-vision.xml b/conf/airframes/ENAC/quadrotor/mkk1-vision.xml
new file mode 100644
index 0000000000..ffd6dd9264
--- /dev/null
+++ b/conf/airframes/ENAC/quadrotor/mkk1-vision.xml
@@ -0,0 +1,278 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ARCH=lpc21
+ARCHI=arm7
+BOARD_CFG = \"boards/booz2_v1_0.h\"
+FLASH_MODE=IAP
+
+# prevents motors from ever starting
+#ap.CFLAGS += -DKILL_MOTORS
+
+include $(PAPARAZZI_SRC)/conf/autopilot/booz2_common.makefile
+include $(CFG_BOOZ)/booz2_autopilot.makefile
+include $(CFG_BOOZ)/booz2_test_progs.makefile
+ap.CFLAGS += -DBOOZ_FAILSAFE_GROUND_DETECT
+
+ap.CFLAGS += -DMODEM_BAUD=B57600
+include $(CFG_BOOZ)/subsystems/booz2_actuators_mkk.makefile
+include $(CFG_BOOZ)/subsystems/booz2_radio_control_ppm.makefile
+include $(CFG_BOOZ)/subsystems/booz2_imu_b2v1_1.makefile
+#include $(CFG_BOOZ)/subsystems/booz2_gps.makefile
+include $(CFG_BOOZ)/subsystems/booz2_analog_bat_baro.makefile
+#ap.CFLAGS += -DBOOZ2_SONAR -DUSE_SONAR_1
+#include $(CFG_BOOZ)/subsystems/booz2_analog_bat_baro_sonar.makefile
+include $(CFG_BOOZ)/subsystems/booz2_fms_datalink.makefile
+
+include $(CFG_BOOZ)/subsystems/booz2_ahrs_cmpl.makefile
+
+#include $(CFG_BOOZ)/subsystems/booz2_ins_hff.makefile
+
+ap.CFLAGS += -DB2_GUIDANCE_H_USE_REF
+ap.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT
+
+ap.CFLAGS += -DUSE_MODULES
+
+include $(CFG_BOOZ)/booz2_simulator_nps.makefile
+#sim.CFLAGS += -DB2_GUIDANCE_H_USE_REF
+sim.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT
+sim.CFLAGS += -DUSE_MODULES
+
+
+
+
diff --git a/conf/airframes/ENAC/quadrotor/mkk1.xml b/conf/airframes/ENAC/quadrotor/mkk1.xml
index 3a1ef13ea5..37229f6b1d 100644
--- a/conf/airframes/ENAC/quadrotor/mkk1.xml
+++ b/conf/airframes/ENAC/quadrotor/mkk1.xml
@@ -12,6 +12,7 @@
+
diff --git a/conf/airframes/ENAC/quadrotor/nova1.xml b/conf/airframes/ENAC/quadrotor/nova1.xml
new file mode 100644
index 0000000000..e894ef65de
--- /dev/null
+++ b/conf/airframes/ENAC/quadrotor/nova1.xml
@@ -0,0 +1,243 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# prevents motors from ever starting
+#ap.CFLAGS += -DKILL_MOTORS
+
+#set GPS lag for horizontal filter
+#ap.CFLAGS += -DUSE_GPS_ACC4R
+
+#ap.CFLAGS += -DGUIDANCE_H_USE_REF
+ap.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT
+
+#sim.CFLAGS += -DGUIDANCE_H_USE_REF
+sim.CFLAGS += -DUSE_ADAPT_HOVER -DUSE_INS_NAV_INIT
+
+
+
+
diff --git a/conf/airframes/LAAS/mmlaas_N1.xml b/conf/airframes/LAAS/mmlaas_N1.xml
index 45a9557b29..8c08511f7b 100644
--- a/conf/airframes/LAAS/mmlaas_N1.xml
+++ b/conf/airframes/LAAS/mmlaas_N1.xml
@@ -18,15 +18,15 @@
-
+
-
-
-
+
+
+
diff --git a/conf/airframes/LAAS/mmlaas_N2.xml b/conf/airframes/LAAS/mmlaas_N2.xml
index ede0969eaf..018c4551cf 100644
--- a/conf/airframes/LAAS/mmlaas_N2.xml
+++ b/conf/airframes/LAAS/mmlaas_N2.xml
@@ -18,15 +18,15 @@
-
+
-
-
-
+
+
+
diff --git a/conf/airframes/LAAS/mmlaas_N3.xml b/conf/airframes/LAAS/mmlaas_N3.xml
index 1b9d0c563d..5f75acae18 100644
--- a/conf/airframes/LAAS/mmlaas_N3.xml
+++ b/conf/airframes/LAAS/mmlaas_N3.xml
@@ -18,15 +18,15 @@
-
+
-
-
-
+
+
+
diff --git a/conf/airframes/PPZUAV/fixed-wing/kalscott_easystar.xml b/conf/airframes/PPZUAV/fixed-wing/kalscott_easystar.xml
index 4cf13bf2b8..2fddd20c7e 100644
--- a/conf/airframes/PPZUAV/fixed-wing/kalscott_easystar.xml
+++ b/conf/airframes/PPZUAV/fixed-wing/kalscott_easystar.xml
@@ -156,7 +156,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1 -DUSE_MODULES
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1 -DUSE_MODULES
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -171,7 +171,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# Telemetry configuration
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/Paul/minimag1.xml b/conf/airframes/Paul/minimag1.xml
index f16f2aca5f..cfe17c9d28 100644
--- a/conf/airframes/Paul/minimag1.xml
+++ b/conf/airframes/Paul/minimag1.xml
@@ -176,7 +176,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_2_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_2_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -188,7 +188,7 @@ ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_TYPE=RC_FUTABA
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/Poine/antenna.xml b/conf/airframes/Poine/antenna.xml
index 19a339e347..98d24b8294 100644
--- a/conf/airframes/Poine/antenna.xml
+++ b/conf/airframes/Poine/antenna.xml
@@ -23,10 +23,10 @@ ant.LOCK_FUSE = ff
ant.CFLAGS += -DBOARD_CONFIG=\"antenna.h\"
ant.srcs = main_antenna.c sys_time.c $(SRC_ARCH)/sys_time_hw.c
-ant.CFLAGS += -DLED
+ant.CFLAGS += -DUSE_LED
ant.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-ant.srcs += $(SRC_ARCH)/uart_hw.c
+ant.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
ant.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
ant.srcs += downlink.c pprz_transport.c
diff --git a/conf/airframes/Poine/autoplato.xml b/conf/airframes/Poine/autoplato.xml
index b509daabbf..48a5844d0e 100644
--- a/conf/airframes/Poine/autoplato.xml
+++ b/conf/airframes/Poine/autoplato.xml
@@ -16,17 +16,17 @@ test_usb.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS)
test_usb.srcs += $(SRC_BOOZ_TEST)/atpt_main.c
test_usb.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
# -DTIME_LED=1
-test_usb.CFLAGS += -DLED
+test_usb.CFLAGS += -DUSE_LED
test_usb.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
#test_usb.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-#test_usb.srcs += $(SRC_ARCH)/uart_hw.c
+#test_usb.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#test_usb.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
#test_usb.srcs += downlink.c pprz_transport.c
test_usb.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_USB_SERIAL
test_usb.CFLAGS += -DDOWNLINK_DEVICE=UsbS -DPPRZ_UART=UsbS -DDATALINK=PPRZ
-test_usb.srcs += downlink.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/usb_ser_hw.c pprz_transport.c
+test_usb.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/usb_ser_hw.c pprz_transport.c
# datalink.c
test_usb.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
test_usb.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
diff --git a/conf/airframes/Poine/beth.xml b/conf/airframes/Poine/beth.xml
index ed7388ddb1..aaa4ec37d5 100644
--- a/conf/airframes/Poine/beth.xml
+++ b/conf/airframes/Poine/beth.xml
@@ -114,7 +114,7 @@ main_stm32.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
main_stm32.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
main_stm32.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-main_stm32.srcs += $(SRC_ARCH)/uart_hw.c
+main_stm32.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
main_stm32.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
main_stm32.srcs += downlink.c pprz_transport.c
@@ -126,12 +126,12 @@ main_stm32.srcs += lisa/lisa_overo_link.c lisa/arch/stm32/lisa_overo_link_arch.c
#booz IMU
#main_stm32.CFLAGS += -DIMU_TYPE_H=\"imu/imu_b2.h\"
-#main_stm32.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
+#main_stm32.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2100
#main_stm32.srcs += $(SRC_FIRMWARE)/imu.c
#main_stm32.CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
#main_stm32.srcs += $(SRC_FIRMWARE)/imu/imu_b2.c $(SRC_FIRMWARE)/imu/arch/$(ARCH)/imu_b2_arch.c
#main_stm32.srcs += peripherals/max1168.c $(SRC_ARCH)/peripherals/max1168_arch.c
-#main_stm32.srcs += peripherals/ms2001.c $(SRC_ARCH)/peripherals/ms2001_arch.c
+#main_stm32.srcs += peripherals/ms2100.c $(SRC_ARCH)/peripherals/ms2100_arch.c
#main_stm32.srcs += math/pprz_trig_int.c
#crista IMU
@@ -186,7 +186,7 @@ main_coders.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
main_coders.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
main_coders.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-main_coders.srcs += $(SRC_ARCH)/uart_hw.c
+main_coders.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
main_coders.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
main_coders.srcs += downlink.c pprz_transport.c
diff --git a/conf/airframes/Poine/bl_mc.xml b/conf/airframes/Poine/bl_mc.xml
index 51d00613d0..21d5e7adee 100644
--- a/conf/airframes/Poine/bl_mc.xml
+++ b/conf/airframes/Poine/bl_mc.xml
@@ -26,11 +26,11 @@ main.srcs = main_bl_mc.c
main.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1e-2)'
main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-main.CFLAGS += -DLED
+main.CFLAGS += -DUSE_LED
#-DTIME_LED=1
main.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B38400
-main.srcs += $(SRC_ARCH)/uart_hw.c
+main.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
main.srcs += downlink.c pprz_transport.c
diff --git a/conf/airframes/Poine/booz2_a1.xml b/conf/airframes/Poine/booz2_a1.xml
index 9b53f79224..395583d8e9 100644
--- a/conf/airframes/Poine/booz2_a1.xml
+++ b/conf/airframes/Poine/booz2_a1.xml
@@ -202,6 +202,7 @@
+
diff --git a/conf/airframes/Poine/booz2_a6.xml b/conf/airframes/Poine/booz2_a6.xml
index aa4ceda472..478600ab30 100644
--- a/conf/airframes/Poine/booz2_a6.xml
+++ b/conf/airframes/Poine/booz2_a6.xml
@@ -181,7 +181,7 @@
-
+
diff --git a/conf/airframes/Poine/booz2_a7.xml b/conf/airframes/Poine/booz2_a7.xml
index 1ec3206aaf..091401ebed 100644
--- a/conf/airframes/Poine/booz2_a7.xml
+++ b/conf/airframes/Poine/booz2_a7.xml
@@ -199,7 +199,7 @@
-
+
diff --git a/conf/airframes/Poine/easy_glider1.xml b/conf/airframes/Poine/easy_glider1.xml
index 44394d52a2..ab1f292c39 100644
--- a/conf/airframes/Poine/easy_glider1.xml
+++ b/conf/airframes/Poine/easy_glider1.xml
@@ -163,7 +163,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -177,7 +177,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# transparent
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/Poine/motor_bench.xml b/conf/airframes/Poine/motor_bench.xml
index 2cfb8b27a2..dca7fe4d33 100644
--- a/conf/airframes/Poine/motor_bench.xml
+++ b/conf/airframes/Poine/motor_bench.xml
@@ -17,12 +17,12 @@ main.CFLAGS += -DPERIODIC_TASK_FREQ='250.'
main.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./PERIODIC_TASK_FREQ)'
main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-main.CFLAGS += -DLED
+main.CFLAGS += -DUSE_LED
main.srcs += $(SRC_ARCH)/armVIC.c
main.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B115200
-main.srcs += $(SRC_ARCH)/uart_hw.c
+main.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
main.srcs += downlink.c pprz_transport.c
@@ -61,7 +61,7 @@ foo.CFLAGS += -DPERIODIC_TASK_FREQ='250.'
foo.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./PERIODIC_TASK_FREQ)'
foo.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-foo.CFLAGS += -DLED
+foo.CFLAGS += -DUSE_LED
foo.srcs += $(SRC_ARCH)/armVIC.c
foo.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=9
@@ -80,7 +80,7 @@ bar.CFLAGS += -DPERIODIC_TASK_FREQ='250.'
bar.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./PERIODIC_TASK_FREQ)'
bar.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-bar.CFLAGS += -DLED
+bar.CFLAGS += -DUSE_LED
bar.srcs += $(SRC_ARCH)/armVIC.c
bar.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=9
diff --git a/conf/airframes/Poine/pt_ant.xml b/conf/airframes/Poine/pt_ant.xml
index 93ade9c70e..765384cf20 100644
--- a/conf/airframes/Poine/pt_ant.xml
+++ b/conf/airframes/Poine/pt_ant.xml
@@ -10,7 +10,7 @@
tunnel.ARCHDIR = $(ARCH)
-tunnel.CFLAGS += -DFBW -DBOARD_CONFIG=\"conf_demo.h\" -DLED -DTIME_LED=1
+tunnel.CFLAGS += -DFBW -DBOARD_CONFIG=\"conf_demo.h\" -DUSE_LED -DTIME_LED=1
tunnel.srcs += $(SRC_ARCH)/uart_tunnel.c
ARCH=lpc21
@@ -26,12 +26,12 @@ main.srcs = $(PT_ANT)/pt_ant_main.c
main.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1.66666667e-2)'
main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-main.CFLAGS += -DLED
+main.CFLAGS += -DUSE_LED
main.srcs += $(SRC_ARCH)/armVIC.c
main.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-main.srcs += $(SRC_ARCH)/uart_hw.c
+main.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
main.srcs += downlink.c pprz_transport.c $(PT_ANT)/pt_ant_telemetry.c
diff --git a/conf/airframes/Poine/turntable.xml b/conf/airframes/Poine/turntable.xml
index 77c99e020c..dc97e08e98 100644
--- a/conf/airframes/Poine/turntable.xml
+++ b/conf/airframes/Poine/turntable.xml
@@ -25,7 +25,7 @@ main.srcs += sys_time.c $(MB)/turntable_systime.c
#main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=UsbS
main.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B115200
-main.srcs += $(SRC_ARCH)/uart_hw.c
+main.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
main.srcs += downlink.c pprz_transport.c
diff --git a/conf/airframes/TU_Delft/MicrojetBR.xml b/conf/airframes/TU_Delft/MicrojetBR.xml
index 0027581695..ee3384716b 100644
--- a/conf/airframes/TU_Delft/MicrojetBR.xml
+++ b/conf/airframes/TU_Delft/MicrojetBR.xml
@@ -229,8 +229,8 @@
-
-
+
+
@@ -253,12 +253,12 @@
-
+
diff --git a/conf/airframes/TU_Delft/MicrojetCDW.xml b/conf/airframes/TU_Delft/MicrojetCDW.xml
index 32cbb91002..77b6fddac1 100644
--- a/conf/airframes/TU_Delft/MicrojetCDW.xml
+++ b/conf/airframes/TU_Delft/MicrojetCDW.xml
@@ -4,9 +4,9 @@
-
-
-
+
+
+
@@ -22,8 +22,8 @@
@@ -52,37 +52,46 @@
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
-
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
@@ -143,18 +152,18 @@
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
@@ -192,7 +207,7 @@
-
+
@@ -212,8 +227,8 @@
-
-
+
+
diff --git a/conf/airframes/TU_Delft/Trip50A.xml b/conf/airframes/TU_Delft/Trip50A.xml
index 0a681fbb23..36081877f7 100644
--- a/conf/airframes/TU_Delft/Trip50A.xml
+++ b/conf/airframes/TU_Delft/Trip50A.xml
@@ -249,7 +249,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=2
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=2
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -261,15 +261,15 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -#DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
# Maxstream API protocol
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/TU_Delft/Trip50B.xml b/conf/airframes/TU_Delft/Trip50B.xml
index af557a6d57..1cbde06526 100644
--- a/conf/airframes/TU_Delft/Trip50B.xml
+++ b/conf/airframes/TU_Delft/Trip50B.xml
@@ -254,7 +254,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=2
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=2
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -266,15 +266,15 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -#DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
# Maxstream API protocol
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/TU_Delft/holiday50.xml b/conf/airframes/TU_Delft/holiday50.xml
index 3a1745e964..d95a52bb30 100644
--- a/conf/airframes/TU_Delft/holiday50.xml
+++ b/conf/airframes/TU_Delft/holiday50.xml
@@ -248,7 +248,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
# main files (including the 60Hz timing)
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
# Command allocation and Radio Mixers
@@ -264,7 +264,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# Paparazzi protocol on UART0 at 57600
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
# communication from FBW and AP
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/TU_Delft/yapa_xsens.xml b/conf/airframes/TU_Delft/yapa_xsens.xml
index 3534d3d41f..ae607c28b4 100644
--- a/conf/airframes/TU_Delft/yapa_xsens.xml
+++ b/conf/airframes/TU_Delft/yapa_xsens.xml
@@ -171,14 +171,14 @@
@@ -193,7 +193,7 @@
-
+
diff --git a/conf/airframes/UofAdelaide/A1000_BOOZ.xml b/conf/airframes/UofAdelaide/A1000_BOOZ.xml
index 3bd37f4813..66b39fd1ed 100644
--- a/conf/airframes/UofAdelaide/A1000_BOOZ.xml
+++ b/conf/airframes/UofAdelaide/A1000_BOOZ.xml
@@ -289,6 +289,7 @@ second attempt
+
diff --git a/conf/airframes/UofAdelaide/A1000_LISA.xml b/conf/airframes/UofAdelaide/A1000_LISA.xml
index e6f8ac8831..36dde5dd6d 100644
--- a/conf/airframes/UofAdelaide/A1000_LISA.xml
+++ b/conf/airframes/UofAdelaide/A1000_LISA.xml
@@ -198,6 +198,7 @@
-->
+
diff --git a/conf/airframes/UofAdelaide/A1000_NOVA.xml b/conf/airframes/UofAdelaide/A1000_NOVA.xml
index fe7204faf8..9847fa9a0e 100644
--- a/conf/airframes/UofAdelaide/A1000_NOVA.xml
+++ b/conf/airframes/UofAdelaide/A1000_NOVA.xml
@@ -248,6 +248,7 @@
+
diff --git a/conf/airframes/airframe.dtd b/conf/airframes/airframe.dtd
index 9a741787b0..22808bfe3e 100644
--- a/conf/airframes/airframe.dtd
+++ b/conf/airframes/airframe.dtd
@@ -22,12 +22,11 @@
-
-
-
-
-
-
+
+
+
+
+
@@ -100,11 +99,7 @@ value CDATA #IMPLIED
unit CDATA #IMPLIED
integer CDATA #IMPLIED>
-
-
-
@@ -120,7 +115,9 @@ target CDATA #IMPLIED
location CDATA #IMPLIED>
+main_freq CDATA #IMPLIED
+target CDATA #IMPLIED>
+name CDATA #REQUIRED
+target CDATA #IMPLIED>
diff --git a/conf/airframes/booz2_flixr.xml b/conf/airframes/booz2_flixr.xml
index a5201efd9e..38255e1429 100644
--- a/conf/airframes/booz2_flixr.xml
+++ b/conf/airframes/booz2_flixr.xml
@@ -16,7 +16,10 @@
-
+
+
+
+
@@ -25,26 +28,23 @@
-
+
+
+
+
+
-
-
-
-
-
-
-
@@ -72,10 +72,6 @@
-
-
-
-
@@ -84,10 +80,6 @@
-
-
-
-
@@ -245,9 +237,4 @@
-
- ap.srcs += $(SRC_BOOZ_ARCH)/booz2_pwm_hw.c
- sim.srcs += $(SRC_BOOZ_SIM)/booz2_pwm_hw.c
-
-
diff --git a/conf/airframes/booz2_ppzuav.xml b/conf/airframes/booz2_ppzuav.xml
index 74e44ece8e..b0ec00deec 100644
--- a/conf/airframes/booz2_ppzuav.xml
+++ b/conf/airframes/booz2_ppzuav.xml
@@ -201,9 +201,10 @@
-
+
+
diff --git a/conf/airframes/demo.xml b/conf/airframes/demo.xml
index e70c819f25..8fd502eaca 100644
--- a/conf/airframes/demo.xml
+++ b/conf/airframes/demo.xml
@@ -26,7 +26,7 @@ demo2.srcs = main_demo2.c
demo2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(10e-2)'
demo2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-demo2.CFLAGS += -DLED
+demo2.CFLAGS += -DUSE_LED
#
# UART (interrupts) and formated ascii printing
@@ -39,12 +39,12 @@ demo3.srcs = main_demo3.c
demo3.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1e-1)'
demo3.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-demo3.CFLAGS += -DLED
+demo3.CFLAGS += -DUSE_LED
demo3.srcs += $(SRC_ARCH)/armVIC.c
demo3.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-demo3.srcs += $(SRC_ARCH)/uart_hw.c
+demo3.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#
# DOWNLINK : send formated messages according to messages.xml description
@@ -58,12 +58,12 @@ demo4.srcs = main_demo4.c
demo4.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(10e-2)'
demo4.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-demo4.CFLAGS += -DLED
+demo4.CFLAGS += -DUSE_LED
demo4.srcs += $(SRC_ARCH)/armVIC.c
demo4.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-demo4.srcs += $(SRC_ARCH)/uart_hw.c
+demo4.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
demo4.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
demo4.srcs += downlink.c pprz_transport.c
@@ -81,12 +81,12 @@ demo5.srcs = main_demo5.c
demo5.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(10e-2)'
demo5.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-demo5.CFLAGS += -DLED
+demo5.CFLAGS += -DUSE_LED
demo5.srcs += $(SRC_ARCH)/armVIC.c
demo5.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-demo5.srcs += $(SRC_ARCH)/uart_hw.c
+demo5.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
demo5.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
demo5.srcs += downlink.c pprz_transport.c
@@ -105,7 +105,7 @@ demo6.srcs = main_demo6.c
demo6.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(10e-2)'
demo6.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-demo6.CFLAGS += -DLED
+demo6.CFLAGS += -DUSE_LED
demo6.srcs += $(SRC_ARCH)/armVIC.c
@@ -132,7 +132,7 @@ test_spk.srcs = main_test_spk.c
test_spk.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_spk.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-test_spk.CFLAGS += -DLED
+test_spk.CFLAGS += -DUSE_LED
test_spk.srcs += $(SRC_ARCH)/armVIC.c
@@ -143,7 +143,7 @@ test_spk.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
test_spk.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
test_spk.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B115200
-test_spk.srcs += $(SRC_ARCH)/uart_hw.c
+test_spk.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
diff --git a/conf/airframes/demo_module.xml b/conf/airframes/demo_module.xml
index f8e4223226..fc3166cfd7 100644
--- a/conf/airframes/demo_module.xml
+++ b/conf/airframes/demo_module.xml
@@ -164,7 +164,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c $(SRC_FIRMWARE)/main.c
ap.CFLAGS += -DINTER_MCU
@@ -181,7 +181,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
########## Modem
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
########## ADC
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3
diff --git a/conf/airframes/easy_glider_example.xml b/conf/airframes/easy_glider_example.xml
index dd3f84f026..313e793a84 100644
--- a/conf/airframes/easy_glider_example.xml
+++ b/conf/airframes/easy_glider_example.xml
@@ -162,15 +162,12 @@
-
+
-
-
-
@@ -181,4 +178,10 @@
+
+
+
+
+
+
diff --git a/conf/airframes/easystar_ets_example.xml b/conf/airframes/easystar_ets_example.xml
index 3e6f1e5548..763be2683d 100644
--- a/conf/airframes/easystar_ets_example.xml
+++ b/conf/airframes/easystar_ets_example.xml
@@ -19,6 +19,7 @@
+
diff --git a/conf/airframes/esden/lisa_asctec.xml b/conf/airframes/esden/lisa_asctec.xml
index 09561d3c9a..a011e5177f 100644
--- a/conf/airframes/esden/lisa_asctec.xml
+++ b/conf/airframes/esden/lisa_asctec.xml
@@ -16,6 +16,12 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -114,27 +124,27 @@
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-USER = root
-HOST = 192.168.1.3
-#HOST = overo
-#HOST = beth
-#HOST = asctec_lisa
-TARGET_DIR = ~
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-SRC_FMS=fms
+
+
+
+
+
+
+
+
+
+
+
+
-ARCH=stm32
-BOARD_CFG=\"boards/lisa_0.99.h\"
-FLASH_MODE = JTAG
-
-ap.CFLAGS += -DMODEM_BAUD=B57600
-
-ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_MODEL_H=\"subsystems/radio_control/spektrum_dx7se_joby.h\"
-
-include $(PAPARAZZI_SRC)/conf/autopilot/booz2_common.makefile
-include $(CFG_BOOZ)/booz2_autopilot.makefile
-
-include $(CFG_BOOZ)/subsystems/booz2_radio_control_spektrum.makefile
-include $(CFG_BOOZ)/subsystems/booz2_actuators_asctec_v2.makefile
-include $(CFG_BOOZ)/subsystems/booz2_imu_b2v1_1.makefile
-#include $(CFG_BOOZ)/subsystems/booz2_gps.makefile
-include $(CFG_BOOZ)/subsystems/booz2_ahrs_cmpl.makefile
-
-
-include $(PAPARAZZI_SRC)/conf/autopilot/lisa_test_progs.makefile
-
-CONFIG_PASSTHROUGH = $(PAPARAZZI_SRC)/conf/autopilot/subsystems/lisa_passthrough
-SERVOS_REFRESH_FREQ=200
-
-include $(PAPARAZZI_SRC)/conf/autopilot/lisa_passthrough.makefile
-
-RADIO_CONTROL_SPEKTRUM_MODEL=\"booz/radio_control/booz_radio_control_joby.h\"
-include $(CONFIG_PASSTHROUGH)/radio_control_joby.makefile
-
-
-
diff --git a/conf/airframes/esden/lisa_asctec_aspirin.xml b/conf/airframes/esden/lisa_asctec_aspirin.xml
new file mode 100644
index 0000000000..6aa143ec58
--- /dev/null
+++ b/conf/airframes/esden/lisa_asctec_aspirin.xml
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/airframes/esden/lisa_pwm_aspirin.xml b/conf/airframes/esden/lisa_pwm_aspirin.xml
new file mode 100644
index 0000000000..a4641f0209
--- /dev/null
+++ b/conf/airframes/esden/lisa_pwm_aspirin.xml
@@ -0,0 +1,260 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/airframes/example_twog_analogimu.xml b/conf/airframes/example_twog_analogimu.xml
index a4cf652c0e..479feb9c1b 100644
--- a/conf/airframes/example_twog_analogimu.xml
+++ b/conf/airframes/example_twog_analogimu.xml
@@ -1,6 +1,6 @@
-
@@ -57,11 +52,6 @@
-
@@ -94,7 +84,6 @@
@@ -209,28 +198,23 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
- ap.CFLAGS += -DANALOGIMU_ROTATED
- ap.CFLAGS += -DANALOGIMU_ZERO_AVERAGE
-
diff --git a/conf/airframes/funjet_cam_example.xml b/conf/airframes/funjet_cam_example.xml
index 76de339590..839a8f761d 100644
--- a/conf/airframes/funjet_cam_example.xml
+++ b/conf/airframes/funjet_cam_example.xml
@@ -41,8 +41,8 @@
-
-
+
+
diff --git a/conf/airframes/jsbsim.xml b/conf/airframes/jsbsim.xml
index 7b2f1d6d0b..67fe2f0a1a 100644
--- a/conf/airframes/jsbsim.xml
+++ b/conf/airframes/jsbsim.xml
@@ -34,7 +34,7 @@
-
+
@@ -52,7 +52,7 @@
-
+
@@ -80,13 +80,13 @@
-
+
-
+
-
+
@@ -199,7 +199,7 @@
#### Config for SITL simulation
include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
-sim.CFLAGS += -DBOARD_CONFIG=\"tiny_sim.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
+sim.CFLAGS += -DBOARD_CONFIG=\"boards/tiny_sim.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
sim.srcs += subsystems/navigation/nav_line.c subsystems/navigation/nav_survey_rectangle.c
@@ -207,7 +207,7 @@ sim.srcs += subsystems/navigation/nav_line.c subsystems/navigation/nav_survey_re
SRC_FIRMWARE = firmwares/fixedwing
include $(PAPARAZZI_SRC)/conf/autopilot/sitl_jsbsim.makefile
-jsbsim.CFLAGS += -DBOARD_CONFIG=\"tiny_sim.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
+jsbsim.CFLAGS += -DBOARD_CONFIG=\"boards/tiny_sim.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
jsbsim.srcs += subsystems/navigation/nav_line.c subsystems/navigation/nav_survey_rectangle.c
jsbsim.srcs += $(SIMDIR)/sim_ac_fw.c
diff --git a/conf/airframes/mentor_tum.xml b/conf/airframes/mentor_tum.xml
index 361e2fa209..4d00f9c4fa 100644
--- a/conf/airframes/mentor_tum.xml
+++ b/conf/airframes/mentor_tum.xml
@@ -29,15 +29,16 @@
-
-
+
+
+
-
-
-
+
+
+
diff --git a/conf/airframes/microjet_example.xml b/conf/airframes/microjet_example.xml
index c757c95670..405a1356c0 100644
--- a/conf/airframes/microjet_example.xml
+++ b/conf/airframes/microjet_example.xml
@@ -158,9 +158,18 @@
+
+
+
+
+
@@ -171,7 +180,7 @@
-
+
diff --git a/conf/airframes/microjet_raw_makefile.xml b/conf/airframes/microjet_raw_makefile.xml
index 050277440c..28b71fef98 100644
--- a/conf/airframes/microjet_raw_makefile.xml
+++ b/conf/airframes/microjet_raw_makefile.xml
@@ -181,7 +181,7 @@
CONFIG=\"tiny_2_11.h\"
include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
- ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
ap.CFLAGS += -DACTUATORS=\"servos_4015_MAT_hw.h\" -DSERVOS_4015_MAT
@@ -189,7 +189,7 @@
ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
- ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3
diff --git a/conf/airframes/mm/extra/logger_sd_adc.xml b/conf/airframes/mm/extra/logger_sd_adc.xml
index 390fac3e6e..e7d5417246 100644
--- a/conf/airframes/mm/extra/logger_sd_adc.xml
+++ b/conf/airframes/mm/extra/logger_sd_adc.xml
@@ -60,7 +60,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DLED -DLOGGER
+ap.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DLOGGER
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_logger.c
#choose one
@@ -70,7 +70,7 @@ ap.CFLAGS += -DLOG_XBEE
#set the speed
ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B57600 -DUSE_UART0_RX_ONLY
ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUSE_UART1_RX_ONLY
-ap.srcs += $(SRC_ARCH)/uart_hw.c
+ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#set SPI interface for SD card (0 or 1)
ap.CFLAGS += -DHW_ENDPOINT_LPC2000_SPINUM=0
diff --git a/conf/airframes/mm/extra/press_t.xml b/conf/airframes/mm/extra/press_t.xml
index 38dfec588a..8263abb2a4 100644
--- a/conf/airframes/mm/extra/press_t.xml
+++ b/conf/airframes/mm/extra/press_t.xml
@@ -227,7 +227,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -239,11 +239,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/extra/quiet.xml b/conf/airframes/mm/extra/quiet.xml
index 0fac57e481..0d3754173d 100644
--- a/conf/airframes/mm/extra/quiet.xml
+++ b/conf/airframes/mm/extra/quiet.xml
@@ -23,7 +23,7 @@ ap.CFLAGS += -DLOG_XBEE
#set the speed
ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B57600 -DUSE_UART0_RX_ONLY
ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUSE_UART1_RX_ONLY
-ap.srcs += $(SRC_ARCH)/uart_hw.c
+ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
diff --git a/conf/airframes/mm/extra/rctx.xml b/conf/airframes/mm/extra/rctx.xml
index 45f385c3c0..ec0c2d90d2 100644
--- a/conf/airframes/mm/extra/rctx.xml
+++ b/conf/airframes/mm/extra/rctx.xml
@@ -32,14 +32,14 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DCONFIG=$(CONFIG) -DLED
+ap.CFLAGS += -DFBW -DAP -DCONFIG=$(CONFIG) -DUSE_LED
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_rctx.c
ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_TYPE=RC_FUTABA
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c xbee.c
ap.CFLAGS += -DUSE_DOWNLINK_BROADCAST
diff --git a/conf/airframes/mm/fixed-wing/drops.xml b/conf/airframes/mm/fixed-wing/drops.xml
index 69dc6e5362..d725fffcde 100644
--- a/conf/airframes/mm/fixed-wing/drops.xml
+++ b/conf/airframes/mm/fixed-wing/drops.xml
@@ -243,7 +243,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -255,11 +255,11 @@ ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_AUTO1
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
@@ -293,7 +293,7 @@ sim.ARCHDIR = $(ARCHI)
sim.ARCH = sitl
sim.TARGET = autopilot
sim.TARGETDIR = autopilot
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl_a.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
diff --git a/conf/airframes/mm/fixed-wing/funjeteth1.xml b/conf/airframes/mm/fixed-wing/funjeteth1.xml
index a0130847fa..b0e551ada1 100644
--- a/conf/airframes/mm/fixed-wing/funjeteth1.xml
+++ b/conf/airframes/mm/fixed-wing/funjeteth1.xml
@@ -204,7 +204,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -216,11 +216,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/mm/fixed-wing/funjeteth2.xml b/conf/airframes/mm/fixed-wing/funjeteth2.xml
index 6c092bac67..1aee3db2a0 100644
--- a/conf/airframes/mm/fixed-wing/funjeteth2.xml
+++ b/conf/airframes/mm/fixed-wing/funjeteth2.xml
@@ -205,7 +205,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -217,11 +217,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/mm/fixed-wing/funjetfmi1.xml b/conf/airframes/mm/fixed-wing/funjetfmi1.xml
index 190f934f62..183fe6112c 100644
--- a/conf/airframes/mm/fixed-wing/funjetfmi1.xml
+++ b/conf/airframes/mm/fixed-wing/funjetfmi1.xml
@@ -207,7 +207,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -219,11 +219,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetfmi2.xml b/conf/airframes/mm/fixed-wing/funjetfmi2.xml
index 4147a894e9..0e006dc4e1 100644
--- a/conf/airframes/mm/fixed-wing/funjetfmi2.xml
+++ b/conf/airframes/mm/fixed-wing/funjetfmi2.xml
@@ -206,7 +206,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -218,11 +218,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetfmi3.xml b/conf/airframes/mm/fixed-wing/funjetfmi3.xml
index 2f89ac7e7d..467eb62730 100644
--- a/conf/airframes/mm/fixed-wing/funjetfmi3.xml
+++ b/conf/airframes/mm/fixed-wing/funjetfmi3.xml
@@ -206,7 +206,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -218,11 +218,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetgfi1.xml b/conf/airframes/mm/fixed-wing/funjetgfi1.xml
index 8f0fdbb206..402d3614d4 100644
--- a/conf/airframes/mm/fixed-wing/funjetgfi1.xml
+++ b/conf/airframes/mm/fixed-wing/funjetgfi1.xml
@@ -184,7 +184,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -196,11 +196,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetgfi3.xml b/conf/airframes/mm/fixed-wing/funjetgfi3.xml
index f5d33639e7..3647cddfc0 100644
--- a/conf/airframes/mm/fixed-wing/funjetgfi3.xml
+++ b/conf/airframes/mm/fixed-wing/funjetgfi3.xml
@@ -196,7 +196,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -208,10 +208,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-#TRANSPARENT ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#TRANSPARENT ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetgfi4.xml b/conf/airframes/mm/fixed-wing/funjetgfi4.xml
index a4bbe25fa9..dd100932fc 100644
--- a/conf/airframes/mm/fixed-wing/funjetgfi4.xml
+++ b/conf/airframes/mm/fixed-wing/funjetgfi4.xml
@@ -185,7 +185,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -197,11 +197,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetgfi5.xml b/conf/airframes/mm/fixed-wing/funjetgfi5.xml
index a849c6653a..0731f33820 100644
--- a/conf/airframes/mm/fixed-wing/funjetgfi5.xml
+++ b/conf/airframes/mm/fixed-wing/funjetgfi5.xml
@@ -186,7 +186,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -198,11 +198,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetgfi6.xml b/conf/airframes/mm/fixed-wing/funjetgfi6.xml
index 233c49573c..e4f607d80b 100644
--- a/conf/airframes/mm/fixed-wing/funjetgfi6.xml
+++ b/conf/airframes/mm/fixed-wing/funjetgfi6.xml
@@ -186,7 +186,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -198,11 +198,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetgfi7.xml b/conf/airframes/mm/fixed-wing/funjetgfi7.xml
index 3e7abb3574..be48d15148 100644
--- a/conf/airframes/mm/fixed-wing/funjetgfi7.xml
+++ b/conf/airframes/mm/fixed-wing/funjetgfi7.xml
@@ -186,7 +186,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -198,11 +198,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetgfi9.xml b/conf/airframes/mm/fixed-wing/funjetgfi9.xml
index 2a4de16260..aaacc21284 100644
--- a/conf/airframes/mm/fixed-wing/funjetgfi9.xml
+++ b/conf/airframes/mm/fixed-wing/funjetgfi9.xml
@@ -186,7 +186,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -198,11 +198,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/funjetlisa.xml b/conf/airframes/mm/fixed-wing/funjetlisa.xml
index d6e6556d1c..a92f5d8271 100644
--- a/conf/airframes/mm/fixed-wing/funjetlisa.xml
+++ b/conf/airframes/mm/fixed-wing/funjetlisa.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/conf/airframes/mm/fixed-wing/funjetlisam.xml b/conf/airframes/mm/fixed-wing/funjetlisam.xml
index 8173da67b3..33e68d8522 100644
--- a/conf/airframes/mm/fixed-wing/funjetlisam.xml
+++ b/conf/airframes/mm/fixed-wing/funjetlisam.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/conf/airframes/mm/fixed-wing/funjetmm2.xml b/conf/airframes/mm/fixed-wing/funjetmm2.xml
index 4485d2195a..b9dd882225 100644
--- a/conf/airframes/mm/fixed-wing/funjetmm2.xml
+++ b/conf/airframes/mm/fixed-wing/funjetmm2.xml
@@ -212,7 +212,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -224,11 +224,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/miniwing.xml b/conf/airframes/mm/fixed-wing/miniwing.xml
index 3e9f7d9597..68bee9865c 100644
--- a/conf/airframes/mm/fixed-wing/miniwing.xml
+++ b/conf/airframes/mm/fixed-wing/miniwing.xml
@@ -180,7 +180,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -192,7 +192,7 @@ ap.CFLAGS += -DRADIO_CONTROL -DUSE_RC_TELEMETRY
ap.srcs += radio_control.c ppm_telemetry.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/mm/fixed-wing/slowfast.xml b/conf/airframes/mm/fixed-wing/slowfast.xml
index ddf00fbd9a..13fca656e9 100644
--- a/conf/airframes/mm/fixed-wing/slowfast.xml
+++ b/conf/airframes/mm/fixed-wing/slowfast.xml
@@ -227,7 +227,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -239,11 +239,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/slowfast2.xml b/conf/airframes/mm/fixed-wing/slowfast2.xml
index 708cf98ac2..13db40d0c9 100644
--- a/conf/airframes/mm/fixed-wing/slowfast2.xml
+++ b/conf/airframes/mm/fixed-wing/slowfast2.xml
@@ -241,7 +241,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -253,11 +253,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/fixed-wing/twinstarmm.xml b/conf/airframes/mm/fixed-wing/twinstarmm.xml
index 92db7ebddb..870947b36c 100644
--- a/conf/airframes/mm/fixed-wing/twinstarmm.xml
+++ b/conf/airframes/mm/fixed-wing/twinstarmm.xml
@@ -203,7 +203,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -216,11 +216,11 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#XBEE
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
@@ -247,7 +247,7 @@ ap.srcs += subsystems/navigation/snav.c
# Config for SITL simulation
# include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
sim.ARCHDIR = $(ARCHI)
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl_a.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
diff --git a/conf/airframes/mm/hangar/black_one.xml b/conf/airframes/mm/hangar/black_one.xml
index fcb1f0398f..be9796bf51 100644
--- a/conf/airframes/mm/hangar/black_one.xml
+++ b/conf/airframes/mm/hangar/black_one.xml
@@ -216,7 +216,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -228,10 +228,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/mm/hangar/glass_one1.xml b/conf/airframes/mm/hangar/glass_one1.xml
index c87a0f442c..e8bf7ff754 100644
--- a/conf/airframes/mm/hangar/glass_one1.xml
+++ b/conf/airframes/mm/hangar/glass_one1.xml
@@ -206,7 +206,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -218,10 +218,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/mm/hangar/glass_one2.xml b/conf/airframes/mm/hangar/glass_one2.xml
index d1b53ac34e..2aa4cd4511 100644
--- a/conf/airframes/mm/hangar/glass_one2.xml
+++ b/conf/airframes/mm/hangar/glass_one2.xml
@@ -180,7 +180,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -192,10 +192,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/mm/hangar/glass_one3.xml b/conf/airframes/mm/hangar/glass_one3.xml
index 8eb4e8755e..64c7c610fb 100644
--- a/conf/airframes/mm/hangar/glass_one3.xml
+++ b/conf/airframes/mm/hangar/glass_one3.xml
@@ -207,7 +207,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -219,10 +219,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/mm/hangar/lila.xml b/conf/airframes/mm/hangar/lila.xml
index c93cca0366..1dd11c946a 100644
--- a/conf/airframes/mm/hangar/lila.xml
+++ b/conf/airframes/mm/hangar/lila.xml
@@ -203,7 +203,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -215,11 +215,11 @@ ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_TYPE=RC_FUTABA
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
@@ -247,7 +247,7 @@ ap.srcs += subsystems/navigation/snav.c
# Config for SITL simulation
sim.ARCHDIR = $(ARCHI)
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl_a.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
diff --git a/conf/airframes/mm/hangar/mac06a.xml b/conf/airframes/mm/hangar/mac06a.xml
index e7e2240692..932014cd75 100644
--- a/conf/airframes/mm/hangar/mac06a.xml
+++ b/conf/airframes/mm/hangar/mac06a.xml
@@ -200,7 +200,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -212,10 +212,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#XBEE ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#XBEE ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#XBEE ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/mm/hangar/red_one.xml b/conf/airframes/mm/hangar/red_one.xml
index e2aca5ec54..887601c421 100644
--- a/conf/airframes/mm/hangar/red_one.xml
+++ b/conf/airframes/mm/hangar/red_one.xml
@@ -227,7 +227,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -239,10 +239,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/mm/rotor/qmk1.xml b/conf/airframes/mm/rotor/qmk1.xml
index 8935328ed0..409ec50983 100644
--- a/conf/airframes/mm/rotor/qmk1.xml
+++ b/conf/airframes/mm/rotor/qmk1.xml
@@ -189,7 +189,6 @@
-
@@ -199,9 +198,11 @@
-
+
-
+
+
+
diff --git a/conf/airframes/booz2_Aron.xml b/conf/airframes/obsolete/booz2_Aron.xml
similarity index 79%
rename from conf/airframes/booz2_Aron.xml
rename to conf/airframes/obsolete/booz2_Aron.xml
index 3314d84eb2..ebd46bf904 100644
--- a/conf/airframes/booz2_Aron.xml
+++ b/conf/airframes/obsolete/booz2_Aron.xml
@@ -1,37 +1,37 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -46,10 +46,10 @@
-
+
-
+
@@ -62,9 +62,9 @@
-
+
-
+
diff --git a/conf/airframes/booz2_NoVa.xml b/conf/airframes/obsolete/booz2_NoVa.xml
similarity index 88%
rename from conf/airframes/booz2_NoVa.xml
rename to conf/airframes/obsolete/booz2_NoVa.xml
index 5a050ecd98..86d5481083 100644
--- a/conf/airframes/booz2_NoVa.xml
+++ b/conf/airframes/obsolete/booz2_NoVa.xml
@@ -70,18 +70,18 @@
-
-
-
+
+
+
-
-
-
+
+
+
@@ -91,7 +91,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/airframes/booz2_NoVa_001.xml b/conf/airframes/obsolete/booz2_NoVa_001.xml
similarity index 88%
rename from conf/airframes/booz2_NoVa_001.xml
rename to conf/airframes/obsolete/booz2_NoVa_001.xml
index 3962ee5378..99f676ffc5 100644
--- a/conf/airframes/booz2_NoVa_001.xml
+++ b/conf/airframes/obsolete/booz2_NoVa_001.xml
@@ -70,18 +70,18 @@
-
-
-
+
+
+
-
-
-
+
+
+
@@ -91,7 +91,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/airframes/booz2_NoVa_002.xml b/conf/airframes/obsolete/booz2_NoVa_002.xml
similarity index 88%
rename from conf/airframes/booz2_NoVa_002.xml
rename to conf/airframes/obsolete/booz2_NoVa_002.xml
index 198745a46e..2b74d58c71 100644
--- a/conf/airframes/booz2_NoVa_002.xml
+++ b/conf/airframes/obsolete/booz2_NoVa_002.xml
@@ -70,18 +70,18 @@
-
-
-
+
+
+
-
-
-
+
+
+
@@ -91,7 +91,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/airframes/booz2_s1.xml b/conf/airframes/obsolete/booz2_s1.xml
similarity index 98%
rename from conf/airframes/booz2_s1.xml
rename to conf/airframes/obsolete/booz2_s1.xml
index bc0035c8cb..31084571f3 100644
--- a/conf/airframes/booz2_s1.xml
+++ b/conf/airframes/obsolete/booz2_s1.xml
@@ -39,10 +39,10 @@
-
+
-
+
@@ -55,7 +55,7 @@
-
+
@@ -160,7 +160,7 @@
-
+
@@ -196,7 +196,7 @@ BOARD_CFG = \"boards/booz2_v1_0.h\"
# Enables Canon Hack Development Kit features.
-ap.CFLAGS += -DLED -DCANON_CHDK
+ap.CFLAGS += -DUSE_LED -DCANON_CHDK
ap.srcs += $(PAPARAZZI_SRC)/sw/airborne/chdk.c
include $(PAPARAZZI_SRC)/conf/autopilot/booz2_common.makefile
diff --git a/conf/airframes/booz2_x1.xml b/conf/airframes/obsolete/booz2_x1.xml
similarity index 100%
rename from conf/airframes/booz2_x1.xml
rename to conf/airframes/obsolete/booz2_x1.xml
diff --git a/conf/airframes/csc.xml b/conf/airframes/obsolete/csc.xml
similarity index 100%
rename from conf/airframes/csc.xml
rename to conf/airframes/obsolete/csc.xml
diff --git a/conf/airframes/csc_ap.xml b/conf/airframes/obsolete/csc_ap.xml
similarity index 100%
rename from conf/airframes/csc_ap.xml
rename to conf/airframes/obsolete/csc_ap.xml
diff --git a/conf/airframes/obsolete/dc_mc.xml b/conf/airframes/obsolete/dc_mc.xml
index fa94047805..76e6aff207 100644
--- a/conf/airframes/obsolete/dc_mc.xml
+++ b/conf/airframes/obsolete/dc_mc.xml
@@ -20,11 +20,11 @@ main.srcs = main_dc_mc.c
main.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(10e-2)'
main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-main.CFLAGS += -DLED
+main.CFLAGS += -DUSE_LED
#-DTIME_LED=1
main.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-main.srcs += $(SRC_ARCH)/uart_hw.c
+main.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
main.srcs += downlink.c pprz_transport.c
diff --git a/conf/airframes/obsolete/easystar2.xml b/conf/airframes/obsolete/easystar2.xml
index 2ebf40831f..bc44601368 100644
--- a/conf/airframes/obsolete/easystar2.xml
+++ b/conf/airframes/obsolete/easystar2.xml
@@ -178,7 +178,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1 -DUSE_MODULES
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1 -DUSE_MODULES
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -193,7 +193,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# Telemetry configuration
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/obsolete/example.xml b/conf/airframes/obsolete/example.xml
index 81bd9b7c2b..e225a43a4d 100644
--- a/conf/airframes/obsolete/example.xml
+++ b/conf/airframes/obsolete/example.xml
@@ -20,12 +20,12 @@ example_gps.srcs = example/example_gps.c
example_gps.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(10e-2)'
example_gps.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-example_gps.CFLAGS += -DLED
+example_gps.CFLAGS += -DUSE_LED
example_gps.srcs += $(SRC_ARCH)/armVIC.c
example_gps.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-example_gps.srcs += $(SRC_ARCH)/uart_hw.c
+example_gps.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
example_gps.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
example_gps.srcs += downlink.c pprz_transport.c
diff --git a/conf/airframes/hitl_usb.xml b/conf/airframes/obsolete/hitl_usb.xml
similarity index 96%
rename from conf/airframes/hitl_usb.xml
rename to conf/airframes/obsolete/hitl_usb.xml
index 7108d6acf2..653b66330c 100644
--- a/conf/airframes/hitl_usb.xml
+++ b/conf/airframes/obsolete/hitl_usb.xml
@@ -114,7 +114,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -129,7 +129,7 @@ ap.srcs += pprz_transport.c
#XBEE ap.srcs += xbee.c
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/usb_ser_hw.c datalink.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/usb_ser_hw.c datalink.c
ap.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
ap.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
@@ -154,7 +154,7 @@ ap.CFLAGS += -DGPS_USE_LATLONG # simulating LEA 5H
# Config for SITL simulation
sim.ARCHDIR = $(ARCH)
-sim.CFLAGS += -DSITL -DAP -DFBW -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED
+sim.CFLAGS += -DSITL -DAP -DFBW -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED
sim.srcs = latlong.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c subsystems/nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
sim.srcs += subsystems/navigation/nav_survey_rectangle.c subsystems/navigation/nav_line.c subsystems/navigation/traffic_info.c
diff --git a/conf/airframes/obsolete/kalscott_easystar.xml b/conf/airframes/obsolete/kalscott_easystar.xml
index 6f5519ba87..b56de424ca 100644
--- a/conf/airframes/obsolete/kalscott_easystar.xml
+++ b/conf/airframes/obsolete/kalscott_easystar.xml
@@ -158,7 +158,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1 -DUSE_MODULES
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1 -DUSE_MODULES
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -173,7 +173,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# Telemetry configuration
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/logger_sd.xml b/conf/airframes/obsolete/logger_sd.xml
similarity index 96%
rename from conf/airframes/logger_sd.xml
rename to conf/airframes/obsolete/logger_sd.xml
index c310466dc7..0d6a3714b3 100644
--- a/conf/airframes/logger_sd.xml
+++ b/conf/airframes/obsolete/logger_sd.xml
@@ -43,7 +43,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DLED
+ap.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DUSE_LED
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_logger.c
#choose one
@@ -53,7 +53,7 @@ ap.CFLAGS += -DLOG_XBEE
#set the speed
ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B9600 -DUSE_UART0_RX_ONLY
ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B9600 -DUSE_UART1_RX_ONLY
-ap.srcs += $(SRC_ARCH)/uart_hw.c
+ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#set SPI interface for SD card (0 or 1)
ap.CFLAGS += -DHW_ENDPOINT_LPC2000_SPINUM=1
diff --git a/conf/airframes/obsolete/microjet5.xml b/conf/airframes/obsolete/microjet5.xml
index 418d2ba25f..5a7971bc76 100644
--- a/conf/airframes/obsolete/microjet5.xml
+++ b/conf/airframes/obsolete/microjet5.xml
@@ -175,7 +175,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -187,7 +187,7 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/obsolete/microjet5_tp_auto.xml b/conf/airframes/obsolete/microjet5_tp_auto.xml
index 2202e38386..5e2287cacd 100644
--- a/conf/airframes/obsolete/microjet5_tp_auto.xml
+++ b/conf/airframes/obsolete/microjet5_tp_auto.xml
@@ -177,10 +177,10 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
-ap.CFLAGS += -DLED_3_BANK=0 -DLED_3_PIN=17 -DLED_4_BANK=0 -DLED_4_PIN=18 -DLED_5_BANK=0 -DLED_5_PIN=19 -DLED_6_BANK=0 -DLED_6_PIN=20
+ap.CFLAGS += -DUSE_LED_3_BANK=0 -DUSE_LED_3_PIN=17 -DUSE_LED_4_BANK=0 -DUSE_LED_4_PIN=18 -DUSE_LED_5_BANK=0 -DUSE_LED_5_PIN=19 -DUSE_LED_6_BANK=0 -DUSE_LED_6_PIN=20
ap.srcs += commands.c
@@ -192,10 +192,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c latlong.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c latlong.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/microjet6.xml b/conf/airframes/obsolete/microjet6.xml
index b253366e0c..71f9184796 100644
--- a/conf/airframes/obsolete/microjet6.xml
+++ b/conf/airframes/obsolete/microjet6.xml
@@ -200,7 +200,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -213,11 +213,11 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# API mode
# ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B57600
-# ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+# ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
# transparent
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/microjetI.xml b/conf/airframes/obsolete/microjetI.xml
index ed08e55f50..1be67762ec 100644
--- a/conf/airframes/obsolete/microjetI.xml
+++ b/conf/airframes/obsolete/microjetI.xml
@@ -187,7 +187,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -200,11 +200,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B19200
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
# transparent
# ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-# ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+# ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/microjetII.xml b/conf/airframes/obsolete/microjetII.xml
index 1948c1959d..913e68d99b 100644
--- a/conf/airframes/obsolete/microjetII.xml
+++ b/conf/airframes/obsolete/microjetII.xml
@@ -187,7 +187,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -200,11 +200,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B19200
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
# transparent
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/microjetIII.xml b/conf/airframes/obsolete/microjetIII.xml
index 36df078b8c..4697f6e2cc 100644
--- a/conf/airframes/obsolete/microjetIII.xml
+++ b/conf/airframes/obsolete/microjetIII.xml
@@ -176,7 +176,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -189,11 +189,11 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
# transparent
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/minimag_fs.xml b/conf/airframes/obsolete/minimag_fs.xml
index 4e5aa431e1..2f73162216 100644
--- a/conf/airframes/obsolete/minimag_fs.xml
+++ b/conf/airframes/obsolete/minimag_fs.xml
@@ -182,7 +182,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -195,7 +195,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/nova.xml b/conf/airframes/obsolete/nova.xml
index 365565a847..256c6ae89e 100644
--- a/conf/airframes/obsolete/nova.xml
+++ b/conf/airframes/obsolete/nova.xml
@@ -11,10 +11,10 @@ timu.ARCHDIR = $(ARCHI)
timu.CFLAGS += -DBOARD_CONFIG=\"tiny_2_0.h\" -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1e-1)'
timu.srcs = nova_test_imu.c sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-timu.CFLAGS += -DLED -DLED -DTIME_LED=1
+timu.CFLAGS += -DUSE_LED -DUSE_LED -DTIME_LED=1
timu.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-timu.srcs += downlink.c $(SRC_ARCH)/uart_hw.c pprz_transport.c
+timu.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c pprz_transport.c
timu.srcs += $(SRC_ARCH)/ADS8344.c
diff --git a/conf/airframes/obsolete/slayer1.xml b/conf/airframes/obsolete/slayer1.xml
index 086cbd8421..d44389ac6e 100644
--- a/conf/airframes/obsolete/slayer1.xml
+++ b/conf/airframes/obsolete/slayer1.xml
@@ -192,7 +192,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -204,10 +204,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600 -DXBEE868
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c latlong.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c latlong.c xbee.c
#transp ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-#transp ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#transp ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/slayer3.xml b/conf/airframes/obsolete/slayer3.xml
index 928b3c88d8..b6f57d2451 100644
--- a/conf/airframes/obsolete/slayer3.xml
+++ b/conf/airframes/obsolete/slayer3.xml
@@ -194,7 +194,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -206,10 +206,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-#TRANSPARENT ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#TRANSPARENT ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/slayerJH.xml b/conf/airframes/obsolete/slayerJH.xml
index 48b830b90b..2cec49a721 100644
--- a/conf/airframes/obsolete/slayerJH.xml
+++ b/conf/airframes/obsolete/slayerJH.xml
@@ -175,7 +175,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -188,11 +188,11 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#MAXSTREAM
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
#TRANSPARENT
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/slicer1.xml b/conf/airframes/obsolete/slicer1.xml
index 3cd8b34397..784f96a463 100644
--- a/conf/airframes/obsolete/slicer1.xml
+++ b/conf/airframes/obsolete/slicer1.xml
@@ -186,7 +186,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -200,7 +200,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# Radiotronix
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/obsolete/slicer2.xml b/conf/airframes/obsolete/slicer2.xml
index 0311507969..2705338724 100644
--- a/conf/airframes/obsolete/slicer2.xml
+++ b/conf/airframes/obsolete/slicer2.xml
@@ -168,7 +168,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -182,7 +182,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# Radiotronix
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/obsolete/spirit.xml b/conf/airframes/obsolete/spirit.xml
index 53c1dc9c9e..ed3b0b5b42 100644
--- a/conf/airframes/obsolete/spirit.xml
+++ b/conf/airframes/obsolete/spirit.xml
@@ -185,7 +185,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -199,7 +199,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# transparent
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/obsolete/spirit_proto.xml b/conf/airframes/obsolete/spirit_proto.xml
index 257a656625..108e8b940f 100644
--- a/conf/airframes/obsolete/spirit_proto.xml
+++ b/conf/airframes/obsolete/spirit_proto.xml
@@ -173,7 +173,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -187,7 +187,7 @@ ap.srcs += poradio_control.c $(SRC_ARCH)/ppm_hw.c
# transparent
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/obsolete/storm1.xml b/conf/airframes/obsolete/storm1.xml
index 99dc34336d..aa4eb82ea4 100644
--- a/conf/airframes/obsolete/storm1.xml
+++ b/conf/airframes/obsolete/storm1.xml
@@ -228,7 +228,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -241,17 +241,17 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -#DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B57600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DTELEMETRY_MODE_FBW=1
#TRANSPARENT ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-#TRANSPARENT ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#TRANSPARENT ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/obsolete/tiny2.xml b/conf/airframes/obsolete/tiny2.xml
index 4220672e22..d18fb4a59b 100644
--- a/conf/airframes/obsolete/tiny2.xml
+++ b/conf/airframes/obsolete/tiny2.xml
@@ -199,7 +199,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -211,10 +211,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
#XBEE ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-#XBEE ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+#XBEE ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/tiny_hitl.xml b/conf/airframes/obsolete/tiny_hitl.xml
similarity index 98%
rename from conf/airframes/tiny_hitl.xml
rename to conf/airframes/obsolete/tiny_hitl.xml
index ac97fa1fc3..4638d90d03 100644
--- a/conf/airframes/tiny_hitl.xml
+++ b/conf/airframes/obsolete/tiny_hitl.xml
@@ -165,7 +165,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -179,7 +179,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# transparent
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c
diff --git a/conf/airframes/obsolete/tl.xml b/conf/airframes/obsolete/tl.xml
index 0787729120..9412650b8c 100644
--- a/conf/airframes/obsolete/tl.xml
+++ b/conf/airframes/obsolete/tl.xml
@@ -86,7 +86,7 @@ ap.ARCHDIR = $(ARCHI)
ap.CFLAGS += -DBOARD_CONFIG=\"tiny_1_1.h\" -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(16.666e-3)' -I$(TL)
ap.srcs = $(TL)/tl_main.c sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-ap.CFLAGS += -DLED -DLED -DTIME_LED=1
+ap.CFLAGS += -DUSE_LED -DUSE_LED -DTIME_LED=1
ap.CFLAGS += -DADC
ap.srcs += $(SRC_ARCH)/adc_hw.c $(TL)/tl_bat.c
@@ -101,7 +101,7 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# transparent
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c pprz_transport.c $(TL)/tl_telemetry.c datalink.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c pprz_transport.c $(TL)/tl_telemetry.c datalink.c
ap.CFLAGS += -DTL_AP_MODE_AUTO=TL_AP_MODE_NAV -DDT_VFILTER="(1./60.)"
ap.srcs += $(TL)/tl_autopilot.c $(TL)/tl_control.c $(TL)/tl_estimator.c $(TL)/tl_vfilter.c
@@ -133,9 +133,9 @@ tmm.ARCHDIR = $(ARCHI)
tmm.CFLAGS += -DBOARD_CONFIG=\"tiny_1_1.h\" -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(16.666e-3)'
tmm.srcs = $(TL)/tl_test_mm_main.c sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-tmm.CFLAGS += -DLED -DLED -DTIME_LED=1
+tmm.CFLAGS += -DUSE_LED -DUSE_LED -DTIME_LED=1
tmm.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DUART0_BAUD=B57600
-tmm.srcs += downlink.c $(SRC_ARCH)/uart_hw.c pprz_transport.c
+tmm.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c pprz_transport.c
tmm.srcs += micromag.c $(SRC_ARCH)/micromag_hw.c
@@ -148,9 +148,9 @@ timu.ARCHDIR = $(ARCHI)
timu.CFLAGS += -DBOARD_CONFIG=\"tiny_1_1.h\" -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(16.666e-3)'
timu.srcs = $(TL)/tl_test_imu_main.c sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-timu.CFLAGS += -DLED -DLED -DTIME_LED=1
+timu.CFLAGS += -DUSE_LED -DUSE_LED -DTIME_LED=1
timu.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DUART0_BAUD=B57600
-timu.srcs += downlink.c $(SRC_ARCH)/uart_hw.c pprz_transport.c
+timu.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c pprz_transport.c
timu.srcs += $(TL)/tl_imu.c
timu.CFLAGS += -DADC -DUSE_ADC_5 -DADC_CHANNEL_GR=ADC_5 -DUSE_ADC_6 -DADC_CHANNEL_RM=ADC_6 -DUSE_ADC_7 -DADC_CHANNEL_ACCEL=ADC_7
diff --git a/conf/airframes/obsolete/twinjet1.xml b/conf/airframes/obsolete/twinjet1.xml
index 0721f67e8b..8c2450f8d4 100644
--- a/conf/airframes/obsolete/twinjet1.xml
+++ b/conf/airframes/obsolete/twinjet1.xml
@@ -172,7 +172,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/classix.makefile
# FLASH_MODE=ISP
FLASH_MODE=IAP
-fbw.CFLAGS += -DFBW -DBOARD_CONFIG=\"classix.h\" -DLED -DTIME_LED=1
+fbw.CFLAGS += -DFBW -DBOARD_CONFIG=\"classix.h\" -DUSE_LED -DTIME_LED=1
fbw.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main.c
fbw.srcs += commands.c
@@ -184,7 +184,7 @@ fbw.CFLAGS += -DRADIO_CONTROL
fbw.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
fbw.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DUART0_BAUD=B9600
-fbw.srcs += downlink.c pprz_transport.c $(SRC_ARCH)/uart_hw.c
+fbw.srcs += downlink.c pprz_transport.c $(SRC_ARCH)/mcu_periph/uart_arch.c
fbw.CFLAGS += -DINTER_MCU -DMCU_SPI_LINK -DUSE_SPI -DSPI_SLAVE
fbw.srcs += inter_mcu.c link_mcu.c spi.c $(SRC_ARCH)/spi_hw.c
@@ -193,14 +193,14 @@ fbw.CFLAGS += -DADC -DUSE_AD0
fbw.srcs += $(SRC_ARCH)/adc_hw.c
-ap.CFLAGS += -DAP -DRADIO_CONTROL_AUTO1 -DBOARD_CONFIG=\"classix.h\" -DLED -DTIME_LED=2
+ap.CFLAGS += -DAP -DRADIO_CONTROL_AUTO1 -DBOARD_CONFIG=\"classix.h\" -DUSE_LED -DTIME_LED=2
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_ap.c main.c
#ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c subsystems/navigation/traffic_info.c xbee.c
+#ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c subsystems/navigation/traffic_info.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU -DMCU_SPI_LINK -DUSE_SPI -DSPI_MASTER -DUSE_SPI_SLAVE0
ap.srcs += inter_mcu.c link_mcu.c spi.c $(SRC_ARCH)/spi_hw.c
@@ -237,8 +237,8 @@ ap.CFLAGS += -DUSE_LIGHT
-test.CFLAGS += -DFBW -DBOARD_CONFIG=\"classix.h\" -DLED -DTIME_LED=1 -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017 -DSERVOS_4017_CLOCK_FALLING -DUSE_UART0 -DDATALINK -DPPRZ_INPUT -DPPRZ_UART=Uart0 -DUART0_BAUD=B9600
-test.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/servos_4017_hw.c main.c
+test.CFLAGS += -DFBW -DBOARD_CONFIG=\"classix.h\" -DUSE_LED -DTIME_LED=1 -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017 -DSERVOS_4017_CLOCK_FALLING -DUSE_UART0 -DDATALINK -DPPRZ_INPUT -DPPRZ_UART=Uart0 -DUART0_BAUD=B9600
+test.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/servos_4017_hw.c main.c
# Config for SITL simulation
include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
diff --git a/conf/airframes/obsolete/twinstar6.xml b/conf/airframes/obsolete/twinstar6.xml
index a7a381a4eb..30aeb79607 100644
--- a/conf/airframes/obsolete/twinstar6.xml
+++ b/conf/airframes/obsolete/twinstar6.xml
@@ -180,7 +180,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/classix.makefile
# FLASH_MODE=ISP
FLASH_MODE=IAP
-fbw.CFLAGS += -DFBW -DBOARD_CONFIG=\"classix.h\" -DLED -DTIME_LED=1
+fbw.CFLAGS += -DFBW -DBOARD_CONFIG=\"classix.h\" -DUSE_LED -DTIME_LED=1
fbw.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main.c
fbw.srcs += commands.c
@@ -192,7 +192,7 @@ fbw.CFLAGS += -DRADIO_CONTROL
fbw.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
fbw.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DUART0_BAUD=B9600
-fbw.srcs += downlink.c pprz_transport.c $(SRC_ARCH)/uart_hw.c
+fbw.srcs += downlink.c pprz_transport.c $(SRC_ARCH)/mcu_periph/uart_arch.c
fbw.CFLAGS += -DINTER_MCU -DMCU_SPI_LINK -DUSE_SPI -DSPI_SLAVE
fbw.srcs += inter_mcu.c link_mcu.c spi.c $(SRC_ARCH)/spi_hw.c
@@ -201,11 +201,11 @@ fbw.CFLAGS += -DADC -DUSE_AD0
fbw.srcs += $(SRC_ARCH)/adc_hw.c
-ap.CFLAGS += -DAP -DRADIO_CONTROL_AUTO1 -DBOARD_CONFIG=\"classix.h\" -DLED -DTIME_LED=2
+ap.CFLAGS += -DAP -DRADIO_CONTROL_AUTO1 -DBOARD_CONFIG=\"classix.h\" -DUSE_LED -DTIME_LED=2
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_ap.c main.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c subsystems/navigation/traffic_info.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c subsystems/navigation/traffic_info.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU -DMCU_SPI_LINK -DUSE_SPI -DSPI_MASTER
ap.srcs += inter_mcu.c link_mcu.c spi.c $(SRC_ARCH)/spi_hw.c
@@ -237,8 +237,8 @@ ap.CFLAGS += -DDIGITAL_CAM
ap.srcs += dc.c
-test.CFLAGS += -DFBW -DBOARD_CONFIG=\"classix.h\" -DLED -DTIME_LED=1 -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017 -DSERVOS_4017_CLOCK_FALLING -DUSE_UART0 -DDATALINK -DPPRZ_INPUT -DPPRZ_UART=Uart0 -DUART0_BAUD=B9600
-test.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/servos_4017_hw.c main.c
+test.CFLAGS += -DFBW -DBOARD_CONFIG=\"classix.h\" -DUSE_LED -DTIME_LED=1 -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017 -DSERVOS_4017_CLOCK_FALLING -DUSE_UART0 -DDATALINK -DPPRZ_INPUT -DPPRZ_UART=Uart0 -DUART0_BAUD=B9600
+test.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/servos_4017_hw.c main.c
# Config for SITL simulation
include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
diff --git a/conf/airframes/obsolete/twisted.xml b/conf/airframes/obsolete/twisted.xml
index a9db415bc8..19ebf649b7 100644
--- a/conf/airframes/obsolete/twisted.xml
+++ b/conf/airframes/obsolete/twisted.xml
@@ -46,7 +46,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_1_1.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_coax.c main.c
ap.CFLAGS += -DACTUATORS=\"servos_4015_MAT_hw.h\" -DSERVOS_4015_MAT
@@ -56,7 +56,7 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B19200
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DUSE_SPI -DSPI_MASTER -DUSE_SPI_SLAVE0 -DUSE_BARO_MS5534A
ap.srcs += spi.c $(SRC_ARCH)/spi_hw.c $(SRC_ARCH)/baro_MS5534A.c
diff --git a/conf/airframes/obsolete/tyto1.xml b/conf/airframes/obsolete/tyto1.xml
index 15feae9864..049cea6a4f 100644
--- a/conf/airframes/obsolete/tyto1.xml
+++ b/conf/airframes/obsolete/tyto1.xml
@@ -204,7 +204,7 @@ FLASH_MODE=IAP
ap.CFLAGS += -DTELEMETRY_MODE_FBW=1
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -216,10 +216,10 @@ ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-# ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+# ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c xbee.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
diff --git a/conf/airframes/vor.xml b/conf/airframes/obsolete/vor.xml
similarity index 89%
rename from conf/airframes/vor.xml
rename to conf/airframes/obsolete/vor.xml
index ea7f66b737..ef449a636a 100644
--- a/conf/airframes/vor.xml
+++ b/conf/airframes/obsolete/vor.xml
@@ -14,14 +14,14 @@ main.srcs = firmwares/vor/lpc_vor_main.c
main.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./29880.)'
main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-main.CFLAGS += -DLED
+main.CFLAGS += -DUSE_LED
main.srcs += $(SRC_ARCH)/armVIC.c
main.srcs += firmwares/vor/lpc_vor_convertions.c
main.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B9600
-main.srcs += $(SRC_ARCH)/uart_hw.c
+main.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
main.srcs += downlink.c pprz_transport.c
diff --git a/conf/airframes/whirly.xml b/conf/airframes/obsolete/whirly.xml
similarity index 100%
rename from conf/airframes/whirly.xml
rename to conf/airframes/obsolete/whirly.xml
diff --git a/conf/airframes/obsolete/xxx1.xml b/conf/airframes/obsolete/xxx1.xml
index 7c967182fa..972d9e9809 100644
--- a/conf/airframes/obsolete/xxx1.xml
+++ b/conf/airframes/obsolete/xxx1.xml
@@ -209,7 +209,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
FLASH_MODE=IAP
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_0_99.h\" -DLED -DTIME_LED=1
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=\"tiny_0_99.h\" -DUSE_LED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
ap.srcs += commands.c
@@ -222,10 +222,10 @@ ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
# ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
#TRANSPARENT ap.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DPPRZ_UART=Uart0 -DDATALINK=PPRZ -DUART0_BAUD=B9600
-#TRANSPARENT ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+#TRANSPARENT ap.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c datalink.c pprz_transport.c
ap.CFLAGS += -DINTER_MCU
@@ -278,8 +278,8 @@ sim.srcs += subsystems/navigation/nav_line.c subsystems/navigation/nav_survey_re
# a test program to setup actuators
setup_actuators.ARCHDIR = $(ARCHI)
-setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART0 -DUART0_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart0
-setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/servos_4015_hw.c main.c
+setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART0 -DUART0_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart0
+setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/servos_4015_hw.c main.c
diff --git a/conf/airframes/test_hb.xml b/conf/airframes/test_hb.xml
new file mode 100644
index 0000000000..4d8b1c6795
--- /dev/null
+++ b/conf/airframes/test_hb.xml
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/airframes/test_i2c.xml b/conf/airframes/test_i2c.xml
index c575a5cd8e..8ddf557a10 100644
--- a/conf/airframes/test_i2c.xml
+++ b/conf/airframes/test_i2c.xml
@@ -19,10 +19,10 @@ FLASH_MODE = ISP
mb.CFLAGS += -DBOARD_CONFIG=\"conf_motor_bench.h\" -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(10e-3)'
mb.srcs = $(SRC_ARCH)/main_test_i2c.c sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-mb.CFLAGS += -DLED
+mb.CFLAGS += -DUSE_LED
mb.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-mb.srcs += $(SRC_ARCH)/uart_hw.c
+mb.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
mb.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
mb.srcs += downlink.c pprz_transport.c
diff --git a/conf/airframes/twinjet_example.xml b/conf/airframes/twinjet_example.xml
index dbece1f26f..70fd68b0b7 100644
--- a/conf/airframes/twinjet_example.xml
+++ b/conf/airframes/twinjet_example.xml
@@ -34,6 +34,12 @@
+
+
+
+
+
+
diff --git a/conf/airframes/twinjet_overo.xml b/conf/airframes/twinjet_overo.xml
old mode 100755
new mode 100644
diff --git a/conf/airframes/wind_tunnel.xml b/conf/airframes/wind_tunnel.xml
index 2ae886c686..418362b110 100644
--- a/conf/airframes/wind_tunnel.xml
+++ b/conf/airframes/wind_tunnel.xml
@@ -17,12 +17,12 @@ ap.srcs = $(WIND_TUNNEL)/main.c
ap.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1e-1)'
ap.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-ap.CFLAGS += -DLED
+ap.CFLAGS += -DUSE_LED
ap.srcs += $(SRC_ARCH)/armVIC.c
ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-ap.srcs += $(SRC_ARCH)/uart_hw.c
+ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
ap.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
ap.srcs += downlink.c pprz_transport.c
@@ -47,12 +47,12 @@ mb.srcs = $(WIND_TUNNEL)/main_mb.c
mb.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1e-2)'
mb.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-mb.CFLAGS += -DLED
+mb.CFLAGS += -DUSE_LED
mb.srcs += $(SRC_ARCH)/armVIC.c
mb.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-mb.srcs += $(SRC_ARCH)/uart_hw.c
+mb.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
mb.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
mb.srcs += downlink.c pprz_transport.c
diff --git a/conf/autopilot/booz2_test_progs.makefile b/conf/autopilot/booz2_test_progs.makefile
index aab10a795c..ec7cc603ac 100644
--- a/conf/autopilot/booz2_test_progs.makefile
+++ b/conf/autopilot/booz2_test_progs.makefile
@@ -22,6 +22,8 @@
#
#
+include $(PAPARAZZI_SRC)/conf/autopilot/booz2_common.makefile
+
#
# test_led : blinks all leds
#
@@ -47,7 +49,7 @@ test_downlink.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./10.))' -DTIM
test_downlink.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_downlink.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_downlink.srcs += $(SRC_ARCH)/uart_hw.c
+test_downlink.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_downlink.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_downlink.srcs += downlink.c pprz_transport.c
@@ -66,7 +68,7 @@ test_max1168.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIM
test_max1168.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_max1168.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_max1168.srcs += $(SRC_ARCH)/uart_hw.c
+test_max1168.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_max1168.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_max1168.srcs += downlink.c pprz_transport.c
@@ -83,11 +85,11 @@ test_micromag.ARCHDIR = $(ARCH)
test_micromag.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH)
test_micromag.srcs += $(SRC_BOOZ_TEST)/booz2_test_micromag.c
test_micromag.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-test_micromag.CFLAGS += -DLED
+test_micromag.CFLAGS += -DUSE_LED
test_micromag.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_micromag.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_micromag.srcs += $(SRC_ARCH)/uart_hw.c
+test_micromag.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_micromag.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_micromag.srcs += downlink.c pprz_transport.c
@@ -108,12 +110,13 @@ tunnel.ARCHDIR = $(ARCH)
tunnel.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS)
tunnel.srcs += $(SRC_BOOZ_TEST)/booz2_tunnel.c
tunnel.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-tunnel.CFLAGS += -DLED
+tunnel.CFLAGS += -DUSE_LED
tunnel.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
+tunnel.srcs += mcu.c $(SRC_ARCH)/mcu_arch.c
tunnel.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-tunnel.srcs += $(SRC_ARCH)/uart_hw.c
+tunnel.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#
@@ -124,7 +127,7 @@ tunnel_bb.ARCHDIR = $(ARCH)
tunnel_bb.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS)
tunnel_bb.srcs += $(SRC_BOOZ_TEST)/booz2_tunnel_bb.c
tunnel_bb.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-tunnel_bb.CFLAGS += -DLED
+tunnel_bb.CFLAGS += -DUSE_LED
tunnel_bb.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
@@ -137,11 +140,11 @@ test_gps.ARCHDIR = $(ARCH)
test_gps.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH)
test_gps.srcs += $(SRC_BOOZ_TEST)/booz2_test_gps.c
test_gps.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-test_gps.CFLAGS += -DLED
+test_gps.CFLAGS += -DUSE_LED
test_gps.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_gps.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_gps.srcs += $(SRC_ARCH)/uart_hw.c
+test_gps.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_gps.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_gps.srcs += downlink.c pprz_transport.c
@@ -162,11 +165,11 @@ test_modem.ARCHDIR = $(ARCH)
test_modem.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS)
test_modem.srcs += $(SRC_BOOZ_TEST)/booz2_test_modem.c
test_modem.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-test_modem.CFLAGS += -DLED
+test_modem.CFLAGS += -DUSE_LED
test_modem.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_modem.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_modem.srcs += $(SRC_ARCH)/uart_hw.c
+test_modem.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_modem.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_modem.srcs += downlink.c pprz_transport.c
@@ -184,18 +187,18 @@ test_usb.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS)
test_usb.srcs += $(SRC_BOOZ_TEST)/booz2_test_usb.c
test_usb.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
# -DTIME_LED=1
-test_usb.CFLAGS += -DLED
+test_usb.CFLAGS += -DUSE_LED
test_usb.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
#test_usb.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-#test_usb.srcs += $(SRC_ARCH)/uart_hw.c
+#test_usb.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#test_usb.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
#test_usb.srcs += downlink.c pprz_transport.c
test_usb.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_USB_SERIAL
test_usb.CFLAGS += -DDOWNLINK_DEVICE=UsbS -DPPRZ_UART=UsbS -DDATALINK=PPRZ
-test_usb.srcs += downlink.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/usb_ser_hw.c pprz_transport.c
-# datalink.c
+test_usb.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/usb_ser_hw.c pprz_transport.c
+# $(SRC_FIRMWARE)/datalink.c
test_usb.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
test_usb.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
@@ -212,11 +215,11 @@ test_ami.ARCHDIR = $(ARCH)
test_ami.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS)
test_ami.srcs += $(SRC_BOOZ_TEST)/booz2_test_ami.c
test_ami.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./50.))' -DTIME_LED=1
-test_ami.CFLAGS += -DLED
+test_ami.CFLAGS += -DUSE_LED
test_ami.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_ami.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_ami.srcs += $(SRC_ARCH)/uart_hw.c
+test_ami.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_ami.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_ami.srcs += downlink.c pprz_transport.c
@@ -235,11 +238,11 @@ test_crista.ARCHDIR = $(ARCH)
test_crista.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH)
test_crista.srcs += $(SRC_BOOZ_TEST)/booz2_test_crista.c
test_crista.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-test_crista.CFLAGS += -DLED
+test_crista.CFLAGS += -DUSE_LED
test_crista.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_crista.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B57600
-test_crista.srcs += $(SRC_ARCH)/uart_hw.c
+test_crista.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_crista.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
test_crista.srcs += downlink.c pprz_transport.c
@@ -261,11 +264,11 @@ test_micromag2.srcs += $(SRC_BOOZ_TEST)/booz2_test_micromag_2.c
test_micromag2.CFLAGS += -DSSP_VIC_SLOT=9
test_micromag2.CFLAGS += -DMICROMAG_DRDY_VIC_SLOT=8
test_micromag2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./50.))' -DTIME_LED=1
-test_micromag2.CFLAGS += -DLED
+test_micromag2.CFLAGS += -DUSE_LED
test_micromag2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_micromag2.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_micromag2.srcs += $(SRC_ARCH)/uart_hw.c
+test_micromag2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_micromag2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_micromag2.srcs += downlink.c pprz_transport.c
@@ -283,11 +286,11 @@ test_imu_b2.ARCHDIR = $(ARCH)
test_imu_b2.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH)
test_imu_b2.srcs += $(SRC_BOOZ_TEST)/booz2_test_imu_b2.c
test_imu_b2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-test_imu_b2.CFLAGS += -DLED
+test_imu_b2.CFLAGS += -DUSE_LED
test_imu_b2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_imu_b2.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_imu_b2.srcs += $(SRC_ARCH)/uart_hw.c
+test_imu_b2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_imu_b2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_imu_b2.srcs += downlink.c pprz_transport.c
@@ -313,11 +316,11 @@ test_rc_spektrum.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) $(BOOZ_CFLA
test_rc_spektrum.CFLAGS += -DPERIPHERALS_AUTO_INIT
test_rc_spektrum.srcs += $(SRC_BOOZ_TEST)/booz2_test_radio_control.c
test_rc_spektrum.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-test_rc_spektrum.CFLAGS += -DLED
+test_rc_spektrum.CFLAGS += -DUSE_LED
test_rc_spektrum.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
#test_rc_spektrum.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-#test_rc_spektrum.srcs += $(SRC_ARCH)/uart_hw.c
+#test_rc_spektrum.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#test_rc_spektrum.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
#test_rc_spektrum.srcs += downlink.c pprz_transport.c
test_rc_spektrum.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_USB_SERIAL
@@ -333,7 +336,7 @@ test_rc_spektrum.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B115200
test_rc_spektrum.CFLAGS += -DRADIO_CONTROL_LINK=Uart0
test_rc_spektrum.srcs += $(SRC_SUBSYSTEMS)/radio_control.c \
$(SRC_SUBSYSTEMS)/radio_control_spektrum.c \
- $(SRC_ARCH)/uart_hw.c
+ $(SRC_ARCH)/mcu_periph/uart_arch.c
#
# test rc ppm
@@ -345,11 +348,11 @@ test_rc_ppm.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARC
test_rc_ppm.CFLAGS += -DPERIPHERALS_AUTO_INIT
test_rc_ppm.srcs += $(SRC_BOOZ_TEST)/booz2_test_radio_control.c
test_rc_ppm.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-test_rc_ppm.CFLAGS += -DLED
+test_rc_ppm.CFLAGS += -DUSE_LED
test_rc_ppm.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
#test_rc_ppm.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-#test_rc_ppm.srcs += $(SRC_ARCH)/uart_hw.c
+#test_rc_ppm.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#test_rc_ppm.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
#test_rc_ppm.srcs += downlink.c pprz_transport.c
test_rc_ppm.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_USB_SERIAL
@@ -374,11 +377,11 @@ test_mc.ARCHDIR = $(ARCH)
test_mc.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH)
test_mc.srcs += $(SRC_BOOZ_TEST)/booz2_test_mc.c
test_mc.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-test_mc.CFLAGS += -DLED
+test_mc.CFLAGS += -DUSE_LED
test_mc.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_mc.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_mc.srcs += $(SRC_ARCH)/uart_hw.c
+test_mc.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_mc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_mc.srcs += downlink.c pprz_transport.c
@@ -403,7 +406,7 @@ test_buss_bldc.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DT
test_buss_bldc.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_buss_bldc.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_buss_bldc.srcs += $(SRC_ARCH)/uart_hw.c
+test_buss_bldc.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_buss_bldc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_buss_bldc.srcs += downlink.c pprz_transport.c
@@ -421,16 +424,16 @@ test_amc.ARCHDIR = $(ARCH)
test_amc.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH)
test_amc.srcs += $(SRC_BOOZ_TEST)/booz2_test_amc.c
test_amc.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LED=1
-test_amc.CFLAGS += -DLED
+test_amc.CFLAGS += -DUSE_LED
test_amc.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_amc.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_amc.srcs += $(SRC_ARCH)/uart_hw.c
+test_amc.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_amc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_amc.srcs += downlink.c pprz_transport.c
test_amc.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart1
-test_amc.srcs += $(SRC_BOOZ)/booz2_datalink.c
+test_amc.srcs += $(SRC_FIRMWARE)/datalink.c
test_amc.CFLAGS += -DACTUATORS=\"actuators_asctec_twi_blmc_hw.h\"
test_amc.srcs += $(SRC_BOOZ_ARCH)/actuators_asctec_twi_blmc_hw.c actuators.c
@@ -465,12 +468,12 @@ test_baro_24.ARCHDIR = $(ARCH)
test_baro_24.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) $(BOOZ_CFLAGS)
test_baro_24.srcs += $(SRC_BOOZ_TEST)/booz2_test_baro_24.c
test_baro_24.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./5.))' -DTIME_LED=1
-test_baro_24.CFLAGS += -DLED
+test_baro_24.CFLAGS += -DUSE_LED
test_baro_24.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_baro_24.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_baro_24.srcs += $(SRC_ARCH)/uart_hw.c
+test_baro_24.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_baro_24.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_baro_24.srcs += downlink.c pprz_transport.c
diff --git a/conf/autopilot/fixedwing.makefile b/conf/autopilot/fixedwing.makefile
index 0ead7d26d4..d4e98b98c4 100644
--- a/conf/autopilot/fixedwing.makefile
+++ b/conf/autopilot/fixedwing.makefile
@@ -33,27 +33,13 @@ endif
ifeq ($(TARGET),$(ACTUATOR_TARGET))
ifeq ($(ACTUATORS),)
- ifeq ($(BOARD),tiny)
- ifeq ($(BOARD_VERSION),1.1)
- include $(CFG_SHARED)/actuators_4015.makefile
- else
- ifeq ($(BOARD_VERSION),0.99)
- include $(CFG_SHARED)/actuators_4015.makefile
- else
- include $(CFG_SHARED)/actuators_4017.makefile
- endif
- endif
- endif
- ifeq ($(BOARD),twog)
- include $(CFG_SHARED)/actuators_4017.makefile
- endif
ifeq ($(BOARD),lisa_l)
include $(CFG_SHARED)/actuators_direct.makefile
endif
else
- include $(CFG_FIXEDWING)/$(ACTUATORS).makefile
+ include $(CFG_SHARED)/$(ACTUATORS).makefile
endif
endif
diff --git a/conf/autopilot/fixedwing.xml b/conf/autopilot/fixedwing.xml
index 696bce4992..0899eb9b68 100644
--- a/conf/autopilot/fixedwing.xml
+++ b/conf/autopilot/fixedwing.xml
@@ -3,7 +3,7 @@
-
+
@@ -17,26 +17,26 @@
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
diff --git a/conf/autopilot/lisa_l_test_progs.makefile b/conf/autopilot/lisa_l_test_progs.makefile
index ab9527b999..2a04cbbb14 100644
--- a/conf/autopilot/lisa_l_test_progs.makefile
+++ b/conf/autopilot/lisa_l_test_progs.makefile
@@ -53,6 +53,7 @@ SRC_BOARD=boards/$(BOARD)
SRC_FIRMWARE=firmwares/rotorcraft
SRC_SUBSYSTEMS=subsystems
+SRC_AIRBORNE=.
#
# default configuration expected from the board files
@@ -67,7 +68,9 @@ SRC_SUBSYSTEMS=subsystems
test_led.ARCHDIR = $(ARCH)
test_led.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
test_led.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_led.srcs += $(SRC_LISA)/test_led.c \
+test_led.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_LISA)/test_led.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
test_led.CFLAGS += -DUSE_LED
@@ -79,10 +82,12 @@ test_led.srcs += $(SRC_ARCH)/led_hw.c
test_uart.ARCHDIR = $(ARCH)
test_uart.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
test_uart.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_uart.srcs = $(SRC_LISA)/test_uart.c \
+test_uart.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_LISA)/test_uart.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
-test_uart.CFLAGS += -DUSE_LED
+test_uart.CFLAGS += -DUSE_LED -DUSE_UART
test_uart.srcs += $(SRC_ARCH)/led_hw.c
test_uart.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED)
test_uart.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
@@ -90,7 +95,7 @@ test_uart.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_uart.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
test_uart.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
test_uart.CFLAGS += -DUSE_UART3 -DUART3_BAUD=B57600
-test_uart.srcs += $(SRC_ARCH)/uart_hw.c
+test_uart.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
@@ -104,7 +109,9 @@ test_servos.ARCHDIR = $(ARCH)
test_servos.CFLAGS = -I$(SRC_FIRMWARE)/actuators/arch/$(ARCH) -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
test_servos.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
test_servos.LDFLAGS += -lm
-test_servos.srcs += $(SRC_LISA)/test_servos.c \
+test_servos.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_LISA)/test_servos.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
test_servos.CFLAGS += -DUSE_LED
@@ -126,9 +133,11 @@ test_servos.srcs += $(SRC_FIRMWARE)/actuators/actuators_pwm.c $(SRC_FIRMWARE)/ac
test_telemetry.ARCHDIR = $(ARCH)
test_telemetry.CFLAGS += -I$(SRC_LISA) -I$(SRC_ARCH) -DPERIPHERALS_AUTO_INIT
test_telemetry.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_telemetry.srcs = test/test_telemetry.c \
- $(SRC_ARCH)/stm32_exceptions.c \
- $(SRC_ARCH)/stm32_vector_table.c
+test_telemetry.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ test/test_telemetry.c \
+ $(SRC_ARCH)/stm32_exceptions.c \
+ $(SRC_ARCH)/stm32_vector_table.c
test_telemetry.CFLAGS += -DUSE_LED
test_telemetry.srcs += $(SRC_ARCH)/led_hw.c
test_telemetry.CFLAGS += -DUSE_SYS_TIME
@@ -139,7 +148,7 @@ test_telemetry.CFLAGS += -DUSE_$(MODEM_PORT)
test_telemetry.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
test_telemetry.srcs += downlink.c pprz_transport.c
test_telemetry.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
-test_telemetry.srcs += $(SRC_ARCH)/uart_hw.c
+test_telemetry.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#
@@ -153,7 +162,9 @@ test_telemetry.srcs += $(SRC_ARCH)/uart_hw.c
test_baro.ARCHDIR = $(ARCH)
test_baro.CFLAGS = -I$(SRC_LISA) -I$(SRC_ARCH) -I$(SRC_BOARD) -DPERIPHERALS_AUTO_INIT
test_baro.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_baro.srcs = $(SRC_BOARD)/test_baro.c \
+test_baro.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_BOARD)/test_baro.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
test_baro.CFLAGS += -DUSE_LED
@@ -165,10 +176,10 @@ test_baro.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_baro.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_baro.srcs += downlink.c pprz_transport.c
test_baro.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_baro.srcs += $(SRC_ARCH)/uart_hw.c
+test_baro.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_baro.srcs += $(SRC_BOARD)/baro_board.c
test_baro.CFLAGS += -DUSE_I2C2
-test_baro.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_baro.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
#
@@ -185,7 +196,9 @@ test_rc_spektrum.ARCHDIR = $(ARCH)
test_rc_spektrum.CFLAGS += -I$(SRC_ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
test_rc_spektrum.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_rc_spektrum.srcs += $(SRC_BOOZ_TEST)/booz2_test_radio_control.c \
+test_rc_spektrum.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_BOOZ_TEST)/booz2_test_radio_control.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -196,7 +209,7 @@ test_rc_spektrum.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_rc_spektrum.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED)
test_rc_spektrum.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_rc_spektrum.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_rc_spektrum.srcs += $(SRC_ARCH)/uart_hw.c
+test_rc_spektrum.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_rc_spektrum.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_rc_spektrum.srcs += downlink.c pprz_transport.c
test_rc_spektrum.CFLAGS += -DRADIO_CONTROL
@@ -226,7 +239,9 @@ test_rc_ppm.ARCHDIR = $(ARCH)
test_rc_ppm.CFLAGS += -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -I$(SRC_BOARD)
test_rc_ppm.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
test_rc_ppm.CFLAGS += -DPERIPHERALS_AUTO_INIT
-test_rc_ppm.srcs += $(SRC_BOOZ)/test/booz2_test_radio_control.c \
+test_rc_ppm.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_BOOZ)/test/booz2_test_radio_control.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -237,7 +252,7 @@ test_rc_ppm.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_rc_ppm.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED)
test_rc_ppm.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_rc_ppm.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_rc_ppm.srcs += $(SRC_ARCH)/uart_hw.c
+test_rc_ppm.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_rc_ppm.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_rc_ppm.srcs += downlink.c pprz_transport.c
test_rc_ppm.CFLAGS += -DRADIO_CONTROL
@@ -261,7 +276,9 @@ test_adc.ARCHDIR = $(ARCH)
test_adc.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
test_adc.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_adc.srcs = $(SRC_LISA)/test_adc.c \
+test_adc.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_LISA)/test_adc.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -274,15 +291,14 @@ test_adc.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_adc.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_adc.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_adc.srcs += $(SRC_ARCH)/uart_hw.c
+test_adc.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_adc.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=$(MODEM_PORT)
test_adc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_adc.srcs += downlink.c pprz_transport.c
test_adc.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
-test_adc.CFLAGS += -DUSE_AD1 -DUSE_AD1_1
-# -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
+test_adc.CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
test_adc.CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
#
@@ -296,7 +312,9 @@ test_adc.CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
test_imu_b2.ARCHDIR = $(ARCH)
test_imu_b2.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
test_imu_b2.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_imu_b2.srcs += $(SRC_BOOZ_TEST)/booz_test_imu.c \
+test_imu_b2.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_BOOZ_TEST)/booz_test_imu.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -309,7 +327,7 @@ test_imu_b2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_imu_b2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_imu_b2.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_imu_b2.srcs += $(SRC_ARCH)/uart_hw.c
+test_imu_b2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_imu_b2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_imu_b2.srcs += downlink.c pprz_transport.c
@@ -317,14 +335,14 @@ test_imu_b2.srcs += downlink.c pprz_transport.c
test_imu_b2.srcs += math/pprz_trig_int.c
test_imu_b2.CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_b2.h\"
-test_imu_b2.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001 -DIMU_B2_VERSION_1_1
+test_imu_b2.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2100 -DIMU_B2_VERSION_1_1
test_imu_b2.srcs += $(SRC_SUBSYSTEMS)/imu.c
test_imu_b2.CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT)
test_imu_b2.CFLAGS += -DMAX_1168_DRDY_PORT_SOURCE=$(MAX_1168_DRDY_PORT_SOURCE)
test_imu_b2.CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
test_imu_b2.srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c $(SRC_ARCH)/subsystems/imu/imu_b2_arch.c
test_imu_b2.srcs += peripherals/max1168.c $(SRC_ARCH)/peripherals/max1168_arch.c
-test_imu_b2.srcs += peripherals/ms2001.c $(SRC_ARCH)/peripherals/ms2001_arch.c
+test_imu_b2.srcs += peripherals/ms2100.c $(SRC_ARCH)/peripherals/ms2100_arch.c
#
# test IMU b2 1.2
@@ -337,7 +355,9 @@ test_imu_b2.srcs += peripherals/ms2001.c $(SRC_ARCH)/peripherals/ms2001_arch.c
test_imu_b2_2.ARCHDIR = $(ARCH)
test_imu_b2_2.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
test_imu_b2_2.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_imu_b2_2.srcs += $(SRC_BOOZ_TEST)/booz_test_imu.c \
+test_imu_b2_2.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_BOOZ_TEST)/booz_test_imu.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -350,7 +370,7 @@ test_imu_b2_2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_imu_b2_2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_imu_b2_2.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_imu_b2_2.srcs += $(SRC_ARCH)/uart_hw.c
+test_imu_b2_2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_imu_b2_2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_imu_b2_2.srcs += downlink.c pprz_transport.c
@@ -366,8 +386,8 @@ test_imu_b2_2.CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_
test_imu_b2_2.srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c $(SRC_ARCH)/subsystems/imu/imu_b2_arch.c
test_imu_b2_2.srcs += peripherals/max1168.c $(SRC_ARCH)/peripherals/max1168_arch.c
test_imu_b2_2.CFLAGS += -DUSE_I2C2
-test_imu_b2_2.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
-test_imu_b2_2.srcs += peripherals/hmc5843.c $(SRC_BOOZ_ARCH)/peripherals/hmc5843_arch.c
+test_imu_b2_2.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
+test_imu_b2_2.srcs += peripherals/hmc5843.c $(SRC_ARCH)/peripherals/hmc5843_arch.c
test_imu_b2_2.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
@@ -377,7 +397,9 @@ test_imu_b2_2.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
test_imu_aspirin.ARCHDIR = $(ARCH)
test_imu_aspirin.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
test_imu_aspirin.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_imu_aspirin.srcs += $(SRC_BOOZ_TEST)/booz_test_imu.c \
+test_imu_aspirin.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_BOOZ_TEST)/booz_test_imu.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -389,7 +411,7 @@ test_imu_aspirin.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_imu_aspirin.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_imu_aspirin.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_imu_aspirin.srcs += $(SRC_ARCH)/uart_hw.c
+test_imu_aspirin.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_imu_aspirin.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_imu_aspirin.srcs += downlink.c pprz_transport.c
@@ -400,9 +422,10 @@ test_imu_aspirin.CFLAGS += -DIMU_TYPE_H=\"imu/imu_aspirin.h\" -DIMU_OVERRIDE_CHA
test_imu_aspirin.srcs += $(SRC_SUBSYSTEMS)/imu.c \
$(SRC_SUBSYSTEMS)/imu/imu_aspirin.c \
$(SRC_ARCH)/subsystems/imu/imu_aspirin_arch.c
+test_imu_aspirin.srcs += peripherals/hmc5843.c $(SRC_ARCH)/peripherals/hmc5843_arch.c
test_imu_aspirin.CFLAGS += -DUSE_I2C2
-test_imu_aspirin.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_imu_aspirin.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
test_imu_aspirin.CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14
test_imu_aspirin.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
test_imu_aspirin.CFLAGS += -DUSE_EXTI2_IRQ # Accel Int on PD2
@@ -422,7 +445,9 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA
test_hmc5843.ARCHDIR = $(ARCH)
test_hmc5843.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -Ibooz -DPERIPHERALS_AUTO_INIT
test_hmc5843.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_hmc5843.srcs = lisa/test/lisa_test_hmc5843.c \
+test_hmc5843.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ lisa/test/lisa_test_hmc5843.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
test_hmc5843.CFLAGS += -DUSE_LED
@@ -432,13 +457,13 @@ test_hmc5843.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_hmc5843.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_hmc5843.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_hmc5843.srcs += $(SRC_ARCH)/uart_hw.c
+test_hmc5843.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_hmc5843.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_hmc5843.srcs += downlink.c pprz_transport.c
test_hmc5843.CFLAGS += -DUSE_I2C2
-test_hmc5843.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_hmc5843.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
test_hmc5843.CFLAGS += -DIMU_OVERRIDE_CHANNELS
test_hmc5843.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
@@ -449,7 +474,9 @@ test_hmc5843.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
test_itg3200.ARCHDIR = $(ARCH)
test_itg3200.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
test_itg3200.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_itg3200.srcs += lisa/test/lisa_test_itg3200.c \
+test_itg3200.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ lisa/test/lisa_test_itg3200.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -461,13 +488,13 @@ test_itg3200.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_itg3200.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_itg3200.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_itg3200.srcs += $(SRC_ARCH)/uart_hw.c
+test_itg3200.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_itg3200.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_itg3200.srcs += downlink.c pprz_transport.c
test_itg3200.CFLAGS += -DUSE_I2C2
-test_itg3200.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_itg3200.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
test_itg3200.CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14
@@ -477,7 +504,9 @@ test_itg3200.CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14
test_adxl345.ARCHDIR = $(ARCH)
test_adxl345.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
test_adxl345.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_adxl345.srcs += lisa/test/lisa_test_adxl345_dma.c \
+test_adxl345.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ lisa/test/lisa_test_adxl345_dma.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -489,7 +518,7 @@ test_adxl345.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_adxl345.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_adxl345.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_adxl345.srcs += $(SRC_ARCH)/uart_hw.c
+test_adxl345.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_adxl345.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_adxl345.srcs += downlink.c pprz_transport.c
@@ -505,7 +534,9 @@ test_adxl345.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA
test_esc_mkk_simple.ARCHDIR = $(ARCH)
test_esc_mkk_simple.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
test_esc_mkk_simple.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_esc_mkk_simple.srcs = test/test_esc_mkk_simple.c \
+test_esc_mkk_simple.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ test/test_esc_mkk_simple.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
test_esc_mkk_simple.CFLAGS += -DUSE_LED
@@ -514,7 +545,7 @@ test_esc_mkk_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED)
test_esc_mkk_simple.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_esc_mkk_simple.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_esc_mkk_simple.CFLAGS += -DUSE_I2C2
-test_esc_mkk_simple.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_esc_mkk_simple.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
test_esc_mkk_simple.CFLAGS += -DACTUATORS_MKK_DEV=i2c2
@@ -524,7 +555,9 @@ test_esc_mkk_simple.CFLAGS += -DACTUATORS_MKK_DEV=i2c2
test_esc_asctecv1_simple.ARCHDIR = $(ARCH)
test_esc_asctecv1_simple.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
test_esc_asctecv1_simple.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_esc_asctecv1_simple.srcs = test/test_esc_asctecv1_simple.c \
+test_esc_asctecv1_simple.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ test/test_esc_asctecv1_simple.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
test_esc_asctecv1_simple.CFLAGS += -DUSE_LED
@@ -533,7 +566,7 @@ test_esc_asctecv1_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
test_esc_asctecv1_simple.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_esc_asctecv1_simple.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_esc_asctecv1_simple.CFLAGS += -DUSE_I2C1
-test_esc_asctecv1_simple.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_esc_asctecv1_simple.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
#
@@ -542,7 +575,9 @@ test_esc_asctecv1_simple.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
test_actuators_mkk.ARCHDIR = $(ARCH)
test_actuators_mkk.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -DPERIPHERALS_AUTO_INIT
test_actuators_mkk.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_actuators_mkk.srcs = test/test_actuators.c \
+test_actuators_mkk.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ test/test_actuators.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -554,7 +589,7 @@ test_actuators_mkk.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_actuators_mkk.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_actuators_mkk.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_actuators_mkk.srcs += $(SRC_ARCH)/uart_hw.c
+test_actuators_mkk.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_actuators_mkk.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_actuators_mkk.srcs += downlink.c pprz_transport.c
@@ -564,7 +599,7 @@ test_actuators_mkk.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
test_actuators_mkk.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c1
test_actuators_mkk.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
test_actuators_mkk.CFLAGS += -DUSE_I2C1
-test_actuators_mkk.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_actuators_mkk.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
#
# test actuators asctecv1
@@ -572,7 +607,9 @@ test_actuators_mkk.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
test_actuators_asctecv1.ARCHDIR = $(ARCH)
test_actuators_asctecv1.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -DPERIPHERALS_AUTO_INIT
test_actuators_asctecv1.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_actuators_asctecv1.srcs = test/test_actuators.c \
+test_actuators_asctecv1.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ test/test_actuators.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
@@ -584,7 +621,7 @@ test_actuators_asctecv1.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512
test_actuators_asctecv1.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_actuators_asctecv1.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_actuators_asctecv1.srcs += $(SRC_ARCH)/uart_hw.c
+test_actuators_asctecv1.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_actuators_asctecv1.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_actuators_asctecv1.srcs += downlink.c pprz_transport.c
@@ -593,7 +630,7 @@ test_actuators_asctecv1.srcs += $(SRC_BOOZ)/booz2_commands.c
test_actuators_asctecv1.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
test_actuators_asctecv1.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
test_actuators_asctecv1.CFLAGS += -DUSE_I2C1
-test_actuators_asctecv1.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_actuators_asctecv1.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
#
@@ -602,7 +639,9 @@ test_actuators_asctecv1.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
test_bmp085.ARCHDIR = $(ARCH)
test_bmp085.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
test_bmp085.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_bmp085.srcs = lisa/test/lisa_test_bmp085.c \
+test_bmp085.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ lisa/test/lisa_test_bmp085.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
test_bmp085.CFLAGS += -DUSE_LED
@@ -612,13 +651,13 @@ test_bmp085.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_bmp085.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_bmp085.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_bmp085.srcs += $(SRC_ARCH)/uart_hw.c
+test_bmp085.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_bmp085.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_bmp085.srcs += downlink.c pprz_transport.c
test_bmp085.CFLAGS += -DUSE_I2C2
-test_bmp085.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_bmp085.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
#test_bmp085.CFLAGS += -DIMU_OVERRIDE_CHANNELS
#test_bmp085.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
@@ -630,7 +669,9 @@ test_bmp085.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
test_manual.ARCHDIR = $(ARCH)
test_manual.CFLAGS = -I$(SRC_FIRMWARE) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
test_manual.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_manual.srcs = test/test_manual.c \
+test_manual.srcs = $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ test/test_manual.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
test_manual.CFLAGS += -DUSE_LED
@@ -640,7 +681,7 @@ test_manual.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_manual.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_manual.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_manual.srcs += $(SRC_ARCH)/uart_hw.c
+test_manual.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_manual.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_manual.srcs += downlink.c pprz_transport.c
@@ -674,7 +715,9 @@ test_manual.srcs += $(SRC_SUBSYSTEMS)/radio_control.c
tunnel.ARCHDIR = $(ARCH)
tunnel.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
tunnel.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-tunnel.srcs += $(SRC_LISA)/tunnel_hw.c \
+tunnel.srcs += $(SRC_AIRBORNE)/mcu.c \
+ $(SRC_ARCH)/mcu_arch.c \
+ $(SRC_LISA)/tunnel_hw.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
tunnel.CFLAGS += -DUSE_LED
diff --git a/conf/autopilot/lisa_passthrough.makefile b/conf/autopilot/lisa_passthrough.makefile
index 2241a70455..a61cf4bfe1 100644
--- a/conf/autopilot/lisa_passthrough.makefile
+++ b/conf/autopilot/lisa_passthrough.makefile
@@ -42,7 +42,7 @@ stm_passthrough.CFLAGS += -DDOWNLINK
stm_passthrough.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
stm_passthrough.srcs += downlink.c pprz_transport.c
stm_passthrough.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-stm_passthrough.srcs += $(SRC_ARCH)/uart_hw.c
+stm_passthrough.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
# Link Overo
stm_passthrough.CFLAGS += -DUSE_OVERO_LINK
@@ -75,7 +75,7 @@ stm_passthrough.srcs += $(SRC_BOOZ)/booz2_commands.c
#stm_passthrough.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
#stm_passthrough.CFLAGS += -DACTUATORS_ASCTEC_V2_PROTOCOL
#stm_passthrough.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
-#stm_passthrough.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+#stm_passthrough.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
#
#stm_passthrough.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
#stm_passthrough.CFLAGS += -DUSE_I2C1
@@ -91,7 +91,7 @@ stm_passthrough.srcs += $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arc
# Baro
stm_passthrough.srcs += $(SRC_BOARD)/baro_board.c
stm_passthrough.CFLAGS += -DUSE_I2C2
-stm_passthrough.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+stm_passthrough.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
# Vanes
stm_passthrough.CFLAGS += -I $(SRC_CSC)
diff --git a/conf/autopilot/obsolete/booz_test_progs.makefile b/conf/autopilot/obsolete/booz_test_progs.makefile
index 1374184582..00fa88a447 100644
--- a/conf/autopilot/obsolete/booz_test_progs.makefile
+++ b/conf/autopilot/obsolete/booz_test_progs.makefile
@@ -77,7 +77,7 @@ test_telemetry.CFLAGS += -DUSE_$(MODEM_PORT)
test_telemetry.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
test_telemetry.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_telemetry.srcs += downlink.c pprz_transport.c
-test_telemetry.srcs += $(SRC_ARCH)/uart_hw.c
+test_telemetry.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#
@@ -102,7 +102,7 @@ test_baro.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_baro.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_baro.srcs += downlink.c pprz_transport.c
test_baro.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_baro.srcs += $(SRC_ARCH)/uart_hw.c
+test_baro.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_baro.srcs += $(SRC_BOARD)/baro_board.c
test_baro.CFLAGS += -DBOOZ2_ANALOG_BARO_PERIOD='SYS_TICS_OF_SEC((1./100.))'
test_baro.CFLAGS += -DADC0_VIC_SLOT=2
@@ -146,7 +146,7 @@ test_rc_ppm.CFLAGS += -DTIME_LED=$(SYS_TIME_LED)
test_rc_ppm.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
test_rc_ppm.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_rc_ppm.srcs += $(SRC_ARCH)/uart_hw.c
+test_rc_ppm.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_rc_ppm.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_rc_ppm.srcs += downlink.c pprz_transport.c
test_rc_ppm.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
@@ -192,7 +192,7 @@ test_actuators_mkk.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_actuators_mkk.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_actuators_mkk.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_actuators_mkk.srcs += $(SRC_ARCH)/uart_hw.c
+test_actuators_mkk.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_actuators_mkk.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_actuators_mkk.srcs += downlink.c pprz_transport.c
@@ -223,7 +223,7 @@ test_ami601.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_ami601.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_ami601.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-test_ami601.srcs += $(SRC_ARCH)/uart_hw.c
+test_ami601.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_ami601.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
test_ami601.srcs += downlink.c pprz_transport.c
diff --git a/conf/autopilot/conf_dc_mc.h b/conf/autopilot/obsolete/conf_dc_mc.h
similarity index 100%
rename from conf/autopilot/conf_dc_mc.h
rename to conf/autopilot/obsolete/conf_dc_mc.h
diff --git a/conf/autopilot/conf_wt.h b/conf/autopilot/obsolete/conf_wt.h
similarity index 100%
rename from conf/autopilot/conf_wt.h
rename to conf/autopilot/obsolete/conf_wt.h
diff --git a/conf/autopilot/csc.makefile b/conf/autopilot/obsolete/csc.makefile
similarity index 94%
rename from conf/autopilot/csc.makefile
rename to conf/autopilot/obsolete/csc.makefile
index 2f83265bca..f30151ea99 100644
--- a/conf/autopilot/csc.makefile
+++ b/conf/autopilot/obsolete/csc.makefile
@@ -46,14 +46,14 @@ ap.ARCHDIR = $(ARCHI)
ap.CFLAGS += -I$(SRC_CSC)
ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
ap.srcs += $(SRC_CSC)/csc_main.c
-ap.CFLAGS += -DLED -DTIME_LED=1
+ap.CFLAGS += -DUSE_LED -DTIME_LED=1
ap.CFLAGS += -DCSC_BOARD_ID=$(CSC_ID)
ap.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIMER0_VIC_SLOT=1
ap.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-ap.srcs += $(SRC_ARCH)/uart_hw.c
+ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
ap.srcs += $(SRC_ARCH)/adc_hw.c
ap.CFLAGS += -DADC -DUSE_AD0 -DUSE_AD0_0 -DUSE_AD0_1
@@ -99,13 +99,13 @@ test_uart.ARCHDIR = $(ARCHI)
test_uart.CFLAGS += -I$(SRC_CSC)
test_uart.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
test_uart.srcs += $(SRC_CSC)/csc_test_uart.c
-test_uart.CFLAGS += -DLED
+test_uart.CFLAGS += -DUSE_LED
# -DTIME_LED=1
test_uart.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIMER0_VIC_SLOT=1
test_uart.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-test_uart.srcs += $(SRC_ARCH)/uart_hw.c
+test_uart.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_uart.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUART1_VIC_SLOT=6
test_uart.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport \
@@ -123,7 +123,7 @@ test_can1.ARCHDIR = $(ARCHI)
test_can1.CFLAGS += -I$(SRC_CSC)
test_can1.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
test_can1.srcs += $(SRC_CSC)/test_can1.c
-test_can1.CFLAGS += -DLED
+test_can1.CFLAGS += -DUSE_LED
# -DTIME_LED=1
test_can1.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIMER0_VIC_SLOT=1
diff --git a/conf/autopilot/csc_ap.makefile b/conf/autopilot/obsolete/csc_ap.makefile
similarity index 95%
rename from conf/autopilot/csc_ap.makefile
rename to conf/autopilot/obsolete/csc_ap.makefile
index ee88e9d2c1..d1d6b55322 100644
--- a/conf/autopilot/csc_ap.makefile
+++ b/conf/autopilot/obsolete/csc_ap.makefile
@@ -46,14 +46,14 @@ ap.ARCHDIR = $(ARCHI)
ap.CFLAGS += -I$(SRC_CSC)
ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
ap.srcs += $(SRC_CSC)/csc_ap_main.c
-ap.CFLAGS += -DLED -DTIME_LED=1
+ap.CFLAGS += -DUSE_LED -DTIME_LED=1
ap.CFLAGS += -DCSC_BOARD_ID=$(CSC_ID)
ap.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./40.))' -DTIMER0_VIC_SLOT=1
ap.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-ap.srcs += $(SRC_ARCH)/uart_hw.c
+ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
ap.srcs += $(SRC_ARCH)/adc_hw.c
ap.CFLAGS += -DADC -DUSE_AD0 -DUSE_AD0_0 -DUSE_AD0_1
@@ -102,13 +102,13 @@ test_uart.ARCHDIR = $(ARCHI)
test_uart.CFLAGS += -I$(SRC_CSC)
test_uart.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
test_uart.srcs += $(SRC_CSC)/csc_test_uart.c
-test_uart.CFLAGS += -DLED
+test_uart.CFLAGS += -DUSE_LED
# -DTIME_LED=1
test_uart.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIMER0_VIC_SLOT=1
test_uart.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-test_uart.srcs += $(SRC_ARCH)/uart_hw.c
+test_uart.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_uart.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUART1_VIC_SLOT=6
test_uart.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport \
diff --git a/conf/autopilot/csc_baro.makefile b/conf/autopilot/obsolete/csc_baro.makefile
similarity index 100%
rename from conf/autopilot/csc_baro.makefile
rename to conf/autopilot/obsolete/csc_baro.makefile
diff --git a/conf/autopilot/csc_board_v1_0.h b/conf/autopilot/obsolete/csc_board_v1_0.h
similarity index 100%
rename from conf/autopilot/csc_board_v1_0.h
rename to conf/autopilot/obsolete/csc_board_v1_0.h
diff --git a/conf/autopilot/obsolete/lisa_test_progs.makefile b/conf/autopilot/obsolete/lisa_test_progs.makefile
index 24bf199dbf..1a48c121c4 100644
--- a/conf/autopilot/obsolete/lisa_test_progs.makefile
+++ b/conf/autopilot/obsolete/lisa_test_progs.makefile
@@ -186,7 +186,7 @@ test_uart.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
test_uart.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_uart.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_uart.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_uart.srcs += $(SRC_ARCH)/uart_hw.c
+test_uart.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
@@ -205,7 +205,7 @@ test_telemetry1.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
test_telemetry1.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_telemetry1.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_telemetry1.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_telemetry1.srcs += $(SRC_ARCH)/uart_hw.c
+test_telemetry1.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_telemetry1.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_telemetry1.srcs += downlink.c pprz_transport.c
@@ -225,7 +225,7 @@ test_telemetry2.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
test_telemetry2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_telemetry2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_telemetry2.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_telemetry2.srcs += $(SRC_ARCH)/uart_hw.c
+test_telemetry2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_telemetry2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_telemetry2.srcs += downlink.c pprz_transport.c
@@ -245,7 +245,7 @@ test_telemetry3.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
test_telemetry3.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_telemetry3.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_telemetry3.CFLAGS += -DUSE_UART3 -DUART3_BAUD=B57600
-test_telemetry3.srcs += $(SRC_ARCH)/uart_hw.c
+test_telemetry3.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_telemetry3.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart3
test_telemetry3.srcs += downlink.c pprz_transport.c
@@ -264,11 +264,11 @@ test_datalink.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
test_datalink.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_datalink.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_datalink.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_datalink.srcs += $(SRC_ARCH)/uart_hw.c
+test_datalink.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_datalink.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_datalink.srcs += downlink.c pprz_transport.c
test_datalink.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart2
-#test_datalink.srcs += $(SRC_BOOZ)/booz2_datalink.c
+#test_datalink.srcs += $(SRC_FIRMWARE)/datalink.c
#
# tunnel
@@ -296,7 +296,7 @@ tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B115200
#tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B115200
-tunnel.srcs += $(SRC_ARCH)/uart_hw.c
+tunnel.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
@@ -315,7 +315,7 @@ test_float.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
test_float.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_float.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_float.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_float.srcs += $(SRC_ARCH)/uart_hw.c
+test_float.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_float.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_float.srcs += downlink.c pprz_transport.c
test_float.srcs += lisa/plug_sys.c
@@ -352,7 +352,7 @@ test_rc_24.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_rc_24.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_rc_24.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_rc_24.srcs += $(SRC_ARCH)/uart_hw.c
+test_rc_24.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_rc_24.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_rc_24.srcs += downlink.c pprz_transport.c
@@ -363,7 +363,7 @@ test_rc_24.CFLAGS += -DUSE_UART3 -DUART3_BAUD=B115200
test_rc_24.CFLAGS += -DRADIO_CONTROL_LINK=Uart3
test_rc_24.srcs += $(SRC_SUBSYSTEMS)/radio_control.c \
$(SRC_BOOZ)/subsystems/radio_control/spektrum.c
-# $(SRC_ARCH)/uart_hw.c
+# $(SRC_ARCH)/mcu_periph/uart_arch.c
#
@@ -389,7 +389,7 @@ test_servos.srcs += $(SRC_FIRMWARE)/actuators/actuators_pwm.c $(SRC_FIRMWARE)/ac
#test_servos.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-#test_servos.srcs += $(SRC_ARCH)/uart_hw.c
+#test_servos.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#test_servos.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
#test_servos.srcs += downlink.c pprz_transport.c
@@ -416,7 +416,7 @@ test_imu_b2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_imu_b2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_imu_b2.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_imu_b2.srcs += $(SRC_ARCH)/uart_hw.c
+test_imu_b2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_imu_b2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_imu_b2.srcs += downlink.c pprz_transport.c
@@ -424,12 +424,12 @@ test_imu_b2.srcs += downlink.c pprz_transport.c
test_imu_b2.srcs += math/pprz_trig_int.c
test_imu_b2.CFLAGS += -DIMU_TYPE_H=\"imu/imu_b2.h\"
-test_imu_b2.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
+test_imu_b2.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2100
test_imu_b2.srcs += $(SRC_SUBSYSTEMS)/imu.c
test_imu_b2.CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
test_imu_b2.srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c $(SRC_SUBSYSTEMS)/imu/arch/$(ARCH)/imu_b2_arch.c
test_imu_b2.srcs += peripherals/max1168.c $(SRC_ARCH)/peripherals/max1168_arch.c
-test_imu_b2.srcs += peripherals/ms2001.c $(SRC_ARCH)/peripherals/ms2001_arch.c
+test_imu_b2.srcs += peripherals/ms2100.c $(SRC_ARCH)/peripherals/ms2100_arch.c
#
@@ -450,7 +450,7 @@ test_imu_crista.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_imu_crista.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_imu_crista.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_imu_crista.srcs += $(SRC_ARCH)/uart_hw.c
+test_imu_crista.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_imu_crista.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_imu_crista.srcs += downlink.c pprz_transport.c
@@ -482,7 +482,7 @@ test_imu_aspirin.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_imu_aspirin.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_imu_aspirin.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_imu_aspirin.srcs += $(SRC_ARCH)/uart_hw.c
+test_imu_aspirin.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_imu_aspirin.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_imu_aspirin.srcs += downlink.c pprz_transport.c
@@ -558,7 +558,7 @@ test_mc_asctec_v1_simple.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_mc_asctec_v1_simple.CFLAGS += -DUSE_I2C1
test_mc_asctec_v1_simple.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
test_mc_asctec_v1_simple.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_mc_asctec_v1_simple.srcs += $(SRC_ARCH)/uart_hw.c
+test_mc_asctec_v1_simple.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_mc_asctec_v1_simple.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_mc_asctec_v1_simple.srcs += downlink.c pprz_transport.c
@@ -602,7 +602,7 @@ test_actuators_mkk.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_actuators_mkk.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_actuators_mkk.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_actuators_mkk.srcs += $(SRC_ARCH)/uart_hw.c
+test_actuators_mkk.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_actuators_mkk.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_actuators_mkk.srcs += downlink.c pprz_transport.c
@@ -635,7 +635,7 @@ test_actuators_asctec.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)
test_actuators_asctec.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_actuators_asctec.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_actuators_asctec.srcs += $(SRC_ARCH)/uart_hw.c
+test_actuators_asctec.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_actuators_asctec.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_actuators_asctec.srcs += downlink.c pprz_transport.c
@@ -686,7 +686,7 @@ test_baro.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_baro.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_baro.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_baro.srcs += $(SRC_ARCH)/uart_hw.c
+test_baro.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_baro.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_baro.srcs += downlink.c pprz_transport.c
@@ -708,7 +708,7 @@ test_baro2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_baro2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_baro2.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_baro2.srcs += $(SRC_ARCH)/uart_hw.c
+test_baro2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_baro2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_baro2.srcs += downlink.c pprz_transport.c
@@ -734,7 +734,7 @@ test_baro3.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_baro3.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_baro3.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_baro3.srcs += $(SRC_ARCH)/uart_hw.c
+test_baro3.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_baro3.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_baro3.srcs += downlink.c pprz_transport.c
@@ -760,7 +760,7 @@ test_spi_slave.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_spi_slave.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_spi_slave.CFLAGS += -DUSE_SPI1_IRQ
test_spi_slave.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_spi_slave.srcs += $(SRC_ARCH)/uart_hw.c
+test_spi_slave.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_spi_slave.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_spi_slave.srcs += downlink.c pprz_transport.c
@@ -780,7 +780,7 @@ test_spi_slave2.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
test_spi_slave2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_spi_slave2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_spi_slave2.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_spi_slave2.srcs += $(SRC_ARCH)/uart_hw.c
+test_spi_slave2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_spi_slave2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_spi_slave2.srcs += downlink.c pprz_transport.c
@@ -804,7 +804,7 @@ stm_test_spi_link.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
stm_test_spi_link.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
stm_test_spi_link.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-stm_test_spi_link.srcs += $(SRC_ARCH)/uart_hw.c
+stm_test_spi_link.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
stm_test_spi_link.CFLAGS += -DUSE_OVERO_LINK -DOVERO_LINK_MSG_UP=AutopilotMessageFoo -DOVERO_LINK_MSG_DOWN=AutopilotMessageFoo
stm_test_spi_link.CFLAGS += -DOVERO_LINK_LED_OK=3 -DOVERO_LINK_LED_KO=2 -DUSE_DMA1_C2_IRQ
@@ -844,7 +844,7 @@ test_sc18is600.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./128.))'
test_sc18is600.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_sc18is600.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_sc18is600.srcs += $(SRC_ARCH)/uart_hw.c
+test_sc18is600.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_sc18is600.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_sc18is600.srcs += downlink.c pprz_transport.c
@@ -878,39 +878,39 @@ test_max1168.srcs += peripherals/max1168.c \
$(SRC_ARCH)/peripherals/max1168_arch.c
test_max1168.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_max1168.srcs += $(SRC_ARCH)/uart_hw.c
+test_max1168.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_max1168.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_max1168.srcs += downlink.c pprz_transport.c
#
-# test ms2001
+# test ms2100
#
-test_ms2001.ARCHDIR = $(ARCH)
-test_ms2001.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
-test_ms2001.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_ms2001.srcs = $(SRC_LISA)/test/lisa_test_ms2001.c \
+test_ms2100.ARCHDIR = $(ARCH)
+test_ms2100.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
+test_ms2100.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
+test_ms2100.srcs = $(SRC_LISA)/test/lisa_test_ms2100.c \
$(SRC_ARCH)/stm32_exceptions.c \
$(SRC_ARCH)/stm32_vector_table.c
-test_ms2001.CFLAGS += -DUSE_LED
-test_ms2001.srcs += $(SRC_ARCH)/led_hw.c
+test_ms2100.CFLAGS += -DUSE_LED
+test_ms2100.srcs += $(SRC_ARCH)/led_hw.c
-test_ms2001.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
-test_ms2001.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
-test_ms2001.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
+test_ms2100.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
+test_ms2100.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
+test_ms2100.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-test_ms2001.CFLAGS += -DUSE_SPI2
-test_ms2001.CFLAGS += -DUSE_DMA1_C4_IRQ -DMS2001_HANDLES_DMA_IRQ
-test_ms2001.CFLAGS += -DUSE_SPI2_IRQ -DMS2001_HANDLES_SPI_IRQ
-test_ms2001.srcs += peripherals/ms2001.c \
- $(SRC_ARCH)/peripherals/ms2001_arch.c
+test_ms2100.CFLAGS += -DUSE_SPI2
+test_ms2100.CFLAGS += -DUSE_DMA1_C4_IRQ -DMS2100_HANDLES_DMA_IRQ
+test_ms2100.CFLAGS += -DUSE_SPI2_IRQ -DMS2100_HANDLES_SPI_IRQ
+test_ms2100.srcs += peripherals/ms2100.c \
+ $(SRC_ARCH)/peripherals/ms2100_arch.c
-test_ms2001.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_ms2001.srcs += $(SRC_ARCH)/uart_hw.c
+test_ms2100.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
+test_ms2100.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
-test_ms2001.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
-test_ms2001.srcs += downlink.c pprz_transport.c
+test_ms2100.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
+test_ms2100.srcs += downlink.c pprz_transport.c
#
# test adxl345
@@ -930,7 +930,7 @@ test_adxl345.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_adxl345.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_adxl345.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_adxl345.srcs += $(SRC_ARCH)/uart_hw.c
+test_adxl345.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_adxl345.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_adxl345.srcs += downlink.c pprz_transport.c
@@ -955,7 +955,7 @@ test_adxl345_dma.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_adxl345_dma.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_adxl345_dma.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_adxl345_dma.srcs += $(SRC_ARCH)/uart_hw.c
+test_adxl345_dma.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_adxl345_dma.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_adxl345_dma.srcs += downlink.c pprz_transport.c
@@ -984,7 +984,7 @@ test_itg3200.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_itg3200.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_itg3200.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_itg3200.srcs += $(SRC_ARCH)/uart_hw.c
+test_itg3200.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_itg3200.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_itg3200.srcs += downlink.c pprz_transport.c
@@ -1010,7 +1010,7 @@ test_hmc5843.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_hmc5843.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_hmc5843.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_hmc5843.srcs += $(SRC_ARCH)/uart_hw.c
+test_hmc5843.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_hmc5843.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_hmc5843.srcs += downlink.c pprz_transport.c
@@ -1042,7 +1042,7 @@ test_aspirin.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_aspirin.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_aspirin.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_aspirin.srcs += $(SRC_ARCH)/uart_hw.c
+test_aspirin.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_aspirin.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_aspirin.srcs += downlink.c pprz_transport.c
@@ -1086,18 +1086,18 @@ ptw.srcs += lisa/lisa_overo_link.c lisa/arch/stm32/lisa_overo_link_arch.c
# Telemetry
ptw.CFLAGS += -DUSE_OVERO_LINK_TELEMETRY
#ptw.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-#ptw.srcs += $(SRC_ARCH)/uart_hw.c
+#ptw.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
ptw.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=OveroLinkTelemetry
ptw.srcs += downlink.c pprz_transport.c
# IMU
ptw.CFLAGS += -DIMU_TYPE_H=\"imu/imu_b2.h\"
-ptw.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
+ptw.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2100
ptw.srcs += $(SRC_SUBSYSTEMS)/imu.c
ptw.CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
ptw.srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c $(SRC_SUBSYSTEMS)/imu/arch/$(ARCH)/imu_b2_arch.c
ptw.srcs += peripherals/max1168.c $(SRC_ARCH)/peripherals/max1168_arch.c
-ptw.srcs += peripherals/ms2001.c $(SRC_ARCH)/peripherals/ms2001_arch.c
+ptw.srcs += peripherals/ms2100.c $(SRC_ARCH)/peripherals/ms2100_arch.c
ptw.srcs += math/pprz_trig_int.c
ptw.srcs += $(SRC_BOOZ)/booz2_commands.c
@@ -1111,7 +1111,7 @@ ptw.srcs += $(SRC_SUBSYSTEMS)/radio_control.c \
ptw.CFLAGS += -DRADIO_CONTROL_LED=6
ptw.CFLAGS += -DUSE_UART3 -DUART3_BAUD=B115200
ptw.CFLAGS += -DRADIO_CONTROL_LINK=Uart3
-ptw.srcs += $(SRC_ARCH)/uart_hw.c
+ptw.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
# Actuators
ptw.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
@@ -1138,7 +1138,7 @@ test_csc_servo.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_csc_servo.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_csc_servo.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_csc_servo.srcs += $(SRC_ARCH)/uart_hw.c
+test_csc_servo.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_csc_servo.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart2
test_csc_servo.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
@@ -1176,7 +1176,7 @@ test_gps.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIME_LE
test_gps.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_gps.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_gps.srcs += $(SRC_ARCH)/uart_hw.c
+test_gps.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_gps.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
test_gps.srcs += downlink.c pprz_transport.c
@@ -1207,7 +1207,7 @@ test_gps.srcs += $(SRC_BOOZ)/gps/booz_gps_skytraq.c
# test_adc.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
#
# test_adc.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-# test_adc.srcs += $(SRC_ARCH)/uart_hw.c
+# test_adc.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
#
# test_adc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
# test_adc.srcs += downlink.c pprz_transport.c
@@ -1231,7 +1231,7 @@ test_adc.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_adc.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_adc.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_adc.srcs += $(SRC_ARCH)/uart_hw.c
+test_adc.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_adc.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart2
test_adc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
@@ -1259,7 +1259,7 @@ test_board.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
test_board.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
test_board.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-test_board.srcs += $(SRC_ARCH)/uart_hw.c
+test_board.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_board.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart2
test_board.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
@@ -1305,7 +1305,7 @@ hs_gyro_aspirin.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
hs_gyro_aspirin.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
hs_gyro_aspirin.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-hs_gyro_aspirin.srcs += $(SRC_ARCH)/uart_hw.c
+hs_gyro_aspirin.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
hs_gyro_aspirin.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
hs_gyro_aspirin.srcs += downlink.c pprz_transport.c
@@ -1343,7 +1343,7 @@ hs_gyro_b2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
hs_gyro_b2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
hs_gyro_b2.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-hs_gyro_b2.srcs += $(SRC_ARCH)/uart_hw.c
+hs_gyro_b2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
hs_gyro_b2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
hs_gyro_b2.srcs += downlink.c pprz_transport.c
@@ -1351,12 +1351,12 @@ hs_gyro_b2.srcs += downlink.c pprz_transport.c
hs_gyro_b2.srcs += math/pprz_trig_int.c
hs_gyro_b2.CFLAGS += -DIMU_TYPE_H=\"imu/imu_b2.h\"
-hs_gyro_b2.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
+hs_gyro_b2.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2100
hs_gyro_b2.srcs += $(SRC_SUBSYSTEMS)/imu.c
hs_gyro_b2.CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
hs_gyro_b2.srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c $(SRC_SUBSYSTEMS)/imu/arch/$(ARCH)/imu_b2_arch.c
hs_gyro_b2.srcs += peripherals/max1168.c $(SRC_ARCH)/peripherals/max1168_arch.c
-hs_gyro_b2.srcs += peripherals/ms2001.c $(SRC_ARCH)/peripherals/ms2001_arch.c
+hs_gyro_b2.srcs += peripherals/ms2100.c $(SRC_ARCH)/peripherals/ms2100_arch.c
#
# Spits every samples of one axis of gyro on IMU crista
@@ -1376,7 +1376,7 @@ hs_gyro_crista.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
hs_gyro_crista.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
hs_gyro_crista.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
-hs_gyro_crista.srcs += $(SRC_ARCH)/uart_hw.c
+hs_gyro_crista.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
hs_gyro_crista.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
hs_gyro_crista.srcs += downlink.c pprz_transport.c
diff --git a/conf/autopilot/mercury.makefile b/conf/autopilot/obsolete/mercury.makefile
similarity index 96%
rename from conf/autopilot/mercury.makefile
rename to conf/autopilot/obsolete/mercury.makefile
index 1c2a5b1a9e..0bf68c81ef 100644
--- a/conf/autopilot/mercury.makefile
+++ b/conf/autopilot/obsolete/mercury.makefile
@@ -49,7 +49,7 @@ ap.ARCHDIR = $(ARCHI)
ap.CFLAGS += -I$(SRC_CSC) -I$(SRC_BOOZ) -I$(SRC_CSC_ARCH)
ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
ap.srcs += $(SRC_CSC)/mercury_main.c
-ap.CFLAGS += -DLED -DTIME_LED=1
+ap.CFLAGS += -DUSE_LED -DTIME_LED=1
ap.CFLAGS += -DAHRS_ALIGNER_LED=2
ap.CFLAGS += -DCSC_BOARD_ID=$(CSC_ID)
@@ -57,7 +57,7 @@ ap.CFLAGS += -DCSC_BOARD_ID=$(CSC_ID)
ap.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIMER0_VIC_SLOT=1
ap.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-ap.srcs += $(SRC_ARCH)/uart_hw.c
+ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
ap.srcs += $(SRC_ARCH)/adc_hw.c
ap.CFLAGS += -DADC -DUSE_AD0 -DUSE_AD0_0 -DUSE_AD0_1
@@ -128,13 +128,13 @@ test_uart.ARCHDIR = $(ARCHI)
test_uart.CFLAGS += -I$(SRC_CSC)
test_uart.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
test_uart.srcs += $(SRC_CSC)/csc_test_uart.c
-test_uart.CFLAGS += -DLED
+test_uart.CFLAGS += -DUSE_LED
# -DTIME_LED=1
test_uart.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIMER0_VIC_SLOT=1
test_uart.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-test_uart.srcs += $(SRC_ARCH)/uart_hw.c
+test_uart.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_uart.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUART1_VIC_SLOT=6
test_uart.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport \
diff --git a/conf/autopilot/mercury_csc.makefile b/conf/autopilot/obsolete/mercury_csc.makefile
similarity index 94%
rename from conf/autopilot/mercury_csc.makefile
rename to conf/autopilot/obsolete/mercury_csc.makefile
index 1515defa7b..b8f5cd04e8 100644
--- a/conf/autopilot/mercury_csc.makefile
+++ b/conf/autopilot/obsolete/mercury_csc.makefile
@@ -47,7 +47,7 @@ ap.ARCHDIR = $(ARCH)
ap.CFLAGS += -I$(SRC_CSC) -I$(SRC_CSC_ARCH)
ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
ap.srcs += $(SRC_CSC)/mercury_csc_main.c
-ap.CFLAGS += -DLED -DTIME_LED=1
+ap.CFLAGS += -DUSE_LED -DTIME_LED=1
ap.CFLAGS += -DCSC_BOARD_ID=$(CSC_ID)
@@ -79,7 +79,7 @@ ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B57600 -DUART0_VIC_SLOT=5
ap.CFLAGS += -DACTUATORS=\"servos_direct_hw.h\"
ap.srcs += actuators.c
-ap.srcs += $(SRC_ARCH)/uart_hw.c
+ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
ap.srcs += $(SRC_ARCH)/servos_direct_hw.c
ap.srcs += $(SRC_CSC)/csc_servos.c
ap.srcs += $(SRC_CSC)/csc_bat_monitor.c
@@ -98,13 +98,13 @@ test_uart.ARCHDIR = $(ARCH)
test_uart.CFLAGS += -I$(SRC_CSC)
test_uart.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
test_uart.srcs += $(SRC_CSC)/csc_test_uart.c
-test_uart.CFLAGS += -DLED
+test_uart.CFLAGS += -DUSE_LED
# -DTIME_LED=1
test_uart.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIMER0_VIC_SLOT=1
test_uart.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
-test_uart.srcs += $(SRC_ARCH)/uart_hw.c
+test_uart.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
test_uart.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUART1_VIC_SLOT=6
test_uart.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport \
@@ -122,7 +122,7 @@ test_can1.ARCHDIR = $(ARCH)
test_can1.CFLAGS += -I$(SRC_CSC)
test_can1.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
test_can1.srcs += $(SRC_CSC)/test_can1.c
-test_can1.CFLAGS += -DLED
+test_can1.CFLAGS += -DUSE_LED
# -DTIME_LED=1
test_can1.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' -DTIMER0_VIC_SLOT=1
diff --git a/conf/autopilot/pwm_input.makefile b/conf/autopilot/obsolete/pwm_input.makefile
similarity index 100%
rename from conf/autopilot/pwm_input.makefile
rename to conf/autopilot/obsolete/pwm_input.makefile
diff --git a/conf/autopilot/subsystems/fixedwing/testing.makefile b/conf/autopilot/obsolete/testing.makefile
similarity index 73%
rename from conf/autopilot/subsystems/fixedwing/testing.makefile
rename to conf/autopilot/obsolete/testing.makefile
index f1b539ccfc..f75a6c8ab0 100644
--- a/conf/autopilot/subsystems/fixedwing/testing.makefile
+++ b/conf/autopilot/obsolete/testing.makefile
@@ -3,23 +3,23 @@
# a test program to setup actuators
setup_actuators.ARCHDIR = $(ARCH)
-setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART0 -DUART0_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart0
-setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/servos_4015_hw.c main.c
+setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART0 -DUART0_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart0
+setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/servos_4015_hw.c main.c
# a test program to tunnel between both uart
tunnel.ARCHDIR = $(ARCH)
-tunnel.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DLED
+tunnel.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DUSE_LED
tunnel.srcs += $(SRC_ARCH)/uart_tunnel.c
# A test program to monitor the ADC values
test_adcs.ARCHDIR = $(ARCH)
-test_adcs.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1 -DUSE_ADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3 -DUSE_ADC_4 -DUSE_ADC_5 -DUSE_ADC_6 -DUSE_ADC_7
+test_adcs.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1 -DUSE_ADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3 -DUSE_ADC_4 -DUSE_ADC_5 -DUSE_ADC_6 -DUSE_ADC_7
test_adcs.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-test_adcs.srcs += downlink.c $(SRC_ARCH)/uart_hw.c xbee.c
+test_adcs.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c xbee.c
test_adcs.srcs += sys_time.c $(SRC_ARCH)/mcu_periph/adc_arch.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c test/test_adcs.c
# pprz_transport.c
@@ -28,16 +28,16 @@ test_adcs.srcs += sys_time.c $(SRC_ARCH)/mcu_periph/adc_arch.c $(SRC_ARCH)/sys_t
# a configuration program to access both uart through usb
usb_tunnel_0.ARCHDIR = $(ARCH)
usb_tunnel_0.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DUSE_UART0 -DUART0_BAUD=B115200
-usb_tunnel_0.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DLED
-usb_tunnel_0.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/uart_hw.c
+usb_tunnel_0.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DUSE_LED
+usb_tunnel_0.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/mcu_periph/uart_arch.c
usb_tunnel_0.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbinit.c
usb_tunnel_0.srcs += $(SRC_ARCH)/lpcusb/usbcontrol.c $(SRC_ARCH)/lpcusb/usbstdreq.c
usb_tunnel_0.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
usb_tunnel_1.ARCHDIR = $(ARCH)
usb_tunnel_1.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DUSE_UART1 -DUART1_BAUD=B115200
-usb_tunnel_1.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DLED
-usb_tunnel_1.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/uart_hw.c
+usb_tunnel_1.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DUSE_LED
+usb_tunnel_1.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/mcu_periph/uart_arch.c
usb_tunnel_1.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbinit.c
usb_tunnel_1.srcs += $(SRC_ARCH)/lpcusb/usbcontrol.c $(SRC_ARCH)/lpcusb/usbstdreq.c
usb_tunnel_1.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
diff --git a/conf/autopilot/obsolete/tiny.makefile b/conf/autopilot/obsolete/tiny.makefile
index b9ef9f08fc..71df9d2cea 100644
--- a/conf/autopilot/obsolete/tiny.makefile
+++ b/conf/autopilot/obsolete/tiny.makefile
@@ -32,23 +32,23 @@ ADC_GYRO_NB_SAMPLES = 16
# a test program to setup actuators
setup_actuators.ARCHDIR = $(ARCHI)
-setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART0 -DUART0_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart0
-setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/servos_4015_hw.c main.c
+setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DUSE_LED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART0 -DUART0_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart0
+setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/servos_4015_hw.c main.c
# a test program to tunnel between both uart
tunnel.ARCHDIR = $(ARCHI)
-tunnel.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DLED
+tunnel.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DUSE_LED
tunnel.srcs += $(SRC_ARCH)/uart_tunnel.c
# A test program to monitor the ADC values
test_adcs.ARCHDIR = $(ARCHI)
-test_adcs.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1 -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3 -DUSE_ADC_4 -DUSE_ADC_5 -DUSE_ADC_6 -DUSE_ADC_7
+test_adcs.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DUSE_LED -DTIME_LED=1 -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3 -DUSE_ADC_4 -DUSE_ADC_5 -DUSE_ADC_6 -DUSE_ADC_7
test_adcs.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
-test_adcs.srcs += downlink.c $(SRC_ARCH)/uart_hw.c xbee.c
+test_adcs.srcs += downlink.c $(SRC_ARCH)/mcu_periph/uart_arch.c xbee.c
test_adcs.srcs += sys_time.c $(SRC_ARCH)/adc_hw.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c test_adcs.c
# pprz_transport.c
@@ -57,16 +57,16 @@ test_adcs.srcs += sys_time.c $(SRC_ARCH)/adc_hw.c $(SRC_ARCH)/sys_time_hw.c $(SR
# a configuration program to access both uart through usb
usb_tunnel_0.ARCHDIR = $(ARCHI)
usb_tunnel_0.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DUSE_UART0 -DUART0_BAUD=B115200
-usb_tunnel_0.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DLED
-usb_tunnel_0.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/uart_hw.c
+usb_tunnel_0.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DUSE_LED
+usb_tunnel_0.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/mcu_periph/uart_arch.c
usb_tunnel_0.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbinit.c
usb_tunnel_0.srcs += $(SRC_ARCH)/lpcusb/usbcontrol.c $(SRC_ARCH)/lpcusb/usbstdreq.c
usb_tunnel_0.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
usb_tunnel_1.ARCHDIR = $(ARCHI)
usb_tunnel_1.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DUSE_UART1 -DUART1_BAUD=B115200
-usb_tunnel_1.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DLED
-usb_tunnel_1.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/uart_hw.c
+usb_tunnel_1.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DUSE_LED
+usb_tunnel_1.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/mcu_periph/uart_arch.c
usb_tunnel_1.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbinit.c
usb_tunnel_1.srcs += $(SRC_ARCH)/lpcusb/usbcontrol.c $(SRC_ARCH)/lpcusb/usbstdreq.c
usb_tunnel_1.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
diff --git a/conf/autopilot/obsolete/twin_mcu_avr.makefile b/conf/autopilot/obsolete/twin_mcu_avr.makefile
index 49a4e0b050..04ef99b046 100644
--- a/conf/autopilot/obsolete/twin_mcu_avr.makefile
+++ b/conf/autopilot/obsolete/twin_mcu_avr.makefile
@@ -1,8 +1,8 @@
include $(PAPARAZZI_SRC)/conf/autopilot/twin_avr.makefile
include $(PAPARAZZI_SRC)/conf/autopilot/twin_mcu.makefile
-ap.srcs += $(SRC_ARCH)/adc_hw.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/spi_hw.c $(SRC_ARCH)/sys_time_hw.c
+ap.srcs += $(SRC_ARCH)/adc_hw.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/spi_hw.c $(SRC_ARCH)/sys_time_hw.c
ap.CFLAGS += -DUSE_UART1 -DGPS_LINK=Uart1 -DUART1_BAUD=B38400
fbw.CFLAGS += -DACTUATORS=\"servos_4017.h\" -DSERVOS_4017 -DADC
-fbw.srcs += actuators.c $(SRC_ARCH)/adc_hw.c $(SRC_ARCH)/servos_4017.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/spi_hw.c $(SRC_ARCH)/sys_time_hw.c
+fbw.srcs += actuators.c $(SRC_ARCH)/adc_hw.c $(SRC_ARCH)/servos_4017.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/mcu_periph/uart_arch.c $(SRC_ARCH)/spi_hw.c $(SRC_ARCH)/sys_time_hw.c
diff --git a/conf/autopilot/vane_sensor.makefile b/conf/autopilot/obsolete/vane_sensor.makefile
similarity index 100%
rename from conf/autopilot/vane_sensor.makefile
rename to conf/autopilot/obsolete/vane_sensor.makefile
diff --git a/conf/autopilot/rotorcraft.makefile b/conf/autopilot/rotorcraft.makefile
index 07274c0b94..8966f4bed8 100644
--- a/conf/autopilot/rotorcraft.makefile
+++ b/conf/autopilot/rotorcraft.makefile
@@ -23,13 +23,6 @@
#
#
-#
-# Expected from board file or overriden as xml param :
-#
-# MODEM_PORT
-# MODEM_BAUD
-#
-
CFG_SHARED=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/shared
CFG_ROTORCRAFT=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/rotorcraft
@@ -79,12 +72,16 @@ ifeq ($(ARCH), stm32)
ap.srcs += $(SRC_ARCH)/led_hw.c
endif
+# frequency of main periodic
+ifndef PERIODIC_FREQUENCY
+PERIODIC_FREQUENCY = 512
+endif
+$(TARGET).CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./$(PERIODIC_FREQUENCY).))' -DPERIODIC_FREQUENCY=$(PERIODIC_FREQUENCY)
#
# Systime
#
ap.CFLAGS += -DUSE_SYS_TIME
ap.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-ap.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
ifeq ($(ARCH), stm32)
ap.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED)
endif
@@ -92,21 +89,15 @@ endif
#
# Telemetry/Datalink
#
+# include subsystems/rotorcraft/telemetry_transparent.makefile
+# or
+# include subsystems/rotorcraft/telemetry_xbee_api.makefile
+#
ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
-ap.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport
-ap.CFLAGS += -DDOWNLINK_DEVICE=$(MODEM_PORT)
-ap.srcs += $(SRC_FIRMWARE)/telemetry.c \
- downlink.c \
- pprz_transport.c
-ap.CFLAGS += -DDATALINK=PPRZ
-ap.CFLAGS += -DPPRZ_UART=$(MODEM_PORT)
-ap.srcs += $(SRC_BOOZ)/booz2_datalink.c
-ap.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-
-ifeq ($(ARCH), lpc21)
-ap.CFLAGS += -D$(MODEM_PORT)_VIC_SLOT=6
-endif
+# I2C is needed for speed controllers and barometers on lisa
+ap.srcs += mcu_periph/i2c.c
+ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
ap.srcs += $(SRC_BOOZ)/booz2_commands.c
@@ -212,7 +203,7 @@ ap.srcs += math/pprz_geodetic_int.c math/pprz_geodetic_float.c math/pprz_geodeti
# vertical filter float version
ap.srcs += $(SRC_SUBSYSTEMS)/ins/vf_float.c
-ap.CFLAGS += -DUSE_VFF -DDT_VFILTER='(1./512.)'
+ap.CFLAGS += -DUSE_VFF -DDT_VFILTER='(1./$(PERIODIC_FREQUENCY).)'
ap.srcs += $(SRC_FIRMWARE)/navigation.c
diff --git a/conf/autopilot/rotorcraft.xml b/conf/autopilot/rotorcraft.xml
index 2f6282417b..93467a93ff 100644
--- a/conf/autopilot/rotorcraft.xml
+++ b/conf/autopilot/rotorcraft.xml
@@ -2,10 +2,10 @@
description="autopilot and simulator for rotorcrafts">
-
+
-
+
@@ -13,13 +13,13 @@
-
-
+
+
-
-
+
+
diff --git a/conf/autopilot/setup.makefile b/conf/autopilot/setup.makefile
index c889667725..b71b547167 100644
--- a/conf/autopilot/setup.makefile
+++ b/conf/autopilot/setup.makefile
@@ -12,72 +12,66 @@ SRC_FIRMWARE=firmwares/setup
SETUP_INC = -I$(SRC_FIRMWARE)
-
-# for the usb_tunnel we need to set PCLK higher
-# so we just use tiny_2_1_1_usb.h as board file for the usb tunnels
-ifeq ($(TARGET), usb_tunnel_0)
- usb_tunnel_0.CFLAGS += -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\"
-else
- ifeq ($(TARGET), usb_tunnel_1)
- usb_tunnel_1.CFLAGS += -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\"
- else
- $(TARGET).CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
- endif
-endif
-
+$(TARGET).CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
# a test program to tunnel between both uart
-tunnel.CFLAGS += -DFBW -DLED
+tunnel.CFLAGS += -DUSE_LED
tunnel.srcs += $(SRC_ARCH)/uart_tunnel.c
+tunnel.srcs += mcu.c $(SRC_ARCH)/mcu_arch.c
+# for the usb_tunnel we need to set PCLK higher with the flag USE_USB_HIGH_PCLK
+
# a configuration program to access both uart through usb
-usb_tunnel_0.CFLAGS += -DFBW -DUSE_UART0 -DUART0_BAUD=B115200
-usb_tunnel_0.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DLED
-usb_tunnel_0.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/uart_hw.c
+usb_tunnel_0.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B115200 -DPERIPHERALS_AUTO_INIT
+usb_tunnel_0.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DUSE_LED -DUSE_USB_HIGH_PCLK
+usb_tunnel_0.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/mcu_periph/uart_arch.c
usb_tunnel_0.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbinit.c
usb_tunnel_0.srcs += $(SRC_ARCH)/lpcusb/usbcontrol.c $(SRC_ARCH)/lpcusb/usbstdreq.c
usb_tunnel_0.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
+usb_tunnel_0.srcs += mcu.c $(SRC_ARCH)/mcu_arch.c
-usb_tunnel_1.CFLAGS += -DFBW -DUSE_UART1 -DUART1_BAUD=B115200
-usb_tunnel_1.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DLED
-usb_tunnel_1.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/uart_hw.c
+usb_tunnel_1.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B115200 -DPERIPHERALS_AUTO_INIT
+usb_tunnel_1.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DUSE_LED -DUSE_USB_HIGH_PCLK
+usb_tunnel_1.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/mcu_periph/uart_arch.c
usb_tunnel_1.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbinit.c
usb_tunnel_1.srcs += $(SRC_ARCH)/lpcusb/usbcontrol.c $(SRC_ARCH)/lpcusb/usbstdreq.c
usb_tunnel_1.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
+usb_tunnel_1.srcs += mcu.c $(SRC_ARCH)/mcu_arch.c
-
-ifeq ($(ACTUATORS),)
- ifeq ($(BOARD),tiny)
- ifeq ($(BOARD_VERSION),1.1)
- include $(CFG_SHARED)/actuators_4015.makefile
- else
- ifeq ($(BOARD_VERSION),0.99)
+ifeq ($(TARGET), setup_actuators)
+ ifeq ($(ACTUATORS),)
+ ifeq ($(BOARD),tiny)
+ ifeq ($(BOARD_VERSION),1.1)
include $(CFG_SHARED)/actuators_4015.makefile
else
- include $(CFG_SHARED)/actuators_4017.makefile
+ ifeq ($(BOARD_VERSION),0.99)
+ include $(CFG_SHARED)/actuators_4015.makefile
+ else
+ include $(CFG_SHARED)/actuators_4017.makefile
+ endif
endif
endif
- endif
- ifeq ($(BOARD),twog)
- include $(CFG_SHARED)/actuators_4017.makefile
- endif
+ ifeq ($(BOARD),twog)
+ include $(CFG_SHARED)/actuators_4017.makefile
+ endif
- ifeq ($(BOARD),lisa_l)
- include $(CFG_SHARED)/actuators_direct.makefile
- endif
+ ifeq ($(BOARD),lisa_l)
+ include $(CFG_SHARED)/actuators_direct.makefile
+ endif
-else
- include $(CFG_SHARED)/$(ACTUATORS).makefile
+ else
+ include $(CFG_SHARED)/$(ACTUATORS).makefile
+ endif
endif
# a test program to setup actuators
-setup_actuators.CFLAGS += -DFBW -DLED -DTIME_LED=1
+setup_actuators.CFLAGS += -DFBW -DUSE_LED -DTIME_LED=1
setup_actuators.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DDOWNLINK_DEVICE=Uart1 -DPPRZ_UART=Uart1
setup_actuators.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ
setup_actuators.CFLAGS += -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1
setup_actuators.CFLAGS += $(SETUP_INC) -Ifirmwares/fixedwing
-setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c downlink.c $(SRC_FIRMWARE)/setup_actuators.c $(SRC_ARCH)/uart_hw.c firmwares/fixedwing/main.c
+setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c downlink.c $(SRC_FIRMWARE)/setup_actuators.c $(SRC_ARCH)/mcu_periph/uart_arch.c firmwares/fixedwing/main.c mcu.c $(SRC_ARCH)/mcu_arch.c
diff --git a/conf/autopilot/sitl.makefile b/conf/autopilot/sitl.makefile
index f3971eb938..b05421888e 100644
--- a/conf/autopilot/sitl.makefile
+++ b/conf/autopilot/sitl.makefile
@@ -1,5 +1,5 @@
sim.ARCHDIR = $(ARCH)
-sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO
sim.srcs += latlong.c\
radio_control.c\
downlink.c\
@@ -14,7 +14,7 @@ sim.srcs += latlong.c\
sys_time.c\
$(SRC_FIRMWARE)/main_fbw.c \
$(SRC_FIRMWARE)/main_ap.c \
- datalink.c \
+ $(SRC_FIRMWARE)/datalink.c \
$(SRC_ARCH)/ppm_hw.c \
$(SRC_ARCH)/sim_gps.c\
$(SRC_ARCH)/sim_ir.c \
diff --git a/conf/autopilot/sitl_jsbsim.makefile b/conf/autopilot/sitl_jsbsim.makefile
index 06f62f724e..4b46e00a19 100644
--- a/conf/autopilot/sitl_jsbsim.makefile
+++ b/conf/autopilot/sitl_jsbsim.makefile
@@ -24,12 +24,12 @@ else
jsbsim.LDFLAGS += -L$(JSBSIM_LIB) -lJSBSim
endif
-jsbsim.CFLAGS += -DSITL -DAP -DFBW -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO -Ifirmwares/fixedwing
+jsbsim.CFLAGS += -DSITL -DAP -DFBW -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DUSE_LED -DWIND_INFO -Ifirmwares/fixedwing
jsbsim.srcs = $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/jsbsim_ir.c $(SRC_ARCH)/jsbsim_transport.c $(SRC_ARCH)/ivy_transport.c
jsbsim.srcs += latlong.c downlink.c commands.c gps.c inter_mcu.c subsystems/sensors/infrared.c \
$(SRC_FIXEDWING)/stabilization/stabilization_attitude.c \
$(SRC_FIXEDWING)/guidance/guidance_v.c\
- subsystems/nav.c estimator.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c datalink.c
+ subsystems/nav.c estimator.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c $(SRC_FIRMWARE)/datalink.c
jsbsim.srcs += $(SIMDIR)/sim_ac_jsbsim.c
# Choose in your airframe file type of airframe
# jsbsim.srcs += $(SIMDIR)/sim_ac_fw.c
diff --git a/conf/autopilot/sitl_link_pprz.makefile b/conf/autopilot/sitl_link_pprz.makefile
index 2fcd2b8d91..313d5ee07f 100644
--- a/conf/autopilot/sitl_link_pprz.makefile
+++ b/conf/autopilot/sitl_link_pprz.makefile
@@ -1,3 +1,3 @@
sim.ARCHDIR = $(ARCH)
sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_INFRARED -DRADIO_CONTROL_SETTINGS -DSIM_UART -DDOWNLINK_AP_DEVICE=SimUart -DDOWNLINK_FBW_DEVICE=SimUart -DDATALINK=PPRZ
-sim.srcs = radio_control.c downlink.c pprz_transport.c commands.c gps.c inter_mcu.c subsystems/sensors/infrared.c $(SRC_FIRMWARE)/stabilization/stabilization_attitude.c $(SRC_FIRMWARE)/guidance/guidance_v.c nav.c estimator.c cam.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c rc_settings.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/sim_uart.c datalink.c
+sim.srcs = radio_control.c downlink.c pprz_transport.c commands.c gps.c inter_mcu.c subsystems/sensors/infrared.c $(SRC_FIRMWARE)/stabilization/stabilization_attitude.c $(SRC_FIRMWARE)/guidance/guidance_v.c nav.c estimator.c cam.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c rc_settings.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/sim_uart.c $(SRC_FIRMWARE)/datalink.c
diff --git a/conf/autopilot/subsystems/fixedwing/attitude_dcm.makefile b/conf/autopilot/subsystems/fixedwing/attitude_dcm.makefile
index 03d340e877..91b1eb5ecd 100644
--- a/conf/autopilot/subsystems/fixedwing/attitude_dcm.makefile
+++ b/conf/autopilot/subsystems/fixedwing/attitude_dcm.makefile
@@ -5,11 +5,32 @@ $(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_dcm.h\"
ifeq ($(ARCH), lpc21)
-ap.CFLAGS += -DUSE_ANALOG_IMU
+ap.CFLAGS += -DUSE_AHRS
-ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
-ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
-ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm.c
+ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c
+ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c
+ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm.c
+
+ifdef AHRS_ALIGNER_LED
+ ap.CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED)
+endif
+
+ifdef CPU_LED
+ ap.CFLAGS += -DAHRS_CPU_LED=$(CPU_LED)
+endif
+
+ifdef AHRS_PROPAGATE_FREQUENCY
+else
+ AHRS_PROPAGATE_FREQUENCY = 60
+endif
+
+ifdef AHRS_CORRECT_FREQUENCY
+else
+ AHRS_CORRECT_FREQUENCY = 60
+endif
+
+ap.CFLAGS += -DAHRS_PROPAGATE_FREQUENCY=$(AHRS_PROPAGATE_FREQUENCY)
+ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY)
endif
diff --git a/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile b/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile
index aa4509a479..7395522edb 100644
--- a/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile
+++ b/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile
@@ -33,6 +33,7 @@ ap.CFLAGS += -DADC_CHANNEL_IR_NB_SAMPLES=$(ADC_IR_NB_SAMPLES)
$(TARGET).CFLAGS += -DUSE_INFRARED
$(TARGET).srcs += subsystems/sensors/infrared.c
+$(TARGET).srcs += subsystems/sensors/infrared_adc.c
sim.srcs += $(SRC_ARCH)/sim_ir.c
jsbsim.srcs += $(SRC_ARCH)/jsbsim_ir.c
diff --git a/conf/autopilot/subsystems/fixedwing/attitude_infrared_i2c.makefile b/conf/autopilot/subsystems/fixedwing/attitude_infrared_i2c.makefile
new file mode 100644
index 0000000000..b3f9355b11
--- /dev/null
+++ b/conf/autopilot/subsystems/fixedwing/attitude_infrared_i2c.makefile
@@ -0,0 +1,8 @@
+# attitude via IR I2C sensors
+
+$(TARGET).CFLAGS += -DUSE_INFRARED_I2C
+$(TARGET).srcs += subsystems/sensors/infrared.c
+$(TARGET).srcs += subsystems/sensors/infrared_i2c.c
+
+sim.srcs += $(SRC_ARCH)/sim_ir.c
+jsbsim.srcs += $(SRC_ARCH)/jsbsim_ir.c
diff --git a/conf/autopilot/subsystems/fixedwing/autopilot.makefile b/conf/autopilot/subsystems/fixedwing/autopilot.makefile
index 6b3e601453..fe9ba0a275 100644
--- a/conf/autopilot/subsystems/fixedwing/autopilot.makefile
+++ b/conf/autopilot/subsystems/fixedwing/autopilot.makefile
@@ -68,8 +68,11 @@ endif
#
# Sys-time
#
-
-$(TARGET).srcs += sys_time.c
+ifndef PERIODIC_FREQUENCY
+PERIODIC_FREQUENCY = 60
+endif
+$(TARGET).CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./$(PERIODIC_FREQUENCY).))' -DPERIODIC_FREQUENCY=$(PERIODIC_FREQUENCY)
+$(TARGET).srcs += sys_time.c
#
# InterMCU & Commands
@@ -122,7 +125,6 @@ endif
#
ns_CFLAGS += -DUSE_SYS_TIME
-ns_CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./60.))'
ns_srcs += $(SRC_ARCH)/sys_time_hw.c
@@ -168,6 +170,12 @@ ap_srcs += $(SRC_FIXEDWING)/estimator.c
## SIMULATOR THREAD SPECIFIC
##
+UNAME = $(shell uname -s)
+ifeq ("$(UNAME)","Darwin")
+ sim.CFLAGS += -I/opt/local/include/
+endif
+
+sim.CFLAGS += $(CPPFLAGS)
sim.CFLAGS += $(fbw_CFLAGS) $(ap_CFLAGS)
sim.srcs += $(fbw_srcs) $(ap_srcs)
@@ -175,13 +183,14 @@ sim.CFLAGS += -DSITL
sim.srcs += $(SRC_ARCH)/sim_ap.c
sim.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport
-sim.srcs += downlink.c datalink.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c
+sim.srcs += downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c
######################################################################
##
## JSBSIM THREAD SPECIFIC
##
+OCAMLLIBDIR=$(shell ocamlc -where)
JSBSIM_INC = /usr/include/JSBSim
#JSBSIM_LIB = /usr/lib
@@ -189,14 +198,14 @@ jsbsim.CFLAGS += $(fbw_CFLAGS) $(ap_CFLAGS)
jsbsim.srcs += $(fbw_srcs) $(ap_srcs)
jsbsim.CFLAGS += -DSITL
-jsbsim.srcs += $(SIMDIR)/sim_ac_jsbsim.c $(SIMDIR)/sim_ac_fw.c
+jsbsim.srcs += $(SIMDIR)/sim_ac_jsbsim.c $(SIMDIR)/sim_ac_fw.c $(SIMDIR)/sim_ac_flightgear.c
# external libraries
-jsbsim.CFLAGS += -I$(SIMDIR) -I/usr/include -I$(JSBSIM_INC) `pkg-config glib-2.0 --cflags`
+jsbsim.CFLAGS += -I$(SIMDIR) -I/usr/include -I$(JSBSIM_INC) -I$(OCAMLLIBDIR) `pkg-config glib-2.0 --cflags`
jsbsim.LDFLAGS += `pkg-config glib-2.0 --libs` -lm -lpcre -lglibivy -L/usr/lib -lJSBSim
jsbsim.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport
-jsbsim.srcs += downlink.c datalink.c $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/jsbsim_transport.c
+jsbsim.srcs += downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/jsbsim_transport.c
######################################################################
##
diff --git a/conf/autopilot/subsystems/fixedwing/gps_ublox_lea4p.makefile b/conf/autopilot/subsystems/fixedwing/gps_ublox_lea4p.makefile
index d4fab5b815..2e3249f679 100644
--- a/conf/autopilot/subsystems/fixedwing/gps_ublox_lea4p.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gps_ublox_lea4p.makefile
@@ -2,9 +2,9 @@
ap.CFLAGS += -DUSE_GPS -DUBX
-ap.CFLAGS += -DGPS_LINK=Uart$(GPS_UART_NR)
-ap.CFLAGS += -DUSE_UART$(GPS_UART_NR)
-ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=$(GPS_BAUD)
+ap.CFLAGS += -DGPS_LINK=$(GPS_PORT)
+ap.CFLAGS += -DUSE_$(GPS_PORT)
+ap.CFLAGS += -D$(GPS_PORT)_BAUD=$(GPS_BAUD)
ifneq ($(GPS_LED),none)
ap.CFLAGS += -DGPS_LED=$(GPS_LED)
diff --git a/conf/autopilot/subsystems/fixedwing/gps_ublox_lea5h.makefile b/conf/autopilot/subsystems/fixedwing/gps_ublox_lea5h.makefile
index 27f46bc630..de753df714 100644
--- a/conf/autopilot/subsystems/fixedwing/gps_ublox_lea5h.makefile
+++ b/conf/autopilot/subsystems/fixedwing/gps_ublox_lea5h.makefile
@@ -2,9 +2,9 @@
ap.CFLAGS += -DUSE_GPS -DUBX -DGPS_USE_LATLONG
-ap.CFLAGS += -DGPS_LINK=Uart$(GPS_UART_NR)
-ap.CFLAGS += -DUSE_UART$(GPS_UART_NR)
-ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=$(GPS_BAUD)
+ap.CFLAGS += -DGPS_LINK=$(GPS_PORT)
+ap.CFLAGS += -DUSE_$(GPS_PORT)
+ap.CFLAGS += -D$(GPS_PORT)_BAUD=$(GPS_BAUD)
ifneq ($(GPS_LED),none)
ap.CFLAGS += -DGPS_LED=$(GPS_LED)
diff --git a/conf/autopilot/subsystems/fixedwing/imu_analog.makefile b/conf/autopilot/subsystems/fixedwing/imu_analog.makefile
index 499706aa75..b2b3e8ca83 100644
--- a/conf/autopilot/subsystems/fixedwing/imu_analog.makefile
+++ b/conf/autopilot/subsystems/fixedwing/imu_analog.makefile
@@ -44,7 +44,7 @@
ifeq ($(ARCH), lpc21)
-imu_CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_analog.h\"
+imu_CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_analog.h\" -DUSE_IMU
imu_CFLAGS += -DADC
imu_CFLAGS += -DUSE_$(GYRO_P) -DUSE_$(GYRO_Q) -DUSE_$(GYRO_R)
diff --git a/conf/autopilot/subsystems/fixedwing/imu_booz.makefile b/conf/autopilot/subsystems/fixedwing/imu_booz.makefile
index 5de6f0bf69..e6ad633f17 100644
--- a/conf/autopilot/subsystems/fixedwing/imu_booz.makefile
+++ b/conf/autopilot/subsystems/fixedwing/imu_booz.makefile
@@ -41,7 +41,7 @@
# imu Booz2 v1.0, v1.1, v1.2, YAI v1.0
-imu_CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_b2.h\"
+imu_CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_b2.h\" -DUSE_IMU
imu_srcs += $(SRC_SUBSYSTEMS)/imu.c
imu_srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c
imu_srcs += $(SRC_ARCH)/subsystems/imu/imu_b2_arch.c
@@ -52,7 +52,7 @@ imu_srcs += $(SRC_ARCH)/peripherals/max1168_arch.c
#ifeq ($(ARCH), lpc21)
imu_CFLAGS += -DSSP_VIC_SLOT=9
imu_CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
-#FIXME ms2001 not used on this imu
+#FIXME ms2100 not used on this imu
#else ifeq ($(ARCH), stm32)
#imu_CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
#imu_CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT)
diff --git a/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile b/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile
index 91be2eba88..60cc01c1af 100644
--- a/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile
+++ b/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile
@@ -12,4 +12,6 @@ $(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/nav_cube.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/discsurvey.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/OSAMNav.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/snav.c
+$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/spiral.c
+$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/poly_survey_adv.c
diff --git a/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile b/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile
index 6ad33ef3c8..c08b83ec9e 100644
--- a/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile
+++ b/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile
@@ -1,12 +1,8 @@
-ap.CFLAGS += -DUSE_UART$(MODEM_UART_NR)
-ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=$(MODEM_BAUD)
+ap.CFLAGS += -DUSE_$(MODEM_PORT)
+ap.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-MODEM_UART = Uart$(MODEM_UART_NR)
-
-ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_UART) -DDOWNLINK_AP_DEVICE=$(MODEM_UART) -DPPRZ_UART=$(MODEM_UART)
+ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_PORT) -DDOWNLINK_AP_DEVICE=$(MODEM_PORT) -DPPRZ_UART=$(MODEM_PORT)
ap.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ
-ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIXEDWING)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c
-
-
+ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c
diff --git a/conf/autopilot/subsystems/fixedwing/telemetry_transparent_usb.makefile b/conf/autopilot/subsystems/fixedwing/telemetry_transparent_usb.makefile
index eb77b500bd..fdc2d31baf 100644
--- a/conf/autopilot/subsystems/fixedwing/telemetry_transparent_usb.makefile
+++ b/conf/autopilot/subsystems/fixedwing/telemetry_transparent_usb.makefile
@@ -3,7 +3,7 @@
ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=UsbS -DDOWNLINK_AP_DEVICE=UsbS -DPPRZ_UART=UsbS
ap.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ -DUSE_USB_SERIAL -DUSE_USB_HIGH_PCLK
-ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIXEDWING)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c
+ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
ap.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
diff --git a/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile b/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile
index 1263c24044..5dc414e00d 100644
--- a/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile
+++ b/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile
@@ -1,10 +1,8 @@
# XBee modems in API mode
-ap.CFLAGS += -DUSE_UART$(MODEM_UART_NR)
-ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=$(MODEM_BAUD)
+ap.CFLAGS += -DUSE_$(MODEM_PORT)
+ap.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
-MODEM_UART = Uart$(MODEM_UART_NR)
-
-ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_UART) -DDOWNLINK_AP_DEVICE=$(MODEM_UART) -DXBEE_UART=$(MODEM_UART)
+ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_PORT) -DDOWNLINK_AP_DEVICE=$(MODEM_PORT) -DXBEE_UART=$(MODEM_PORT)
ap.CFLAGS += -DDOWNLINK_TRANSPORT=XBeeTransport -DDATALINK=XBEE
-ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIXEDWING)/datalink.c $(SRC_FIXEDWING)/xbee.c
+ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_FIXEDWING)/xbee.c
diff --git a/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile b/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile
index 546bde2264..6bb570edb2 100644
--- a/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile
+++ b/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile
@@ -42,7 +42,7 @@
# imu Booz2 v1.1
imu_CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_b2.h\"
-imu_CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
+imu_CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2100
imu_CFLAGS += -DIMU_B2_VERSION_1_1
imu_srcs += $(SRC_SUBSYSTEMS)/imu.c
imu_srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c
@@ -51,13 +51,13 @@ imu_srcs += $(SRC_ARCH)/subsystems/imu/imu_b2_arch.c
imu_srcs += peripherals/max1168.c
imu_srcs += $(SRC_ARCH)/peripherals/max1168_arch.c
-imu_srcs += peripherals/ms2001.c
-imu_srcs += $(SRC_ARCH)/peripherals/ms2001_arch.c
+imu_srcs += peripherals/ms2100.c
+imu_srcs += $(SRC_ARCH)/peripherals/ms2100_arch.c
ifeq ($(ARCH), lpc21)
imu_CFLAGS += -DSSP_VIC_SLOT=9
imu_CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
-imu_CFLAGS += -DMS2001_DRDY_VIC_SLOT=11
+imu_CFLAGS += -DMS2100_DRDY_VIC_SLOT=11
else ifeq ($(ARCH), stm32)
imu_CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
imu_CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT)
diff --git a/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.2.makefile b/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.2.makefile
index 844b6c786d..1e562fcc24 100644
--- a/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.2.makefile
+++ b/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.2.makefile
@@ -57,8 +57,8 @@ imu_srcs += $(SRC_ARCH)/peripherals/hmc5843_arch.c
ifeq ($(ARCH), lpc21)
imu_CFLAGS += -DSSP_VIC_SLOT=9
imu_CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
-#FIXME ms2001 not used on this imu
-imu_CFLAGS += -DMS2001_DRDY_VIC_SLOT=11
+#FIXME ms2100 not used on this imu
+imu_CFLAGS += -DMS2100_DRDY_VIC_SLOT=11
else ifeq ($(ARCH), stm32)
imu_CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
imu_CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT)
diff --git a/conf/autopilot/subsystems/rotorcraft/actuators_asctec.makefile b/conf/autopilot/subsystems/rotorcraft/actuators_asctec.makefile
index a3c61afbef..be29427092 100644
--- a/conf/autopilot/subsystems/rotorcraft/actuators_asctec.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/actuators_asctec.makefile
@@ -1,7 +1,5 @@
# asctec controllers
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
-ap.srcs += mcu_periph/i2c.c
-ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
ifeq ($(ARCH), lpc21)
ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c0
diff --git a/conf/autopilot/subsystems/rotorcraft/actuators_asctec_v2.makefile b/conf/autopilot/subsystems/rotorcraft/actuators_asctec_v2.makefile
index c1cfc48f37..6b9d300c2e 100644
--- a/conf/autopilot/subsystems/rotorcraft/actuators_asctec_v2.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/actuators_asctec_v2.makefile
@@ -19,8 +19,6 @@
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
ap.CFLAGS += -DACTUATORS_ASCTEC_V2_PROTOCOL
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
-ap.srcs += mcu_periph/i2c.c
-ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
ifeq ($(ARCH), lpc21)
ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c0
diff --git a/conf/autopilot/subsystems/rotorcraft/actuators_heli.makefile b/conf/autopilot/subsystems/rotorcraft/actuators_heli.makefile
index 95e3591951..d89410102e 100644
--- a/conf/autopilot/subsystems/rotorcraft/actuators_heli.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/actuators_heli.makefile
@@ -5,6 +5,3 @@ ap.CFLAGS += -DUSE_HELI
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_heli.c
ap.srcs += $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arch.c
-
-# fixme : this is needed by baro and usualy added by actuators_mkk or actuators_asctec
-ap.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
diff --git a/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile b/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile
index f70c299815..3529c03923 100644
--- a/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile
@@ -1,8 +1,15 @@
#
-# Booz Mikrokopter Actuators
+# Mikrokopter Actuators
+#
+# enable the subsystem for your firmware:
+#
+# ...
+#
+#
+#
#
#
-# required xml:
+# required xml configuration:
#
#
#
@@ -24,16 +31,17 @@
#
#
+# set default i2c timing if not already configured
+ifeq ($(MKK_I2C_SCL_TIME), )
+MKK_I2C_SCL_TIME=150
+endif
-#
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
-ap.srcs += mcu_periph/i2c.c
-ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
ifeq ($(ARCH), lpc21)
ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c0
-ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10
+ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=$(MKK_I2C_SCL_TIME) -DI2C0_SCLH=$(MKK_I2C_SCL_TIME) -DI2C0_VIC_SLOT=10
else ifeq ($(ARCH), stm32)
ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c1
ap.CFLAGS += -DUSE_I2C1
@@ -42,6 +50,6 @@ endif
# Simulator
sim.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
sim.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
-sim.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10 -DACTUATORS_MKK_DEVICE=i2c1
+sim.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=$(MKK_I2C_SCL_TIME) -DI2C0_SCLH=$(MKK_I2C_SCL_TIME) -DI2C0_VIC_SLOT=10 -DACTUATORS_MKK_DEVICE=i2c1
sim.srcs += mcu_periph/i2c.c
sim.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
diff --git a/conf/autopilot/subsystems/rotorcraft/actuators_pwm_supervision.makefile b/conf/autopilot/subsystems/rotorcraft/actuators_pwm_supervision.makefile
new file mode 100644
index 0000000000..5daf9d055f
--- /dev/null
+++ b/conf/autopilot/subsystems/rotorcraft/actuators_pwm_supervision.makefile
@@ -0,0 +1,7 @@
+
+# add actuatos arch to include directories
+ap.CFLAGS += -I$(SRC_FIRMWARE)/actuators/arch/$(ARCH)
+
+ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
+ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_pwm_supervision.c
+ap.srcs += $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arch.c
diff --git a/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile b/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
index 40f08f0fe6..1cd8ef6246 100644
--- a/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
@@ -67,10 +67,12 @@ sim.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
sim.srcs += $(SRC_BOOZ_SIM)/booz2_unsimulated_peripherals.c
sim.srcs += firmwares/rotorcraft/main.c
+sim.srcs += mcu.c
+sim.srcs += $(SRC_ARCH)/mcu_arch.c
sim.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
# -DTIME_LED=1
-#sim.CFLAGS += -DLED
+#sim.CFLAGS += -DUSE_LED
sim.srcs += sys_time.c
@@ -81,7 +83,7 @@ sim.srcs += $(SRC_FIRMWARE)/telemetry.c \
sim.srcs += $(SRC_BOOZ)/booz2_commands.c
-sim.srcs += $(SRC_BOOZ)/booz2_datalink.c
+sim.srcs += $(SRC_FIRMWARE)/datalink.c
#
#
diff --git a/conf/autopilot/subsystems/rotorcraft/imu_aspirin.makefile b/conf/autopilot/subsystems/rotorcraft/imu_aspirin.makefile
new file mode 100644
index 0000000000..d328823c55
--- /dev/null
+++ b/conf/autopilot/subsystems/rotorcraft/imu_aspirin.makefile
@@ -0,0 +1,62 @@
+#
+# Booz2 IMU booz2v1.2
+#
+#
+# required xml:
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+
+#
+# param: MAX_1168_DRDY_PORT
+
+
+
+# imu aspirin
+
+imu_CFLAGS += -DIMU_TYPE_H=\"imu/imu_aspirin.h\" -DIMU_OVERRIDE_CHANNELS
+imu_srcs += $(SRC_SUBSYSTEMS)/imu.c
+imu_srcs += $(SRC_SUBSYSTEMS)/imu/imu_aspirin.c
+imu_srcs += $(SRC_ARCH)/subsystems/imu/imu_aspirin_arch.c
+#imu_srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
+
+#imu_srcs += peripherals/max1168.c
+#imu_srcs += $(SRC_ARCH)/peripherals/max1168_arch.c
+
+imu_srcs += peripherals/hmc5843.c
+imu_srcs += $(SRC_ARCH)/peripherals/hmc5843_arch.c
+
+imu_CFLAGS += -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_EXTI15_10_IRQ
+imu_CFLAGS += -DUSE_I2C2 -DUSE_EXTI9_5_IRQ
+
+# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
+# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
+ap.CFLAGS += $(imu_CFLAGS)
+ap.srcs += $(imu_srcs)
diff --git a/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.0.makefile b/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.0.makefile
index dcf1a660a3..f3074ca2bb 100644
--- a/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.0.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.0.makefile
@@ -9,25 +9,25 @@
#
#
#
-#
-#
-#
+#
+#
+#
#
#
#
#
#
-#
-#
-#
+#
+#
+#
#
#
#
#
#
-#
-#
-#
+#
+#
+#
#
#
#
diff --git a/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile b/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
index bfef8c6aca..18db231194 100644
--- a/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
@@ -9,25 +9,25 @@
#
#
#
-#
-#
-#
+#
+#
+#
#
#
#
#
#
-#
-#
-#
+#
+#
+#
#
#
#
#
#
-#
-#
-#
+#
+#
+#
#
#
#
@@ -42,7 +42,7 @@
# imu Booz2 v1.1
imu_CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_b2.h\"
-imu_CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
+imu_CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2100
imu_CFLAGS += -DIMU_B2_VERSION_1_1
imu_srcs += $(SRC_SUBSYSTEMS)/imu.c
imu_srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c
@@ -51,13 +51,13 @@ imu_srcs += $(SRC_ARCH)/subsystems/imu/imu_b2_arch.c
imu_srcs += peripherals/max1168.c
imu_srcs += $(SRC_ARCH)/peripherals/max1168_arch.c
-imu_srcs += peripherals/ms2001.c
-imu_srcs += $(SRC_ARCH)/peripherals/ms2001_arch.c
+imu_srcs += peripherals/ms2100.c
+imu_srcs += $(SRC_ARCH)/peripherals/ms2100_arch.c
ifeq ($(ARCH), lpc21)
imu_CFLAGS += -DSSP_VIC_SLOT=9
imu_CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
-imu_CFLAGS += -DMS2001_DRDY_VIC_SLOT=11
+imu_CFLAGS += -DMS2100_DRDY_VIC_SLOT=11
else ifeq ($(ARCH), stm32)
imu_CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
imu_CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT)
diff --git a/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.2.makefile b/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.2.makefile
index 844b6c786d..e208c41664 100644
--- a/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.2.makefile
+++ b/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.2.makefile
@@ -9,25 +9,25 @@
#
#
#
-#
-#
-#
+#
+#
+#
#
#
#
#
#
-#
-#
-#
+#
+#
+#
#
#
#
#
#
-#
-#
-#
+#
+#
+#
#
#
#
@@ -57,8 +57,8 @@ imu_srcs += $(SRC_ARCH)/peripherals/hmc5843_arch.c
ifeq ($(ARCH), lpc21)
imu_CFLAGS += -DSSP_VIC_SLOT=9
imu_CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
-#FIXME ms2001 not used on this imu
-imu_CFLAGS += -DMS2001_DRDY_VIC_SLOT=11
+#FIXME ms2100 not used on this imu
+imu_CFLAGS += -DMS2100_DRDY_VIC_SLOT=11
else ifeq ($(ARCH), stm32)
imu_CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
imu_CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT)
@@ -68,8 +68,8 @@ endif
# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
-stm_passthrough.CFLAGS += $(imu_CFLAGS)
-stm_passthrough.srcs += $(imu_srcs)
+ap.CFLAGS += $(imu_CFLAGS)
+ap.srcs += $(imu_srcs)
#
# Simulator
diff --git a/conf/autopilot/subsystems/rotorcraft/telemetry_transparent.makefile b/conf/autopilot/subsystems/rotorcraft/telemetry_transparent.makefile
new file mode 100644
index 0000000000..fbc1b89c2e
--- /dev/null
+++ b/conf/autopilot/subsystems/rotorcraft/telemetry_transparent.makefile
@@ -0,0 +1,18 @@
+#
+# Expected from board file or overriden as xml param :
+#
+# MODEM_PORT
+# MODEM_BAUD
+#
+
+ap.CFLAGS += -DUSE_$(MODEM_PORT)
+ap.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
+
+ap.CFLAGS += -DDOWNLINK -DDOWNLINK_DEVICE=$(MODEM_PORT) -DPPRZ_UART=$(MODEM_PORT)
+ap.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ
+ap.srcs += downlink.c pprz_transport.c
+ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/telemetry.c
+
+ifeq ($(ARCH), lpc21)
+ap.CFLAGS += -D$(MODEM_PORT)_VIC_SLOT=6
+endif
diff --git a/conf/autopilot/subsystems/rotorcraft/telemetry_xbee_api.makefile b/conf/autopilot/subsystems/rotorcraft/telemetry_xbee_api.makefile
new file mode 100644
index 0000000000..a10f3fa95e
--- /dev/null
+++ b/conf/autopilot/subsystems/rotorcraft/telemetry_xbee_api.makefile
@@ -0,0 +1,19 @@
+# XBee modems in API mode
+#
+# Expected from board file or overriden as xml param :
+#
+# MODEM_PORT
+# MODEM_BAUD
+#
+
+ap.CFLAGS += -DUSE_$(MODEM_PORT)
+ap.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
+
+ap.CFLAGS += -DDOWNLINK -DDOWNLINK_DEVICE=$(MODEM_PORT) -DXBEE_UART=$(MODEM_PORT)
+ap.CFLAGS += -DDOWNLINK_TRANSPORT=XBeeTransport -DDATALINK=XBEE
+ap.srcs += downlink.c xbee.c
+ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/telemetry.c
+
+ifeq ($(ARCH), lpc21)
+ap.CFLAGS += -D$(MODEM_PORT)_VIC_SLOT=6
+endif
diff --git a/conf/autopilot/subsystems/fixedwing/actuators_ppm.makefile b/conf/autopilot/subsystems/shared/actuators_ppm.makefile
similarity index 75%
rename from conf/autopilot/subsystems/fixedwing/actuators_ppm.makefile
rename to conf/autopilot/subsystems/shared/actuators_ppm.makefile
index ffa7bef601..99171e4448 100644
--- a/conf/autopilot/subsystems/fixedwing/actuators_ppm.makefile
+++ b/conf/autopilot/subsystems/shared/actuators_ppm.makefile
@@ -5,6 +5,6 @@
# The PPM is output on the SERV_CLK pin. The PPM frame rate, pulse width, and number of channels
# can be adjusted in the "servos_ppm_hw.h" file to suit your particular receiver.
-ap.CFLAGS += -DACTUATORS=\"servos_ppm_hw.h\" -DSERVOS_PPM_MAT
-ap.srcs += $(SRC_ARCH)/servos_ppm_hw.c $(SRC_FIXEDWING)/actuators.c
+$(TARGET).CFLAGS += -DACTUATORS=\"servos_ppm_hw.h\" -DSERVOS_PPM_MAT
+$(TARGET).srcs += $(SRC_ARCH)/servos_ppm_hw.c actuators.c
diff --git a/conf/autopilot/subsystems/shared/radio_control_ppm.makefile b/conf/autopilot/subsystems/shared/radio_control_ppm.makefile
index e5479f0e9e..6b2fdeab88 100644
--- a/conf/autopilot/subsystems/shared/radio_control_ppm.makefile
+++ b/conf/autopilot/subsystems/shared/radio_control_ppm.makefile
@@ -19,9 +19,8 @@ ifeq ($(NORADIO), False)
$(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_PPM
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control.c
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control/ppm.c
- ifneq ($(ARCH),jsbsim)
- $(TARGET).srcs += $(SRC_ARCH)/subsystems/radio_control/ppm_arch.c
- endif
+ $(TARGET).srcs += $(SRC_ARCH)/subsystems/radio_control/ppm_arch.c
+
ifeq ($(ARCH),stm32)
ap.CFLAGS += -DUSE_TIM2_IRQ
endif
diff --git a/conf/boards/booz_1.0.makefile b/conf/boards/booz_1.0.makefile
index 7e9184cf5c..1f56efef5b 100644
--- a/conf/boards/booz_1.0.makefile
+++ b/conf/boards/booz_1.0.makefile
@@ -25,11 +25,19 @@ RADIO_CONTROL_LINK = UART0
BARO_LED = 2
+ifndef MODEM_PORT
MODEM_PORT = UART1
+endif
+ifndef MODEM_BAUD
MODEM_BAUD = B57600
+endif
AHRS_ALIGNER_LED = 3
+ifndef GPS_PORT
GPS_PORT=UART0
+endif
+ifndef GPS_BAUD
GPS_BAUD=B38400
+endif
GPS_LED=4
diff --git a/conf/boards/classix.makefile b/conf/boards/classix.makefile
index 90ae9df340..79002ad107 100644
--- a/conf/boards/classix.makefile
+++ b/conf/boards/classix.makefile
@@ -22,7 +22,7 @@ LPC21ISP_XTAL = 12000
### default settings for classix
-GPS_BAUD = B38400
+GPS_BAUD = B38400
GPS_LED = none
# All targets on the TINY board run on the same processor achitecture
diff --git a/conf/boards/hb_1.1.makefile b/conf/boards/hb_1.1.makefile
index 16c134efc5..b8d0c3ae0a 100644
--- a/conf/boards/hb_1.1.makefile
+++ b/conf/boards/hb_1.1.makefile
@@ -22,8 +22,36 @@ SYS_TIME_LED = 1 # not used on rotorcraft, only for tests
RADIO_CONTROL_LINK = UART0
+ifndef MODEM_PORT
MODEM_PORT = UART0
+endif
+ifndef MODEM_BAUD
MODEM_BAUD = B57600
+endif
-GPS_PORT=UART1
-GPS_BAUD=B38400
+ifndef GPS_PORT
+GPS_PORT = UART1
+endif
+ifndef GPS_BAUD
+GPS_BAUD = B38400
+endif
+
+GPS_LED = 2
+
+ifndef ADC_IR1
+ADC_IR1 = 1
+ADC_IR1_CHAN = 0
+endif
+ifndef ADC_IR2
+ADC_IR2 = 2
+ADC_IR2_CHAN = 1
+endif
+ifndef ADC_IR3
+ADC_IR_TOP = 4
+ADC_IR_TOP_CHAN = 3
+endif
+ifndef ADC_IR_NB_SAMPLES
+ADC_IR_NB_SAMPLES = 16
+endif
+
+$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/lisa_l_1.0.makefile b/conf/boards/lisa_l_1.0.makefile
index a821a51298..0459e71ac0 100644
--- a/conf/boards/lisa_l_1.0.makefile
+++ b/conf/boards/lisa_l_1.0.makefile
@@ -41,13 +41,21 @@ RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT = UART3
RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT = UART5
RADIO_CONTROL_LED = 5
+ifndef MODEM_PORT
MODEM_PORT=UART2
+endif
+ifndef MODEM_BAUD
MODEM_BAUD=B57600
+endif
AHRS_ALIGNER_LED = 7
+ifndef GPS_PORT
GPS_PORT=UART1
+endif
+ifndef GPS_BAUD
GPS_BAUD=B38400
+endif
GPS_LED = 3
#
@@ -61,14 +69,6 @@ MAX_1168_DRDY_PORT_SOURCE = PortSourceGPIOD
#MAX_1168_DRDY_PORT = GPIOB
-#
-# definitions below were added to get fixedwing firmware to build
-#
-# modem is usualy connected there
-ifndef MODEM_UART_NR
-MODEM_UART_NR = 2
-endif
-
ifndef ADC_IR1
ADC_IR1 = 1
ADC_IR1_CHAN = 0
@@ -84,6 +84,3 @@ endif
ifndef ADC_IR_NB_SAMPLES
ADC_IR_NB_SAMPLES = 16
endif
-ifndef GPS_UART_NR
-GPS_UART_NR = 1
-endif
diff --git a/conf/boards/lisa_m_1.0.makefile b/conf/boards/lisa_m_1.0.makefile
index 89a1814674..78de8610ed 100644
--- a/conf/boards/lisa_m_1.0.makefile
+++ b/conf/boards/lisa_m_1.0.makefile
@@ -42,8 +42,12 @@ endif
#AHRS_ALIGNER_LED = 7
+ifndef GPS_PORT
GPS_PORT=UART1
+endif
+ifndef GPS_BAUD
GPS_BAUD=B38400
+endif
GPS_LED = none
#
@@ -57,13 +61,6 @@ MAX_1168_DRDY_PORT_SOURCE = PortSourceGPIOD
#MAX_1168_DRDY_PORT = GPIOB
-#
-# definitions below were added to get fixedwing firmware to build
-#
-# modem is usualy connected there
-ifndef MODEM_UART_NR
-MODEM_UART_NR = 2
-endif
ifndef ADC_IR1
ADC_IR1 = 1
@@ -80,6 +77,3 @@ endif
ifndef ADC_IR_NB_SAMPLES
ADC_IR_NB_SAMPLES = 16
endif
-ifndef GPS_UART_NR
-GPS_UART_NR = 1
-endif
diff --git a/conf/boards/pc.makefile b/conf/boards/pc.makefile
index 4e8976f4f4..df5c1bbe3c 100644
--- a/conf/boards/pc.makefile
+++ b/conf/boards/pc.makefile
@@ -8,10 +8,7 @@ ARCH=sim
BOARD = pc
BOARD_VERSION=
-
-# TODO: update board
-BOARD_CFG = \"tiny_sim.h\"
-
+BOARD_CFG = \"boards/tiny_sim.h\"
$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/tiny_0.99.makefile b/conf/boards/tiny_0.99.makefile
index 22e454ffcd..f3879c0b70 100644
--- a/conf/boards/tiny_0.99.makefile
+++ b/conf/boards/tiny_0.99.makefile
@@ -13,6 +13,8 @@ BOARD_VERSION=0.99
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-GPS_UART_NR = 1
+GPS_PORT = UART1
GPS_LED = none
-MODEM_UART_NR = 0
+MODEM_PORT = UART0
+
+ACTUATORS = actuators_4015
diff --git a/conf/boards/tiny_1.1.makefile b/conf/boards/tiny_1.1.makefile
index 538b7b186f..04cb4feaff 100644
--- a/conf/boards/tiny_1.1.makefile
+++ b/conf/boards/tiny_1.1.makefile
@@ -13,6 +13,8 @@ BOARD_VERSION=1.1
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-GPS_UART_NR = 1
+GPS_PORT = UART1
GPS_LED = none
-MODEM_UART_NR = 0
+MODEM_PORT = UART0
+
+ACTUATORS = actuators_4015
diff --git a/conf/boards/tiny_2.11.makefile b/conf/boards/tiny_2.11.makefile
index 9faf7301a9..33c35ec77c 100644
--- a/conf/boards/tiny_2.11.makefile
+++ b/conf/boards/tiny_2.11.makefile
@@ -21,11 +21,20 @@ LPC21ISP_XTAL = 12000
### default settings for tiny_2 and twog
-GPS_UART_NR = 0
+ifndef GPS_PORT
+GPS_PORT = UART0
+endif
+ifndef GPS_BAUD
GPS_BAUD = B38400
+endif
GPS_LED = 2
-MODEM_UART_NR = 1
+
+ifndef MODEM_PORT
+MODEM_PORT = UART1
+endif
+ifndef MODEM_BAUD
MODEM_BAUD = B57600
+endif
ADC_IR_TOP = ADC_0
ADC_IR1 = ADC_1
@@ -40,3 +49,4 @@ ADC_GENERIC_NB_SAMPLES = 16
# All targets on the TINY board run on the same processor achitecture
$(TARGET).ARCHDIR = $(ARCH)
+ACTUATORS = actuators_4017
diff --git a/conf/conf.xml.example b/conf/conf.xml.example
index 5ba76d762e..86c4d30d5d 100644
--- a/conf/conf.xml.example
+++ b/conf/conf.xml.example
@@ -90,7 +90,6 @@
settings="settings/tuning_ins.xml"
gui_color="blue"
/>
-
-
-
-
-
-
-
-
diff --git a/conf/control_panel.xml.example b/conf/control_panel.xml.example
index e97471def0..e9a2ea99a1 100644
--- a/conf/control_panel.xml.example
+++ b/conf/control_panel.xml.example
@@ -64,7 +64,7 @@
-
+
@@ -78,7 +78,16 @@
-
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/control_panel.xml.example.booz b/conf/control_panel.xml.example.booz
index fe52d43e0b..5ec2b32ed9 100644
--- a/conf/control_panel.xml.example.booz
+++ b/conf/control_panel.xml.example.booz
@@ -55,7 +55,7 @@
-
+
@@ -64,7 +64,6 @@
-
@@ -75,7 +74,6 @@
-
@@ -170,7 +168,7 @@
-
+
diff --git a/conf/flight_plans/basic_booz.xml b/conf/flight_plans/basic_booz.xml
index 434d3c9a5a..7719308239 100644
--- a/conf/flight_plans/basic_booz.xml
+++ b/conf/flight_plans/basic_booz.xml
@@ -1,6 +1,9 @@
+
+#include "autopilot.h"
+
diff --git a/conf/modules/adc_generic.xml b/conf/modules/adc_generic.xml
index bdcda58620..8f2917cf2b 100644
--- a/conf/modules/adc_generic.xml
+++ b/conf/modules/adc_generic.xml
@@ -2,8 +2,8 @@
@@ -14,8 +14,16 @@
-
-
+
+
+ifneq ($(ADC_CHANNEL_GENERIC1),)
+ap.CFLAGS += -DADC_CHANNEL_GENERIC1=$(ADC_CHANNEL_GENERIC1) -DUSE_$(ADC_CHANNEL_GENERIC1)
+endif
+
+ifneq ($(ADC_CHANNEL_GENERIC2),)
+ap.CFLAGS += -DADC_CHANNEL_GENERIC2=$(ADC_CHANNEL_GENERIC2) -DUSE_$(ADC_CHANNEL_GENERIC2)
+endif
+
+
-
diff --git a/conf/modules/airborne_ant_track.xml b/conf/modules/airborne_ant_track.xml
new file mode 100644
index 0000000000..c8cc079709
--- /dev/null
+++ b/conf/modules/airborne_ant_track.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/modules/airspeed_adc.xml b/conf/modules/airspeed_adc.xml
index b064967f15..5d2e68c51e 100644
--- a/conf/modules/airspeed_adc.xml
+++ b/conf/modules/airspeed_adc.xml
@@ -2,9 +2,9 @@
@@ -19,8 +19,8 @@
-
-
+
+
diff --git a/conf/modules/airspeed_ets.xml b/conf/modules/airspeed_ets.xml
index bc56326e73..e322cffc49 100644
--- a/conf/modules/airspeed_ets.xml
+++ b/conf/modules/airspeed_ets.xml
@@ -2,11 +2,11 @@
diff --git a/conf/modules/alt_srf08.xml b/conf/modules/alt_srf08.xml
index e2a8b3d41d..2bade5054d 100644
--- a/conf/modules/alt_srf08.xml
+++ b/conf/modules/alt_srf08.xml
@@ -12,6 +12,6 @@
-
+
diff --git a/conf/modules/baro_MS5534A.xml b/conf/modules/baro_MS5534A.xml
index 0863e5d9d9..2149d604bf 100644
--- a/conf/modules/baro_MS5534A.xml
+++ b/conf/modules/baro_MS5534A.xml
@@ -9,13 +9,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/conf/modules/baro_bmp.xml b/conf/modules/baro_bmp.xml
index 288036c05c..7a14118844 100644
--- a/conf/modules/baro_bmp.xml
+++ b/conf/modules/baro_bmp.xml
@@ -2,8 +2,8 @@
diff --git a/conf/modules/baro_ets.xml b/conf/modules/baro_ets.xml
index 7d2c9351ea..50f6a800d3 100644
--- a/conf/modules/baro_ets.xml
+++ b/conf/modules/baro_ets.xml
@@ -2,7 +2,7 @@
diff --git a/conf/modules/baro_scp.xml b/conf/modules/baro_scp.xml
index 8bb3c9d8b2..dc5390aad0 100644
--- a/conf/modules/baro_scp.xml
+++ b/conf/modules/baro_scp.xml
@@ -2,7 +2,7 @@
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/conf/modules/baro_scp_i2c.xml b/conf/modules/baro_scp_i2c.xml
index 972be683b7..5520670042 100644
--- a/conf/modules/baro_scp_i2c.xml
+++ b/conf/modules/baro_scp_i2c.xml
@@ -2,8 +2,8 @@
diff --git a/conf/modules/booz_cam.xml b/conf/modules/booz_cam.xml
index 72d3b371f6..e489b6e290 100644
--- a/conf/modules/booz_cam.xml
+++ b/conf/modules/booz_cam.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/conf/modules/booz_drop.xml b/conf/modules/booz_drop.xml
index 168936049f..79f805cf74 100644
--- a/conf/modules/booz_drop.xml
+++ b/conf/modules/booz_drop.xml
@@ -8,9 +8,9 @@
-
-
-
+
+
+
diff --git a/conf/modules/booz_extra_dl.xml b/conf/modules/booz_extra_dl.xml
index 4fb4cddd9e..7d2b1eb519 100644
--- a/conf/modules/booz_extra_dl.xml
+++ b/conf/modules/booz_extra_dl.xml
@@ -6,11 +6,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/conf/modules/booz_pwm.xml b/conf/modules/booz_pwm.xml
new file mode 100644
index 0000000000..2c5481c50c
--- /dev/null
+++ b/conf/modules/booz_pwm.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/modules/cam_point.xml b/conf/modules/cam_point.xml
index 1391379a27..811d3135a2 100644
--- a/conf/modules/cam_point.xml
+++ b/conf/modules/cam_point.xml
@@ -8,9 +8,9 @@
-
-
-
+
+
+
diff --git a/conf/modules/cam_roll.xml b/conf/modules/cam_roll.xml
index 7bb14e1b35..9037cc76f5 100644
--- a/conf/modules/cam_roll.xml
+++ b/conf/modules/cam_roll.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/conf/modules/demo_module.xml b/conf/modules/demo_module.xml
index b2f1a5b9a0..7fd7e31464 100644
--- a/conf/modules/demo_module.xml
+++ b/conf/modules/demo_module.xml
@@ -11,12 +11,12 @@
#Exemple of RAW makefile part
-
+
-
-
+
+
diff --git a/conf/modules/digital_cam.xml b/conf/modules/digital_cam.xml
index f03907a0b3..e190c57f90 100644
--- a/conf/modules/digital_cam.xml
+++ b/conf/modules/digital_cam.xml
@@ -6,11 +6,11 @@
# ap.CFLAGS += -DGPS_TRIGGERED_FUNCTION="dc_shoot_on_gps"
@@ -30,10 +30,10 @@
-
+
-
+
diff --git a/conf/modules/digital_cam_i2c.xml b/conf/modules/digital_cam_i2c.xml
index 17a91367ce..3fe59ff84a 100644
--- a/conf/modules/digital_cam_i2c.xml
+++ b/conf/modules/digital_cam_i2c.xml
@@ -14,15 +14,15 @@
-
-
-
+
+
+
-
+
diff --git a/conf/modules/enose.xml b/conf/modules/enose.xml
index a3017a58da..2d6c1d34ff 100644
--- a/conf/modules/enose.xml
+++ b/conf/modules/enose.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/conf/modules/humid_hih.xml b/conf/modules/humid_hih.xml
index c8c4de5257..e25558fea0 100644
--- a/conf/modules/humid_hih.xml
+++ b/conf/modules/humid_hih.xml
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/conf/modules/humid_sht_i2c.xml b/conf/modules/humid_sht_i2c.xml
index 415b5cb57b..949d3acf7c 100644
--- a/conf/modules/humid_sht_i2c.xml
+++ b/conf/modules/humid_sht_i2c.xml
@@ -2,7 +2,7 @@
diff --git a/conf/modules/infrared_adc.xml b/conf/modules/infrared_adc.xml
new file mode 100644
index 0000000000..d5fd02f078
--- /dev/null
+++ b/conf/modules/infrared_adc.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/modules/infrared_i2c.xml b/conf/modules/infrared_i2c.xml
index e5f68e2b3e..b73dd757d6 100644
--- a/conf/modules/infrared_i2c.xml
+++ b/conf/modules/infrared_i2c.xml
@@ -1,4 +1,5 @@
+
@@ -9,11 +10,12 @@
-
-
+
+
+
- sim.srcs += $(SRC_ARCH)/sim_ir.c
+
diff --git a/conf/modules/ins_vn100.xml b/conf/modules/ins_vn100.xml
index 09809157af..8ceda17cb8 100644
--- a/conf/modules/ins_vn100.xml
+++ b/conf/modules/ins_vn100.xml
@@ -6,7 +6,7 @@
-
+
diff --git a/conf/modules/ins_xsens_MTiG_Uart0.xml b/conf/modules/ins_xsens_MTiG_Uart0.xml
index 6d82eed2fd..aaa1261dd2 100644
--- a/conf/modules/ins_xsens_MTiG_Uart0.xml
+++ b/conf/modules/ins_xsens_MTiG_Uart0.xml
@@ -9,14 +9,14 @@
-
-
-
-
+
+
+
+
-
+
-
+
diff --git a/conf/modules/ins_xsens_MTiG_fixedwing.xml b/conf/modules/ins_xsens_MTiG_fixedwing.xml
index 05ca9d8154..27e67847cd 100644
--- a/conf/modules/ins_xsens_MTiG_fixedwing.xml
+++ b/conf/modules/ins_xsens_MTiG_fixedwing.xml
@@ -10,11 +10,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/conf/modules/ins_xsens_MTi_Uart0.xml b/conf/modules/ins_xsens_MTi_Uart0.xml
index ef2bd4e97a..c8911e24e2 100644
--- a/conf/modules/ins_xsens_MTi_Uart0.xml
+++ b/conf/modules/ins_xsens_MTi_Uart0.xml
@@ -8,13 +8,13 @@
-
-
-
+
+
+
-
+
-
+
diff --git a/conf/modules/lcd_dogm.xml b/conf/modules/lcd_dogm.xml
index 1a1e7518b0..c2092f89e5 100644
--- a/conf/modules/lcd_dogm.xml
+++ b/conf/modules/lcd_dogm.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/conf/modules/light.xml b/conf/modules/light.xml
index 8b5a8c9f1b..2860bc40bb 100644
--- a/conf/modules/light.xml
+++ b/conf/modules/light.xml
@@ -8,12 +8,12 @@
-
diff --git a/conf/modules/light_temt.xml b/conf/modules/light_temt.xml
index 3749fc7215..ddf62982e4 100644
--- a/conf/modules/light_temt.xml
+++ b/conf/modules/light_temt.xml
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/conf/modules/mag_micromag_fw.xml b/conf/modules/mag_micromag_fw.xml
index 11369dac34..65126faa0d 100644
--- a/conf/modules/mag_micromag_fw.xml
+++ b/conf/modules/mag_micromag_fw.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/conf/modules/max11040.xml b/conf/modules/max11040.xml
index 2c73114ee8..626fda2b5f 100644
--- a/conf/modules/max11040.xml
+++ b/conf/modules/max11040.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/conf/modules/module.dtd b/conf/modules/module.dtd
index 8845f1171a..33122841b8 100644
--- a/conf/modules/module.dtd
+++ b/conf/modules/module.dtd
@@ -8,11 +8,11 @@
-
-
-
-
+
+
+
+
+target CDATA #IMPLIED>
-
+
+
-
-
-
-
+dir CDATA #IMPLIED>
+
+
diff --git a/conf/modules/servo_switch.xml b/conf/modules/servo_switch.xml
index 683b13b46b..f6d93e2a34 100644
--- a/conf/modules/servo_switch.xml
+++ b/conf/modules/servo_switch.xml
@@ -10,9 +10,9 @@
diff --git a/conf/modules/sonar_maxbotix_booz.xml b/conf/modules/sonar_maxbotix_booz.xml
index ef490bfc93..ce23345d65 100644
--- a/conf/modules/sonar_maxbotix_booz.xml
+++ b/conf/modules/sonar_maxbotix_booz.xml
@@ -8,9 +8,9 @@
-
-
-
+
+
+
diff --git a/conf/modules/tcas.xml b/conf/modules/tcas.xml
index e7931a84cf..951ed06396 100644
--- a/conf/modules/tcas.xml
+++ b/conf/modules/tcas.xml
@@ -10,7 +10,7 @@
-
+
diff --git a/conf/modules/temp_temod.xml b/conf/modules/temp_temod.xml
index 86356fbf57..fbac1fb159 100644
--- a/conf/modules/temp_temod.xml
+++ b/conf/modules/temp_temod.xml
@@ -2,8 +2,8 @@
diff --git a/conf/modules/trig_test.xml b/conf/modules/trig_test.xml
index d8f358a648..0365fecb23 100644
--- a/conf/modules/trig_test.xml
+++ b/conf/modules/trig_test.xml
@@ -6,10 +6,10 @@
-
+
-
-
+
+
diff --git a/conf/modules/trigger_ext.xml b/conf/modules/trigger_ext.xml
index 192ba1d30e..4db3c1663a 100644
--- a/conf/modules/trigger_ext.xml
+++ b/conf/modules/trigger_ext.xml
@@ -8,12 +8,12 @@
-
+
-
-
-
-
+
+
+
+
diff --git a/conf/modules/twog_extra_dl.xml b/conf/modules/twog_extra_dl.xml
index a01f4539d2..636238baf9 100755
--- a/conf/modules/twog_extra_dl.xml
+++ b/conf/modules/twog_extra_dl.xml
@@ -6,10 +6,10 @@
-
-
-
-
+
+
+
+
diff --git a/conf/modules/vehicle_interface_overo_link.xml b/conf/modules/vehicle_interface_overo_link.xml
index 3d6d40915d..5535ff4ebb 100644
--- a/conf/modules/vehicle_interface_overo_link.xml
+++ b/conf/modules/vehicle_interface_overo_link.xml
@@ -13,14 +13,14 @@
ap.srcs += lisa/lisa_overo_link.c lisa/arch/stm32/lisa_overo_link_arch.c
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/conf/modules/wind_gfi.xml b/conf/modules/wind_gfi.xml
index 8989322f00..5db44c9348 100644
--- a/conf/modules/wind_gfi.xml
+++ b/conf/modules/wind_gfi.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/conf/modules/windturbine.xml b/conf/modules/windturbine.xml
index 1af8b9651f..5d01713af6 100644
--- a/conf/modules/windturbine.xml
+++ b/conf/modules/windturbine.xml
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/conf/radios/T9cap.xml b/conf/radios/T9cap.xml
old mode 100755
new mode 100644
diff --git a/conf/radios/mc22.xml b/conf/radios/mc22.xml
new file mode 100644
index 0000000000..43adfdd64a
--- /dev/null
+++ b/conf/radios/mc22.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/radios/vanguard.xml b/conf/radios/vanguard.xml
old mode 100755
new mode 100644
diff --git a/conf/settings/tuning_basic_ins.xml b/conf/settings/tuning_basic_ins.xml
new file mode 100644
index 0000000000..b052c9be53
--- /dev/null
+++ b/conf/settings/tuning_basic_ins.xml
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/settings/tuning_ins.xml b/conf/settings/tuning_ins.xml
index fb7ac75c5d..08250f98b9 100644
--- a/conf/settings/tuning_ins.xml
+++ b/conf/settings/tuning_ins.xml
@@ -32,6 +32,9 @@
+
+
+
@@ -41,7 +44,7 @@
-
+
diff --git a/conf/telemetry/default_fixedwing_imu.xml b/conf/telemetry/default_fixedwing_imu.xml
index fcf88d9dfb..c106da4e29 100644
--- a/conf/telemetry/default_fixedwing_imu.xml
+++ b/conf/telemetry/default_fixedwing_imu.xml
@@ -7,7 +7,7 @@
-
+
@@ -26,8 +26,8 @@
-
-
+
+
diff --git a/data/pictures/gcs_icons/bungee_launch.png b/data/pictures/gcs_icons/bungee_launch.png
new file mode 100644
index 0000000000..246f9832ed
Binary files /dev/null and b/data/pictures/gcs_icons/bungee_launch.png differ
diff --git a/data/pictures/gcs_icons/cam_lock.png b/data/pictures/gcs_icons/cam_lock.png
new file mode 100644
index 0000000000..2bd61ff8bc
Binary files /dev/null and b/data/pictures/gcs_icons/cam_lock.png differ
diff --git a/data/pictures/gcs_icons/cam_unlock.png b/data/pictures/gcs_icons/cam_unlock.png
new file mode 100644
index 0000000000..0079b59308
Binary files /dev/null and b/data/pictures/gcs_icons/cam_unlock.png differ
diff --git a/data/pictures/gcs_icons/decide_landing_dir.png b/data/pictures/gcs_icons/decide_landing_dir.png
new file mode 100644
index 0000000000..12df84bb18
Binary files /dev/null and b/data/pictures/gcs_icons/decide_landing_dir.png differ
diff --git a/data/pictures/gcs_icons/observe.png b/data/pictures/gcs_icons/observe.png
new file mode 100644
index 0000000000..dd6d6f9e94
Binary files /dev/null and b/data/pictures/gcs_icons/observe.png differ
diff --git a/data/pictures/gcs_icons/parachute.png b/data/pictures/gcs_icons/parachute.png
new file mode 100644
index 0000000000..06b7efba8f
Binary files /dev/null and b/data/pictures/gcs_icons/parachute.png differ
diff --git a/data/pictures/gcs_icons/target.png b/data/pictures/gcs_icons/target.png
new file mode 100644
index 0000000000..afafafe609
Binary files /dev/null and b/data/pictures/gcs_icons/target.png differ
diff --git a/data/srtm/Makefile b/data/srtm/Makefile
new file mode 100644
index 0000000000..0e24687031
--- /dev/null
+++ b/data/srtm/Makefile
@@ -0,0 +1,31 @@
+DATADIR = $(PAPARAZZI_HOME)/conf/srtm_data
+Q=@
+
+SRTMData: $(DATADIR)/Africa $(DATADIR)/Australia $(DATADIR)/Eurasia $(DATADIR)/Islands $(DATADIR)/North_America $(DATADIR)/South_America
+
+$(DATADIR):
+ mkdir $(DATADIR)
+
+$(DATADIR)/Africa: $(DATADIR)
+ wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)
+
+$(DATADIR)/Australia: $(DATADIR)
+ wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)
+
+$(DATADIR)/Eurasia: $(DATADIR)
+ wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)
+
+$(DATADIR)/Islands: $(DATADIR)
+ wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)
+
+$(DATADIR)/North_America: $(DATADIR)
+ wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)
+
+$(DATADIR)/South_America: $(DATADIR)
+ wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)
+
+.SUFFIXES: .hgt.zip
+
+%.hgt.zip: SRTMData
+ $(Q)wget -c -nv -N http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(shell grep -l $(@F) $(DATADIR)/* | sed -e s#$(DATADIR)/##)/$(@F)
+
diff --git a/debian/changelog.lenny b/debian/changelog.lenny
index 6a78c9aacf..55d3e0cb12 100644
--- a/debian/changelog.lenny
+++ b/debian/changelog.lenny
@@ -1,3 +1,10 @@
+paparazzi (3.3-1) unstable; urgency=low
+
+ * New build system with modules and subsystems
+ * Change dependency from subversion to git
+
+ -- Gautier Hattenberger Wed, 29 Dec 2010 12:49:00 +0100
+
paparazzi (3.2-10) unstable; urgency=low
* Dependencie over gpsd, libgps-dev, python-lxml, python-wxgtk2.8 added
diff --git a/debian/control.lenny b/debian/control.lenny
index 8abef20019..6587b5a8e3 100644
--- a/debian/control.lenny
+++ b/debian/control.lenny
@@ -1,15 +1,15 @@
Source: paparazzi
Section: extra
Priority: optional
-Maintainer: Pascal Brisset
+Maintainer: Gautier Hattenberger
Build-Depends: debhelper (>= 4.0.0)
Standards-Version: 3.6.1
Package: paparazzi-dev
Architecture: any
-Suggests: paparazzi-avr, paparazzi-arm7, eagle, gs-common, tetex-extra, dia-gnome, boa
-Depends: ivy-c-dev, ivy-c, ivy-ocaml, libxml-light-ocaml-dev, liblablgtk2-ocaml-dev, make, gcc, gnuplot, libgnomecanvas2-dev, bzip2, subversion, liblablgtk2-gnome-ocaml-dev, libusb-dev, speech-dispatcher, glade, gedit, imagemagick, libpcre3-dev, libocamlnet-ocaml-dev, meschach-dev | libmeschach-dev, ivy-python, gpsd, libgps-dev, python-lxml, python-wxgtk2.8
+Suggests: paparazzi-avr, paparazzi-arm7, eagle, gs-common, tetex-extra, dia-gnome, boa, gitk
+Depends: ivy-c-dev, ivy-c, ivy-ocaml, libxml-light-ocaml-dev, liblablgtk2-ocaml-dev, make, gcc, gnuplot, libgnomecanvas2-dev, bzip2, git-core, liblablgtk2-gnome-ocaml-dev, libusb-dev, speech-dispatcher, glade, gedit, imagemagick, libpcre3-dev, libocamlnet-ocaml-dev, meschach-dev | libmeschach-dev, ivy-python, gpsd, libgps-dev, python-lxml, python-wxgtk2.8
Description: Paparazzi Meta Package : common support
diff --git a/debian/paparazzi-bin.postinst b/debian/paparazzi-bin.postinst
index 6ae37e021d..83cbee528d 100755
--- a/debian/paparazzi-bin.postinst
+++ b/debian/paparazzi-bin.postinst
@@ -31,4 +31,4 @@ cd ${DESTDIR}/sw/supervision
${OCAMLC} -custom -I +xml-light -I +lablgtk2 -I ${DESTDIR}/sw/lib/ocaml unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma lablglade.cma lablgnomeui.cma gtkInit.cmo gtk_pc.cmo gtk_process.cmo pc_common.cmo pc_aircraft.cmo pc_control_panel.cmo paparazzicenter.cmo -o paparazzicenter
cd ${DESTDIR}/sw/tools
-${OCAMLC} -custom -I +xml-light -I +lablgtk2 -I ${DESTDIR}/sw/lib/ocaml unix.cma str.cma xml-light.cma ivy-ocaml.cma lib-pprz.cma fp_syntax.cmo fp_parser.cmo fp_lexer.cmo fp_proc.cmo gen_flight_plan.cmo -o gen_flight_plan.out
+${OCAMLC} -custom -I +xml-light -I +lablgtk2 -I ${DESTDIR}/sw/lib/ocaml unix.cma str.cma xml-light.cma ivy-ocaml.cma lib-pprz.cma fp_proc.cmo gen_flight_plan.cmo -o gen_flight_plan.out
diff --git a/debian/rules b/debian/rules
old mode 100644
new mode 100755
diff --git a/paparazzi.osx b/paparazzi.osx
deleted file mode 100755
index 7efa9dc9a6..0000000000
--- a/paparazzi.osx
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/opt/local/bin/ocamlrun /opt/local/bin/ocaml
-#load "unix.cma";;
-let (//) = Filename.concat
-let dirname = Filename.dirname Sys.argv.(0)
-let dirname = if Filename.is_relative dirname && dirname <> Filename.current_dir_name then Sys.getcwd () // dirname else dirname
-let env =
- Array.map (fun var ->
- let value = try Sys.getenv var with _ -> dirname in
- let value = if value = "." then Sys.getcwd () else value in
- Printf.sprintf "%s=%s" var value)
- [|"PAPARAZZI_SRC"; "PAPARAZZI_HOME"|]
-let com = dirname // "sw/supervision/paparazzicenter";;
-Sys.argv.(0) <- com;;
-let env = Array.append env (Unix.environment ());;
-Unix.execve com Sys.argv env
diff --git a/sw/simulator/launchsitl b/src/launchsitl
similarity index 96%
rename from sw/simulator/launchsitl
rename to src/launchsitl
index d6dbb69d89..261de6c477 100755
--- a/sw/simulator/launchsitl
+++ b/src/launchsitl
@@ -1,4 +1,4 @@
-#!/usr/bin/ocamlrun /usr/bin/ocaml
+#!OCAMLRUN OCAML
#load "unix.cma";;
let (//) = Filename.concat
let paparazzi_home =
diff --git a/paparazzi b/src/paparazzi
similarity index 94%
rename from paparazzi
rename to src/paparazzi
index cc39f72a8c..8895cccacb 100755
--- a/paparazzi
+++ b/src/paparazzi
@@ -1,4 +1,4 @@
-#!/usr/bin/ocamlrun /usr/bin/ocaml
+#!OCAMLRUN OCAML
#load "unix.cma";;
let (//) = Filename.concat
let dirname = Filename.dirname Sys.argv.(0)
diff --git a/sw/airborne/Makefile b/sw/airborne/Makefile
index adb2189087..f969cc7499 100644
--- a/sw/airborne/Makefile
+++ b/sw/airborne/Makefile
@@ -42,6 +42,14 @@ ifneq ($(MAKECMDGOALS),clean)
endif
endif
+# check for obsolete MODEM_UART_NR and GPS_UART_NR makefile vars
+ifdef GPS_UART_NR
+ $(error GPS_UART_NR is obsolete, please use GPS_PORT instead to define the Uart to use, e.g. )
+endif
+ifdef MODEM_UART_NR
+ $(error MODEM_UART_NR is obsolete, please use MODEM_PORT instead to define the Uart to use, e.g. )
+endif
+
$(TARGET).install : warn_conf
warn_conf :
diff --git a/sw/airborne/ap_downlink.h b/sw/airborne/ap_downlink.h
index a45945cf33..71f341c1b4 100644
--- a/sw/airborne/ap_downlink.h
+++ b/sw/airborne/ap_downlink.h
@@ -115,8 +115,8 @@
#define PERIODIC_SEND_SETTINGS(_chan) {}
#endif
-#if defined USE_INFRARED || USE_INFRARED_I2C
-#define PERIODIC_SEND_IR_SENSORS(_chan) DOWNLINK_SEND_IR_SENSORS(_chan, &infrared.ir1, &infrared.ir2, &infrared.pitch, &infrared.roll, &infrared.top);
+#if defined USE_INFRARED || USE_INFRARED_TELEMETRY
+#define PERIODIC_SEND_IR_SENSORS(_chan) DOWNLINK_SEND_IR_SENSORS(_chan, &infrared.value.ir1, &infrared.value.ir2, &infrared.pitch, &infrared.roll, &infrared.top);
#else
#define PERIODIC_SEND_IR_SENSORS(_chan) ;
#endif
@@ -142,8 +142,8 @@
#include "subsystems/imu.h"
#define PERIODIC_SEND_IMU_ACCEL_RAW(_chan) { DOWNLINK_SEND_IMU_ACCEL_RAW(_chan, &imu.accel_unscaled.x, &imu.accel_unscaled.y, &imu.accel_unscaled.z)}
#define PERIODIC_SEND_IMU_GYRO_RAW(_chan) { DOWNLINK_SEND_IMU_GYRO_RAW(_chan, &imu.gyro_unscaled.p, &imu.gyro_unscaled.q, &imu.gyro_unscaled.r)}
-#define PERIODIC_SEND_IMU_ACCEL(_chan) { DOWNLINK_SEND_IMU_ACCEL_RAW(_chan, &imu.accel.x, &imu.accel.y, &imu.accel.z)}
-#define PERIODIC_SEND_IMU_GYRO(_chan) { DOWNLINK_SEND_IMU_GYRO_RAW(_chan, &imu.gyro.p, &imu.gyro.q, &imu.gyro.r)}
+#define PERIODIC_SEND_IMU_ACCEL(_chan) { DOWNLINK_SEND_IMU_ACCEL(_chan, &imu.accel.x, &imu.accel.y, &imu.accel.z)}
+#define PERIODIC_SEND_IMU_GYRO(_chan) { DOWNLINK_SEND_IMU_GYRO(_chan, &imu.gyro.p, &imu.gyro.q, &imu.gyro.r)}
#else
#define PERIODIC_SEND_IMU_ACCEL_RAW(_chan) {}
#define PERIODIC_SEND_IMU_GYRO_RAW(_chan) {}
diff --git a/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.c b/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.c
index 7d8541121d..378337c50b 100644
--- a/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.c
+++ b/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.c
@@ -318,6 +318,10 @@ void i2c1_hw_init ( void ) {
#endif /* USE_I2C1 */
+bool_t i2c_idle(struct i2c_periph* p) {
+ return p->status == I2CIdle;
+}
+
bool_t i2c_submit(struct i2c_periph* p, struct i2c_transaction* t) {
uint8_t idx;
diff --git a/sw/airborne/booz/arch/lpc21/booz2_pwm_hw.c b/sw/airborne/arch/lpc21/modules/core/booz_pwm_arch.c
similarity index 94%
rename from sw/airborne/booz/arch/lpc21/booz2_pwm_hw.c
rename to sw/airborne/arch/lpc21/modules/core/booz_pwm_arch.c
index 5c0081cab5..2dbf3c22ef 100644
--- a/sw/airborne/booz/arch/lpc21/booz2_pwm_hw.c
+++ b/sw/airborne/arch/lpc21/modules/core/booz_pwm_arch.c
@@ -1,7 +1,7 @@
/*
* $Id: $
*
- * Copyright (C) 2007 ENAC
+ * Copyright (C) 2011 ENAC
*
* This file is part of paparazzi.
*
@@ -22,12 +22,12 @@
*
*/
-#include "booz2_pwm_hw.h"
+#include "modules/core/booz_pwm_arch.h"
#define PWM_PERIOD SYS_TICS_OF_USEC(20000)
#define PWM_DUTY SYS_TICS_OF_USEC(1500)
-void booz2_pwm_init_hw( void ) {
+void booz_pwm_init_arch( void ) {
/* start PWM5 */
/* select P0.21 as PWM5 */
diff --git a/sw/airborne/booz/arch/lpc21/booz2_pwm_hw.h b/sw/airborne/arch/lpc21/modules/core/booz_pwm_arch.h
similarity index 79%
rename from sw/airborne/booz/arch/lpc21/booz2_pwm_hw.h
rename to sw/airborne/arch/lpc21/modules/core/booz_pwm_arch.h
index f3289f41e4..b191caf29f 100644
--- a/sw/airborne/booz/arch/lpc21/booz2_pwm_hw.h
+++ b/sw/airborne/arch/lpc21/modules/core/booz_pwm_arch.h
@@ -1,7 +1,7 @@
/*
* $Id: $
*
- * Copyright (C) 2007 ENAC
+ * Copyright (C) 2011 ENAC
*
* This file is part of paparazzi.
*
@@ -22,25 +22,25 @@
*
*/
-#ifndef BOOZ2_PWM_HW_H
-#define BOOZ2_PWM_HW_H
+#ifndef BOOZ_PWM_ARCH_H
+#define BOOZ_PWM_ARCH_H
#include "std.h"
#include "sys_time.h"
-extern void booz2_pwm_init_hw(void);
+extern void booz_pwm_init_arch(void);
// Default PWM is PWM0
-#define Booz2SetPwmValue(_v) Booz2SetPwm0Value(_v)
+#define BoozSetPwmValue(_v) BoozSetPwm0Value(_v)
-#define Booz2SetPwm0Value(_v) { \
+#define BoozSetPwm0Value(_v) { \
PWMMR5 = SYS_TICS_OF_USEC(_v); \
PWMLER = PWMLER_LATCH5; \
}
-#define Booz2SetPwm1Value(_v) { \
+#define BoozSetPwm1Value(_v) { \
PWMMR2 = SYS_TICS_OF_USEC(_v); \
PWMLER = PWMLER_LATCH2; \
}
-#endif /* BOOZ2_PWM_HW_H */
+#endif /* BOOZ_PWM_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/peripherals/max1168_arch.c b/sw/airborne/arch/lpc21/peripherals/max1168_arch.c
index 14a45313da..060fafcde8 100644
--- a/sw/airborne/arch/lpc21/peripherals/max1168_arch.c
+++ b/sw/airborne/arch/lpc21/peripherals/max1168_arch.c
@@ -59,6 +59,7 @@ void max1168_read( void ) {
SSP_DisableRti();
SSP_Enable();
/* write control byte - wait EOC on extint */
+ /* use internal reference and clock, sequentially scan channels 0-7 */
SSPDR = (1 << 0 | 1 << 3 | 7 << 5) << 8;
max1168_status = STA_MAX1168_SENDING_REQ;
diff --git a/sw/airborne/arch/lpc21/peripherals/ms2001_arch.c b/sw/airborne/arch/lpc21/peripherals/ms2001_arch.c
deleted file mode 100644
index a75530ac40..0000000000
--- a/sw/airborne/arch/lpc21/peripherals/ms2001_arch.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* PNI ms2001 connected on SPI1 */
-/*
- IMU b2
- SS on P1.28
- RESET on P1.19
- DRDY on P0.30 ( EINT3)
-*/
-
-#include "peripherals/ms2001.h"
-
-volatile uint8_t ms2001_cur_axe;
-
-static void EXTINT_ISR(void) __attribute__((naked));
-
-void ms2001_arch_init( void ) {
-
- ms2001_cur_axe = 0;
-
- /* configure SS pin */
- Ms2001Unselect(); /* pin idles high */
- SetBit(MS2001_SS_IODIR, MS2001_SS_PIN); /* pin is output */
-
- /* configure RESET pin */
- Ms2001Reset(); /* pin idles low */
- SetBit(MS2001_RESET_IODIR, MS2001_RESET_PIN); /* pin is output */
-
- /* configure DRDY pin */
- /* connected pin to EXINT */
- MS2001_DRDY_PINSEL |= MS2001_DRDY_PINSEL_VAL << MS2001_DRDY_PINSEL_BIT;
- SetBit(EXTMODE, MS2001_DRDY_EINT); /* EINT is edge trigered */
- SetBit(EXTPOLAR,MS2001_DRDY_EINT); /* EINT is trigered on rising edge */
- SetBit(EXTINT,MS2001_DRDY_EINT); /* clear pending EINT */
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT( MS2001_DRDY_VIC_IT ); /* select EINT as IRQ source */
- VICIntEnable = VIC_BIT( MS2001_DRDY_VIC_IT ); /* enable it */
- _VIC_CNTL(MS2001_DRDY_VIC_SLOT) = VIC_ENABLE | MS2001_DRDY_VIC_IT;
- _VIC_ADDR(MS2001_DRDY_VIC_SLOT) = (uint32_t)EXTINT_ISR; // address of the ISR
-
-}
-
-void EXTINT_ISR(void) {
- ISR_ENTRY();
- /* no, we won't do anything asynchronously, so just notify */
- ms2001_status = MS2001_GOT_EOC;
- /* clear EINT */
- EXTINT = (1< // for abs
-
-#include "std.h"
-#include "LPC21xx.h"
-#include "interrupt_hw.h"
-
-#include "ssp_hw.h"
-#include BOARD_CONFIG
-
-#include "generated/airframe.h"
-
-
-
-extern volatile uint8_t ms2001_cur_axe;
-
-#define Ms2001Select() SetBit(MS2001_SS_IOCLR,MS2001_SS_PIN)
-#define Ms2001Unselect() SetBit(MS2001_SS_IOSET,MS2001_SS_PIN)
-
-#define Ms2001Reset() SetBit(MS2001_RESET_IOCLR,MS2001_RESET_PIN)
-#define Ms2001Set() SetBit(MS2001_RESET_IOSET,MS2001_RESET_PIN)
-
-#define Ms2001OnSpiIt() { \
- switch (ms2001_status) { \
- case MS2001_SENDING_REQ: \
- { \
- /* read dummy control byte reply */ \
- uint8_t foo __attribute__ ((unused)) = SSPDR; \
- ms2001_status = MS2001_WAITING_EOC; \
- Ms2001Unselect(); \
- SSP_ClearRti(); \
- SSP_DisableRti(); \
- SSP_Disable(); \
- } \
- break; \
- case MS2001_READING_RES: \
- { \
- int16_t new_val; \
- new_val = SSPDR << 8; \
- new_val += SSPDR; \
- if (abs(new_val) < 2000) \
- ms2001_values[ms2001_cur_axe] = new_val; \
- Ms2001Unselect(); \
- SSP_ClearRti(); \
- SSP_DisableRti(); \
- SSP_Disable(); \
- ms2001_cur_axe++; \
- if (ms2001_cur_axe > 2) { \
- ms2001_cur_axe = 0; \
- ms2001_status = MS2001_DATA_AVAILABLE; \
- } \
- else \
- ms2001_status = MS2001_IDLE; \
- } \
- break; \
- } \
- }
-
-
-#define Ms2001SendReq() { \
- Ms2001Select(); \
- ms2001_status = MS2001_SENDING_REQ; \
- Ms2001Set(); \
- SSP_ClearRti(); \
- SSP_EnableRti(); \
- Ms2001Reset(); \
- uint8_t control_byte = (ms2001_cur_axe+1) << 0 | \
- MS2001_DIVISOR << 4; \
- SSP_Send(control_byte); \
- SSP_Enable(); \
- }
-
-#define Ms2001ReadRes() { \
- ms2001_status = MS2001_READING_RES; \
- Ms2001Select(); \
- /* trigger 2 bytes read */ \
- SSP_Send(0); \
- SSP_Send(0); \
- SSP_Enable(); \
- SSP_ClearRti(); \
- SSP_EnableRti(); \
- }
-
-
-
-#endif /* MS2001_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/peripherals/ms2100_arch.c b/sw/airborne/arch/lpc21/peripherals/ms2100_arch.c
new file mode 100644
index 0000000000..ec22b64b6c
--- /dev/null
+++ b/sw/airborne/arch/lpc21/peripherals/ms2100_arch.c
@@ -0,0 +1,50 @@
+/* PNI ms2100 connected on SPI1 */
+/*
+ IMU b2
+ SS on P1.28
+ RESET on P1.19
+ DRDY on P0.30 ( EINT3)
+*/
+
+#include "peripherals/ms2100.h"
+
+volatile uint8_t ms2100_cur_axe;
+
+static void EXTINT_ISR(void) __attribute__((naked));
+
+void ms2100_arch_init( void ) {
+
+ ms2100_cur_axe = 0;
+
+ /* configure SS pin */
+ Ms2001Unselect(); /* pin idles high */
+ SetBit(MS2100_SS_IODIR, MS2100_SS_PIN); /* pin is output */
+
+ /* configure RESET pin */
+ Ms2001Reset(); /* pin idles low */
+ SetBit(MS2100_RESET_IODIR, MS2100_RESET_PIN); /* pin is output */
+
+ /* configure DRDY pin */
+ /* connected pin to EXINT */
+ MS2100_DRDY_PINSEL |= MS2100_DRDY_PINSEL_VAL << MS2100_DRDY_PINSEL_BIT;
+ SetBit(EXTMODE, MS2100_DRDY_EINT); /* EINT is edge trigered */
+ SetBit(EXTPOLAR,MS2100_DRDY_EINT); /* EINT is trigered on rising edge */
+ SetBit(EXTINT,MS2100_DRDY_EINT); /* clear pending EINT */
+
+ /* initialize interrupt vector */
+ VICIntSelect &= ~VIC_BIT( MS2100_DRDY_VIC_IT ); /* select EINT as IRQ source */
+ VICIntEnable = VIC_BIT( MS2100_DRDY_VIC_IT ); /* enable it */
+ _VIC_CNTL(MS2100_DRDY_VIC_SLOT) = VIC_ENABLE | MS2100_DRDY_VIC_IT;
+ _VIC_ADDR(MS2100_DRDY_VIC_SLOT) = (uint32_t)EXTINT_ISR; // address of the ISR
+
+}
+
+void EXTINT_ISR(void) {
+ ISR_ENTRY();
+ /* no, we won't do anything asynchronously, so just notify */
+ ms2100_status = MS2100_GOT_EOC;
+ /* clear EINT */
+ EXTINT = (1< // for abs
+
+#include "std.h"
+#include "LPC21xx.h"
+#include "interrupt_hw.h"
+
+#include "ssp_hw.h"
+#include BOARD_CONFIG
+
+#include "generated/airframe.h"
+
+
+
+extern volatile uint8_t ms2100_cur_axe;
+
+#define Ms2001Select() SetBit(MS2100_SS_IOCLR,MS2100_SS_PIN)
+#define Ms2001Unselect() SetBit(MS2100_SS_IOSET,MS2100_SS_PIN)
+
+#define Ms2001Reset() SetBit(MS2100_RESET_IOCLR,MS2100_RESET_PIN)
+#define Ms2001Set() SetBit(MS2100_RESET_IOSET,MS2100_RESET_PIN)
+
+#define Ms2001OnSpiInt() { \
+ switch (ms2100_status) { \
+ case MS2100_SENDING_REQ: \
+ { \
+ /* read dummy control byte reply */ \
+ uint8_t foo __attribute__ ((unused)) = SSPDR; \
+ ms2100_status = MS2100_WAITING_EOC; \
+ Ms2001Unselect(); \
+ SSP_ClearRti(); \
+ SSP_DisableRti(); \
+ SSP_Disable(); \
+ } \
+ break; \
+ case MS2100_READING_RES: \
+ { \
+ int16_t new_val; \
+ new_val = SSPDR << 8; \
+ new_val += SSPDR; \
+ if (abs(new_val) < 2000) \
+ ms2100_values[ms2100_cur_axe] = new_val; \
+ Ms2001Unselect(); \
+ SSP_ClearRti(); \
+ SSP_DisableRti(); \
+ SSP_Disable(); \
+ ms2100_cur_axe++; \
+ if (ms2100_cur_axe > 2) { \
+ ms2100_cur_axe = 0; \
+ ms2100_status = MS2100_DATA_AVAILABLE; \
+ } \
+ else \
+ ms2100_status = MS2100_IDLE; \
+ } \
+ break; \
+ } \
+ }
+
+
+#define Ms2001SendReq() { \
+ Ms2001Select(); \
+ ms2100_status = MS2100_SENDING_REQ; \
+ Ms2001Set(); \
+ SSP_ClearRti(); \
+ SSP_EnableRti(); \
+ Ms2001Reset(); \
+ uint8_t control_byte = (ms2100_cur_axe+1) << 0 | \
+ MS2100_DIVISOR << 4; \
+ SSP_Send(control_byte); \
+ SSP_Enable(); \
+ }
+
+#define Ms2001ReadRes() { \
+ ms2100_status = MS2100_READING_RES; \
+ Ms2001Select(); \
+ /* trigger 2 bytes read */ \
+ SSP_Send(0); \
+ SSP_Send(0); \
+ SSP_Enable(); \
+ SSP_ClearRti(); \
+ SSP_EnableRti(); \
+ }
+
+
+
+#endif /* MS2100_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.c b/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.c
index 037196de75..0b98aee11e 100644
--- a/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.c
+++ b/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.c
@@ -23,11 +23,9 @@
#include "subsystems/imu.h"
+int imu_overrun = 0;
volatile uint8_t imu_ssp_status;
static void SSP_ISR(void) __attribute__((naked));
-#if 0
-static inline bool_t isr_try_mag(void);
-#endif
/* SSPCR0 settings */
#define SSP_DDS8 0x07 << 0 /* data size : 8 bits */
@@ -84,7 +82,11 @@ void imu_b2_arch_init(void) {
void imu_periodic(void) {
// check ssp idle
- // ASSERT((imu_status == IMU_STA_IDLE), DEBUG_IMU, IMU_ERR_OVERUN);
+ if (imu_ssp_status != IMU_SSP_STA_IDLE)
+ {
+ imu_overrun++;
+ return; //, DEBUG_IMU, IMU_ERR_OVERUN);
+ }
// setup 16 bits
ImuSetSSP16bits();
@@ -99,91 +101,65 @@ void imu_periodic(void) {
-#include "led.h"
-
-#if 0
-
-
-static inline bool_t isr_try_mag(void) {
- switch (micromag_status) {
- case MS2001_IDLE :
- ImuSetSSP8bits();
- Ms2001SendReq();
- return TRUE;
- case MS2001_GOT_EOC:
- ImuSetSSP8bits();
- Ms2001ReadRes();
- return TRUE;
- }
- return FALSE;
-}
+#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
static void SSP_ISR(void) {
- ISR_ENTRY();
+ ISR_ENTRY();
- switch (imu_ssp_status) {
- case IMU_SSP_STA_BUSY_MAX1168:
- Max1168OnSpiInt();
- if (isr_try_mag())
- imu_ssp_status = IMU_SSP_STA_BUSY_MS2100;
- else
- imu_ssp_status = IMU_SSP_STA_IDLE;
- break;
- case IMU_SSP_STA_BUSY_MS2100:
- Ms2001OnSpiIt();
- imu_ssp_status = IMU_SSP_STA_IDLE;
- break;
- default:
- // spurious interrupt
- LED_ON(1);
- }
+ switch (imu_ssp_status) {
+ case IMU_SSP_STA_BUSY_MAX1168:
+ Max1168OnSpiInt();
+ if (ms2100_status == MS2100_IDLE || ms2100_status == MS2100_GOT_EOC) {
+ ImuSetSSP8bits();
+ if (ms2100_status == MS2100_IDLE) {
+ Ms2001SendReq();
+ }
+ else { /* MS2100_GOT_EOC */
+ Ms2001ReadRes();
+ }
+ imu_ssp_status = IMU_SSP_STA_BUSY_MS2100;
+ }
+ else {
+ imu_ssp_status = IMU_SSP_STA_IDLE;
+ }
+ break;
+ case IMU_SSP_STA_BUSY_MS2100:
+ Ms2001OnSpiInt();
+ if (ms2100_status == MS2100_IDLE) {
+ Ms2001SendReq();
+ imu_ssp_status = IMU_SSP_STA_BUSY_MS2100;
+ }
+ else
+ imu_ssp_status = IMU_SSP_STA_IDLE;
+ break;
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-#endif
-
-
-static void SSP_ISR(void) {
- ISR_ENTRY();
-
- switch (imu_ssp_status) {
- case IMU_SSP_STA_BUSY_MAX1168:
- Max1168OnSpiInt();
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2001
- if (ms2001_status == MS2001_IDLE || ms2001_status == MS2001_GOT_EOC) {
- ImuSetSSP8bits();
- if (ms2001_status == MS2001_IDLE) {
- Ms2001SendReq();
- }
- else { /* MS2001_GOT_EOC */
- Ms2001ReadRes();
- }
- imu_ssp_status = IMU_SSP_STA_BUSY_MS2100;
- }
- else {
-#endif
- imu_ssp_status = IMU_SSP_STA_IDLE;
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2001
- }
-#endif
- break;
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2001
- case IMU_SSP_STA_BUSY_MS2100:
- Ms2001OnSpiIt();
- if (ms2001_status == MS2001_IDLE) {
- Ms2001SendReq();
- imu_ssp_status = IMU_SSP_STA_BUSY_MS2100;
- }
- else
- imu_ssp_status = IMU_SSP_STA_IDLE;
- break;
-#endif
// default:
// spurious interrupt
// FIXME LED_ON(1);
- }
+ }
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
+ VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
+ ISR_EXIT();
}
+
+#else //no IMU_B2_MAG_MS2100
+
+static void SSP_ISR(void) {
+ ISR_ENTRY();
+
+ switch (imu_ssp_status) {
+ case IMU_SSP_STA_BUSY_MAX1168:
+ Max1168OnSpiInt();
+ imu_ssp_status = IMU_SSP_STA_IDLE;
+ break;
+
+ // default:
+ // spurious interrupt
+ // FIXME LED_ON(1);
+ }
+
+ VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
+ ISR_EXIT();
+}
+
+#endif //no IMU_B2_MAG_MS2100
diff --git a/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.h b/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.h
index d54b22452a..dce131ff6e 100644
--- a/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.h
+++ b/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.h
@@ -45,6 +45,8 @@
#define IMU_SSP_STA_BUSY_MAX1168 1
#define IMU_SSP_STA_BUSY_MS2100 2
extern volatile uint8_t imu_ssp_status;
+extern int imu_overrun;
+
diff --git a/sw/airborne/arch/lpc21/uart_tunnel.c b/sw/airborne/arch/lpc21/uart_tunnel.c
index 04fd72dce1..9f4bbd5ef2 100644
--- a/sw/airborne/arch/lpc21/uart_tunnel.c
+++ b/sw/airborne/arch/lpc21/uart_tunnel.c
@@ -3,7 +3,7 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "led.h"
#define TXD0_PIN 0
@@ -14,7 +14,7 @@
int main (int argc, char** argv) {
int tx=0, rx=0;
int tx_shadow=1, rx_shadow=1;
- hw_init();
+ mcu_init();
led_init();
LED_ON(1);
diff --git a/sw/airborne/arch/lpc21/usb_tunnel.c b/sw/airborne/arch/lpc21/usb_tunnel.c
index f7f324da24..aeef32b1dc 100644
--- a/sw/airborne/arch/lpc21/usb_tunnel.c
+++ b/sw/airborne/arch/lpc21/usb_tunnel.c
@@ -53,7 +53,7 @@ int main( void ) {
VCOM_init();
#endif
- int_enable();
+ mcu_int_enable();
LED_ON(3);
diff --git a/sw/airborne/arch/lpc21/vic_slots.txt b/sw/airborne/arch/lpc21/vic_slots.txt
index f289a4f48a..c75e66ef1e 100644
--- a/sw/airborne/arch/lpc21/vic_slots.txt
+++ b/sw/airborne/arch/lpc21/vic_slots.txt
@@ -6,7 +6,7 @@
9 I2C0_VIC_SLOT
I2C1_VIC_SLOT
11 SSP_VIC_SLOT
-11 MS2001_DRDY_VIC_SLOT
+11 MS2100_DRDY_VIC_SLOT
12 MICROMAG_DRDY_VIC_SLOT
12 MAX11040_DRDY_VIC_SLOT
diff --git a/sw/airborne/arch/sim/mcu_periph/i2c_arch.c b/sw/airborne/arch/sim/mcu_periph/i2c_arch.c
index cd16065446..ceb58123b6 100644
--- a/sw/airborne/arch/sim/mcu_periph/i2c_arch.c
+++ b/sw/airborne/arch/sim/mcu_periph/i2c_arch.c
@@ -2,4 +2,5 @@
void i2c_hw_init ( void ) {}
+bool_t i2c_idle(struct i2c_periph *p __attribute__ ((unused))) { return TRUE; }
bool_t i2c_submit(struct i2c_periph* p __attribute__ ((unused)), struct i2c_transaction* t __attribute__ ((unused))) { return TRUE;}
diff --git a/sw/airborne/booz/arch/sim/booz2_pwm_hw.c b/sw/airborne/arch/sim/modules/core/booz_pwm_arch.c
similarity index 91%
rename from sw/airborne/booz/arch/sim/booz2_pwm_hw.c
rename to sw/airborne/arch/sim/modules/core/booz_pwm_arch.c
index 1ff53d6faa..e3768ca9c9 100644
--- a/sw/airborne/booz/arch/sim/booz2_pwm_hw.c
+++ b/sw/airborne/arch/sim/modules/core/booz_pwm_arch.c
@@ -22,8 +22,8 @@
*
*/
-#include "booz2_pwm_hw.h"
+#include "modules/core/booz_pwm_arch.h"
-void booz2_pwm_init_hw( void ) {}
+void booz_pwm_init_arch( void ) {}
diff --git a/sw/airborne/arch/sim/modules/core/booz_pwm_arch.h b/sw/airborne/arch/sim/modules/core/booz_pwm_arch.h
new file mode 100644
index 0000000000..d3d5229b99
--- /dev/null
+++ b/sw/airborne/arch/sim/modules/core/booz_pwm_arch.h
@@ -0,0 +1,36 @@
+/*
+ * $Id: $
+ *
+ * Copyright (C) 2007 ENAC
+ *
+ * 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, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef BOOZ_PWM_ARCH_H
+#define BOOZ_PWM_ARCH_H
+
+extern void booz_pwm_init_arch(void);
+
+// Default PWM is PWM0
+#define BoozSetPwmValue(_v) BoozSetPwm0Value(_v)
+
+#define BoozSetPwm0Value(_v) {}
+#define BoozSetPwm1Value(_v) {}
+
+#endif /* BOOZ_PWM_ARCH_H */
diff --git a/sw/airborne/arch/sim/sim_ir.c b/sw/airborne/arch/sim/sim_ir.c
index 88441205f8..1ec7884faf 100644
--- a/sw/airborne/arch/sim/sim_ir.c
+++ b/sw/airborne/arch/sim/sim_ir.c
@@ -21,7 +21,8 @@ value set_ir(value roll __attribute__ ((unused)),
value top __attribute__ ((unused)),
value air_speed
) {
-#if defined USE_INFRARED || USE_INFRARED_I2C
+ // INFRARED_TELEMETRY : Stupid hack to use with modules
+#if defined USE_INFRARED || USE_INFRARED_TELEMETRY
infrared.roll = Int_val(roll);
infrared.pitch = Int_val(front);
infrared.top = Int_val(top);
diff --git a/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.c b/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.c
index f583072488..a8035a810f 100644
--- a/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.c
+++ b/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.c
@@ -47,11 +47,11 @@ void imu_feed_gyro_accel(void) {
void imu_feed_mag(void) {
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2001
- ms2001_values[IMU_MAG_X_CHAN] = sensors.mag.value.x;
- ms2001_values[IMU_MAG_Y_CHAN] = sensors.mag.value.y;
- ms2001_values[IMU_MAG_Z_CHAN] = sensors.mag.value.z;
- ms2001_status = MS2001_DATA_AVAILABLE;
+#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
+ ms2100_values[IMU_MAG_X_CHAN] = sensors.mag.value.x;
+ ms2100_values[IMU_MAG_Y_CHAN] = sensors.mag.value.y;
+ ms2100_values[IMU_MAG_Z_CHAN] = sensors.mag.value.z;
+ ms2100_status = MS2100_DATA_AVAILABLE;
#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601
ami601_values[IMU_MAG_X_CHAN] = sensors.mag.value.x;
ami601_values[IMU_MAG_Y_CHAN] = sensors.mag.value.y;
diff --git a/sw/airborne/arch/stm32/mcu_periph/i2c_arch.c b/sw/airborne/arch/stm32/mcu_periph/i2c_arch.c
index 2099326c6c..6cdd1a310b 100644
--- a/sw/airborne/arch/stm32/mcu_periph/i2c_arch.c
+++ b/sw/airborne/arch/stm32/mcu_periph/i2c_arch.c
@@ -42,7 +42,6 @@ struct i2c_errors i2c1_errors;
#define I2C1_ABORT_AND_RESET() { \
struct i2c_transaction* trans2 = i2c1.trans[i2c1.trans_extract_idx]; \
trans2->status = I2CTransFailed; \
- i2c1.status = I2CFailed; \
I2C_ITConfig(I2C1, I2C_IT_EVT | I2C_IT_BUF | I2C_IT_ERR, DISABLE); \
I2C_Cmd(I2C1, DISABLE); \
I2C_DeInit(I2C1); \
@@ -275,7 +274,7 @@ void i2c2_hw_init(void) {
/* Configure and enable I2C2 event interrupt --------------------------------*/
NVIC_InitStructure.NVIC_IRQChannel = I2C2_EV_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
- NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
+ NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
@@ -349,14 +348,34 @@ static inline void on_status_restart_requested(struct i2c_transaction* trans, ui
#define I2C2_ABORT_AND_RESET() { \
struct i2c_transaction* trans = i2c2.trans[i2c2.trans_extract_idx]; \
- trans->status = I2CTransFailed; \
+ trans->status = I2CTransFailed; \
I2C_ITConfig(I2C2, I2C_IT_EVT | I2C_IT_BUF | I2C_IT_ERR, DISABLE); \
+ I2C_ClearITPendingBit(I2C2, 0xFF); \
I2C_Cmd(I2C2, DISABLE); \
I2C_DeInit(I2C2); \
- I2C_Cmd(I2C2, ENABLE); \
I2C2_APPLY_CONFIG(); \
+ I2C_Cmd(I2C2, ENABLE); \
+ /* do something to unstuck the bus */ \
+ GPIO_InitTypeDef GPIO_InitStructure; \
+ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; \
+ GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz; \
+ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; \
+ GPIO_Init(GPIOB, &GPIO_InitStructure); \
+ for (__IO int i = 0; i < 10; i++) {\
+ for (__IO int j = 0; j < 50; j++); \
+ GPIOB->BSRR = GPIO_Pin_10; \
+ for (__IO int j = 0; j < 50; j++); \
+ GPIOB->BRR = GPIO_Pin_10; \
+ } \
+ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD; \
+ GPIO_Init(GPIOB, &GPIO_InitStructure); \
+ I2C_Cmd(I2C2, DISABLE); \
+ I2C_DeInit(I2C2); \
+ I2C2_APPLY_CONFIG(); \
+ I2C_Cmd(I2C2, ENABLE); \
+ I2C_ClearITPendingBit(I2C2, 0xFF); \
I2C_ITConfig(I2C2, I2C_IT_ERR, ENABLE); \
- I2C2_END_OF_TRANSACTION(); \
+ I2C2_END_OF_TRANSACTION(); \
}
@@ -423,6 +442,12 @@ static inline void on_status_sending_byte(struct i2c_transaction* trans, uint32_
I2C_ITConfig(I2C2, I2C_IT_BUF, DISABLE);
if (trans->type == I2CTransTx) {
I2C_GenerateSTOP(I2C2, ENABLE);
+ /* Make sure that the STOP bit is cleared by Hardware */
+ static __IO uint8_t counter = 0;
+ while ((I2C2->CR1&0x200) == 0x200) {
+ counter++;
+ if (counter > 100) break;
+ }
i2c2.status = I2CStopRequested;
}
else {
@@ -486,6 +511,12 @@ static inline void on_status_addr_rd_sent(struct i2c_transaction* trans, uint32_
if(trans->len_r == 1) { // If we're going to read only one byte
I2C_AcknowledgeConfig(I2C2, DISABLE); // make sure it's gonna be nacked
I2C_GenerateSTOP(I2C2, ENABLE); // and followed by a stop
+ /* Make sure that the STOP bit is cleared by Hardware */
+ static __IO uint8_t counter = 0;
+ while ((I2C2->CR1&0x200) == 0x200) {
+ counter++;
+ if (counter > 100) break;
+ }
i2c2.status = I2CReadingLastByte; // and remember we did
}
else {
@@ -512,6 +543,12 @@ static inline void on_status_reading_byte(struct i2c_transaction* trans, uint32_
if (i2c2.idx_buf >= trans->len_r-1) { // We're reading our last byte
I2C_AcknowledgeConfig(I2C2, DISABLE); // give them a nack once it's done
I2C_GenerateSTOP(I2C2, ENABLE); // and follow with a stop
+ /* Make sure that the STOP bit is cleared by Hardware */
+ static __IO uint8_t counter = 0;
+ while ((I2C2->CR1&0x200) == 0x200) {
+ counter++;
+ if (counter > 100) break;
+ }
i2c2.status = I2CStopRequested; // remember we already trigered the stop
}
} // else { something very wrong has happened }
@@ -645,6 +682,12 @@ void i2c2_er_irq_handler(void) {
i2c2_errors.ack_fail_cnt++;
I2C_ClearITPendingBit(I2C2, I2C_IT_AF);
I2C_GenerateSTOP(I2C2, ENABLE);
+ /* Make sure that the STOP bit is cleared by Hardware */
+ static __IO uint8_t counter = 0;
+ while ((I2C2->CR1&0x200) == 0x200) {
+ counter++;
+ if (counter > 100) break;
+ }
}
if (I2C_GetITStatus(I2C2, I2C_IT_BERR)) { /* Misplaced Start or Stop condition */
i2c2_errors.miss_start_stop_cnt++;
@@ -684,6 +727,11 @@ void i2c2_er_irq_handler(void) {
+bool_t i2c_idle(struct i2c_periph* p)
+{
+ return !I2C_GetFlagStatus(p->reg_addr, I2C_FLAG_BUSY);
+}
+
bool_t i2c_submit(struct i2c_periph* p, struct i2c_transaction* t) {
uint8_t temp;
diff --git a/sw/airborne/arch/stm32/peripherals/hmc8543_arch.c b/sw/airborne/arch/stm32/peripherals/hmc5843_arch.c
similarity index 100%
rename from sw/airborne/arch/stm32/peripherals/hmc8543_arch.c
rename to sw/airborne/arch/stm32/peripherals/hmc5843_arch.c
diff --git a/sw/airborne/arch/stm32/peripherals/hmc8543_arch.h b/sw/airborne/arch/stm32/peripherals/hmc5843_arch.h
similarity index 100%
rename from sw/airborne/arch/stm32/peripherals/hmc8543_arch.h
rename to sw/airborne/arch/stm32/peripherals/hmc5843_arch.h
diff --git a/sw/airborne/arch/stm32/peripherals/max1168_arch.c b/sw/airborne/arch/stm32/peripherals/max1168_arch.c
index f39881bc80..3239a3ad86 100644
--- a/sw/airborne/arch/stm32/peripherals/max1168_arch.c
+++ b/sw/airborne/arch/stm32/peripherals/max1168_arch.c
@@ -97,6 +97,7 @@ void max1168_read( void ) {
Max1168Select();
/* write control byte - wait EOC on extint */
+ /* use internal reference and clock, sequentially scan channels 0-7 */
const uint16_t ctl_byte = (1 << 0 | 1 << 3 | 7 << 5) << 8;
SPI_I2S_SendData(SPI2, ctl_byte);
max1168_status = STA_MAX1168_SENDING_REQ;
diff --git a/sw/airborne/arch/stm32/peripherals/ms2001_arch.c b/sw/airborne/arch/stm32/peripherals/ms2100_arch.c
similarity index 86%
rename from sw/airborne/arch/stm32/peripherals/ms2001_arch.c
rename to sw/airborne/arch/stm32/peripherals/ms2100_arch.c
index b9b91646e6..961ab71e53 100644
--- a/sw/airborne/arch/stm32/peripherals/ms2001_arch.c
+++ b/sw/airborne/arch/stm32/peripherals/ms2100_arch.c
@@ -21,7 +21,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "peripherals/ms2001.h"
+#include "peripherals/ms2100.h"
#include
#include
@@ -29,16 +29,16 @@
#include
#include
-uint8_t ms2001_cur_axe;
-int16_t ms2001_last_reading; // can't write in place because that stupid beast
+uint8_t ms2100_cur_axe;
+int16_t ms2100_last_reading; // can't write in place because that stupid beast
// stips stupid values once in a while that I need
// to filter - high time we get rid of this crap hardware
// and no, I checked with the logic analyzer, timing are
// within specs
-void ms2001_arch_init( void ) {
+void ms2100_arch_init( void ) {
- ms2001_cur_axe = 0;
+ ms2100_cur_axe = 0;
/* set mag SS and reset as output and assert them (SS on PC12 reset on PC13) ----*/
Ms2001Unselect();
@@ -58,7 +58,7 @@ void ms2001_arch_init( void ) {
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure);
-#ifdef MS2001_HANDLES_DMA_IRQ
+#ifdef MS2100_HANDLES_DMA_IRQ
/* Enable DMA1 channel4 IRQ Channel */
NVIC_InitTypeDef NVIC_init_structure_dma = {
.NVIC_IRQChannel = DMA1_Channel4_IRQn,
@@ -67,9 +67,9 @@ void ms2001_arch_init( void ) {
.NVIC_IRQChannelCmd = ENABLE
};
NVIC_Init(&NVIC_init_structure_dma);
-#endif /* MS2001_HANDLES_DMA_IRQ */
+#endif /* MS2100_HANDLES_DMA_IRQ */
-#ifdef MS2001_HANDLES_SPI_IRQ
+#ifdef MS2100_HANDLES_SPI_IRQ
NVIC_InitTypeDef NVIC_init_structure_spi = {
.NVIC_IRQChannel = SPI2_IRQn,
.NVIC_IRQChannelPreemptionPriority = 0,
@@ -77,19 +77,19 @@ void ms2001_arch_init( void ) {
.NVIC_IRQChannelCmd = ENABLE
};
NVIC_Init(&NVIC_init_structure_spi);
-#endif /* MS2001_HANDLES_SPI_IRQ */
+#endif /* MS2100_HANDLES_SPI_IRQ */
}
-#ifdef MS2001_HANDLES_SPI_IRQ
+#ifdef MS2100_HANDLES_SPI_IRQ
void spi2_irq_handler(void) {
Ms2001OnSpiIrq();
}
#endif
-#ifdef MS2001_HANDLES_DMA_IRQ
+#ifdef MS2100_HANDLES_DMA_IRQ
void dma1_c4_irq_handler(void) {
Ms2001OnDmaIrq();
}
-#endif /* MS2001_HANDLES_DMA_IRQ */
+#endif /* MS2100_HANDLES_DMA_IRQ */
diff --git a/sw/airborne/arch/stm32/peripherals/ms2001_arch.h b/sw/airborne/arch/stm32/peripherals/ms2100_arch.h
similarity index 84%
rename from sw/airborne/arch/stm32/peripherals/ms2001_arch.h
rename to sw/airborne/arch/stm32/peripherals/ms2100_arch.h
index 5008bc5f6c..c95a26ce84 100644
--- a/sw/airborne/arch/stm32/peripherals/ms2001_arch.h
+++ b/sw/airborne/arch/stm32/peripherals/ms2100_arch.h
@@ -1,5 +1,5 @@
-#ifndef MS2001_ARCH_H
-#define MS2001_ARCH_H
+#ifndef MS2100_ARCH_H
+#define MS2100_ARCH_H
/*
* $Id$
@@ -27,8 +27,8 @@
#include
#include
-extern uint8_t ms2001_cur_axe;
-extern int16_t ms2001_last_reading;
+extern uint8_t ms2100_cur_axe;
+extern int16_t ms2100_last_reading;
#define Ms2001Select() GPIOC->BRR = GPIO_Pin_12
#define Ms2001Unselect() GPIOC->BSRR = GPIO_Pin_12
@@ -42,10 +42,10 @@ extern int16_t ms2001_last_reading;
Ms2001Select(); \
__IO uint32_t nCount = 4;for(; nCount != 0; nCount--); \
Ms2001Reset(); \
- ms2001_status = MS2001_SENDING_REQ; \
+ ms2100_status = MS2100_SENDING_REQ; \
nCount = 4;for(; nCount != 0; nCount--); \
Ms2001Set(); \
- uint16_t ctl_byte = ((ms2001_cur_axe+1) | (MS2001_DIVISOR << 4)); \
+ uint16_t ctl_byte = ((ms2100_cur_axe+1) | (MS2100_DIVISOR << 4)); \
nCount = 20;for(; nCount != 0; nCount--); \
SPI_Cmd(SPI2, DISABLE); \
SPI_InitTypeDef SPI_InitStructure = { \
@@ -66,7 +66,7 @@ extern int16_t ms2001_last_reading;
}
#define Ms2001ReadRes() { \
- ms2001_status = MS2001_READING_RES; \
+ ms2100_status = MS2100_READING_RES; \
Ms2001Select(); \
SPI_Cmd(SPI2, DISABLE); \
SPI_InitTypeDef SPI_InitStructure = { \
@@ -88,7 +88,7 @@ extern int16_t ms2001_last_reading;
DMA_InitTypeDef DMA_InitStructure; \
DMA_DeInit(DMA1_Channel4); \
DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)(SPI2_BASE+0x0C); \
- DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)(&ms2001_last_reading); \
+ DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)(&ms2100_last_reading); \
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC; \
DMA_InitStructure.DMA_BufferSize = 1; \
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable; \
@@ -102,7 +102,7 @@ extern int16_t ms2001_last_reading;
/* SPI2_Tx_DMA_Channel configuration ------------------------------------*/ \
DMA_DeInit(DMA1_Channel5); \
DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)(SPI2_BASE+0x0C); \
- DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)&ms2001_values; \
+ DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)&ms2100_values; \
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralDST; \
DMA_InitStructure.DMA_Priority = DMA_Priority_Medium; \
DMA_Init(DMA1_Channel5, &DMA_InitStructure); \
@@ -123,33 +123,33 @@ extern int16_t ms2001_last_reading;
}
#define Ms2001OnDmaIrq() { \
- /* ASSERT((ms2001_status == MS2001_READING_RES), \
- * DEBUG_MS2001, MS2001_ERR_SPURIOUS_DMA_IRQ); \
+ /* ASSERT((ms2100_status == MS2100_READING_RES), \
+ * DEBUG_MS2100, MS2100_ERR_SPURIOUS_DMA_IRQ); \
*/ \
- if (abs(ms2001_last_reading) < 1000) \
- ms2001_values[ms2001_cur_axe] = ms2001_last_reading; \
+ if (abs(ms2100_last_reading) < 1000) \
+ ms2100_values[ms2100_cur_axe] = ms2100_last_reading; \
Ms2001Unselect(); \
- ms2001_cur_axe++; \
- if (ms2001_cur_axe > 2) { \
- ms2001_cur_axe = 0; \
- ms2001_status = MS2001_DATA_AVAILABLE; \
+ ms2100_cur_axe++; \
+ if (ms2100_cur_axe > 2) { \
+ ms2100_cur_axe = 0; \
+ ms2100_status = MS2100_DATA_AVAILABLE; \
} \
else \
- ms2001_status = MS2001_IDLE; \
+ ms2100_status = MS2100_IDLE; \
SPI_Cmd(SPI2, DISABLE); \
DMA_ITConfig(DMA1_Channel4, DMA_IT_TC, DISABLE); \
}
#define Ms2001OnSpiIrq() { \
- /* ASSERT((ms2001_status == MS2001_SENDING_REQ), \
- * DEBUG_MS2001, MS2001_ERR_SPURIOUS_SPI_IRQ); \
+ /* ASSERT((ms2100_status == MS2100_SENDING_REQ), \
+ * DEBUG_MS2100, MS2100_ERR_SPURIOUS_SPI_IRQ); \
*/ \
/* read unused control byte reply */ \
uint8_t foo __attribute__ ((unused)) = SPI_I2S_ReceiveData(SPI2); \
Ms2001Unselect(); \
- ms2001_status = MS2001_WAITING_EOC; \
+ ms2100_status = MS2100_WAITING_EOC; \
SPI_Cmd(SPI2, DISABLE); \
SPI_I2S_ITConfig(SPI2, SPI_I2S_IT_RXNE, DISABLE); \
}
-#endif /* MS2001_ARCH_H */
+#endif /* MS2100_ARCH_H */
diff --git a/sw/airborne/arch/stm32/subsystems/imu/imu_aspirin_arch.c b/sw/airborne/arch/stm32/subsystems/imu/imu_aspirin_arch.c
index ca50b9c639..3715342009 100644
--- a/sw/airborne/arch/stm32/subsystems/imu/imu_aspirin_arch.c
+++ b/sw/airborne/arch/stm32/subsystems/imu/imu_aspirin_arch.c
@@ -21,11 +21,44 @@ void exti2_irq_handler(void);
/* accelerometer dma end of rx handler */
void dma1_c4_irq_handler(void);
+void imu_aspirin_arch_int_enable(void) {
+ NVIC_InitTypeDef NVIC_InitStructure;
+
+ NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
+ NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;
+ NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
+ NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
+ NVIC_Init(&NVIC_InitStructure);
+
+ NVIC_InitStructure.NVIC_IRQChannel = EXTI2_IRQn;
+ NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;
+ NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
+ NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
+ NVIC_Init(&NVIC_InitStructure);
+
+}
+
+void imu_aspirin_arch_int_disable(void) {
+ NVIC_InitTypeDef NVIC_InitStructure;
+
+ NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
+ NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;
+ NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
+ NVIC_InitStructure.NVIC_IRQChannelCmd = DISABLE;
+ NVIC_Init(&NVIC_InitStructure);
+
+ NVIC_InitStructure.NVIC_IRQChannel = EXTI2_IRQn;
+ NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;
+ NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
+ NVIC_InitStructure.NVIC_IRQChannelCmd = DISABLE;
+ NVIC_Init(&NVIC_InitStructure);
+
+}
+
void imu_aspirin_arch_init(void) {
GPIO_InitTypeDef GPIO_InitStructure;
EXTI_InitTypeDef EXTI_InitStructure;
- NVIC_InitTypeDef NVIC_InitStructure;
SPI_InitTypeDef SPI_InitStructure;
/* Set "mag ss" and "mag reset" as floating inputs ------------------------*/
@@ -57,13 +90,6 @@ void imu_aspirin_arch_init(void) {
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure);
- NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
- NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;
- NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
- NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
- NVIC_Init(&NVIC_InitStructure);
-
-
/* Accel */
/* set accel slave select as output and assert it ( on PB12) */
Adxl345Unselect();
@@ -73,13 +99,13 @@ void imu_aspirin_arch_init(void) {
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure);
- /* configure external interrupt exti2 on PD2( accel int ) */
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD | RCC_APB2Periph_AFIO, ENABLE);
+ /* configure external interrupt exti2 on PB2( accel int ) */
+ RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO, ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_Init(GPIOD, &GPIO_InitStructure);
- GPIO_EXTILineConfig(GPIO_PortSourceGPIOD, GPIO_PinSource2);
+ GPIO_Init(GPIOB, &GPIO_InitStructure);
+ GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource2);
EXTI_InitStructure.EXTI_Line = EXTI_Line2;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
@@ -87,12 +113,6 @@ void imu_aspirin_arch_init(void) {
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure);
- NVIC_InitStructure.NVIC_IRQChannel = EXTI2_IRQn;
- NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;
- NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
- NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
- NVIC_Init(&NVIC_InitStructure);
-
/* Enable SPI2 Periph clock -------------------------------------------------*/
RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
@@ -130,27 +150,6 @@ void imu_aspirin_arch_init(void) {
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
- /* Mag */
- /* configure external interrupt exti5 on PB5( mag int ) */
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO, ENABLE);
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_Init(GPIOB, &GPIO_InitStructure);
-
- GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource5);
- EXTI_InitStructure.EXTI_Line = EXTI_Line5;
- EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
- EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
- EXTI_InitStructure.EXTI_LineCmd = ENABLE;
- EXTI_Init(&EXTI_InitStructure);
-
- NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQn;
- NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;
- NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
- NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
- NVIC_Init(&NVIC_InitStructure);
-
}
@@ -234,32 +233,11 @@ void exti15_10_irq_handler(void) {
if(EXTI_GetITStatus(EXTI_Line14) != RESET)
EXTI_ClearITPendingBit(EXTI_Line14);
- imu_aspirin.i2c_trans_gyro.type = I2CTransTxRx;
- imu_aspirin.i2c_trans_gyro.buf[0] = ITG3200_REG_GYRO_XOUT_H;
- imu_aspirin.i2c_trans_gyro.slave_addr = ITG3200_ADDR;
- imu_aspirin.i2c_trans_gyro.len_w = 1;
- imu_aspirin.i2c_trans_gyro.len_r = 6;
- // if (!i2c_submit(&i2c2,&imu_aspirin.i2c_trans_gyro)) while(1);
- i2c_submit(&i2c2,&imu_aspirin.i2c_trans_gyro);
+ imu_aspirin.gyro_eoc = TRUE;
imu_aspirin.status = AspirinStatusReadingGyro;
}
-/*
- *
- * Mag data ready
- *
- */
-void exti9_5_irq_handler(void) {
-
- /* clear EXTI */
- if(EXTI_GetITStatus(EXTI_Line5) != RESET)
- EXTI_ClearITPendingBit(EXTI_Line5);
-
- imu_aspirin.mag_ready_for_read = TRUE;
-
-}
-
/*
*
* Accel data ready
diff --git a/sw/airborne/arch/stm32/subsystems/imu/imu_aspirin_arch.h b/sw/airborne/arch/stm32/subsystems/imu/imu_aspirin_arch.h
index e40fed4777..4345e8b14c 100644
--- a/sw/airborne/arch/stm32/subsystems/imu/imu_aspirin_arch.h
+++ b/sw/airborne/arch/stm32/subsystems/imu/imu_aspirin_arch.h
@@ -6,6 +6,8 @@
#include "led.h"
extern void imu_aspirin_arch_init(void);
+extern void imu_aspirin_arch_int_enable(void);
+extern void imu_aspirin_arch_int_disable(void);
extern void adxl345_write_to_reg(uint8_t addr, uint8_t val);
extern void adxl345_clear_rx_buf(void);
extern void adxl345_start_reading_data(void);
diff --git a/sw/airborne/arch/stm32/subsystems/imu/imu_b2_arch.c b/sw/airborne/arch/stm32/subsystems/imu/imu_b2_arch.c
index 0ab657a5a0..0f229c3de7 100644
--- a/sw/airborne/arch/stm32/subsystems/imu/imu_b2_arch.c
+++ b/sw/airborne/arch/stm32/subsystems/imu/imu_b2_arch.c
@@ -91,12 +91,12 @@ void dma1_c4_irq_handler(void) {
case IMU_SSP_STA_BUSY_MAX1168:
Max1168OnDmaIrq();
SPI_Cmd(SPI2, DISABLE);
-#if IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2001
- if (ms2001_status == MS2001_IDLE) {
+#if IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
+ if (ms2100_status == MS2100_IDLE) {
Ms2001SendReq();
imu_ssp_status = IMU_SSP_STA_BUSY_MS2100;
}
- else if (ms2001_status == MS2001_WAITING_EOC && Ms2001HasEOC()) {
+ else if (ms2100_status == MS2100_WAITING_EOC && Ms2001HasEOC()) {
Ms2001ReadRes();
imu_ssp_status = IMU_SSP_STA_BUSY_MS2100;
}
@@ -105,7 +105,7 @@ void dma1_c4_irq_handler(void) {
imu_ssp_status = IMU_SSP_STA_IDLE;
break;
case IMU_SSP_STA_BUSY_MS2100:
-#if IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2001
+#if IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
Ms2001OnDmaIrq();
#endif
break;
@@ -117,7 +117,7 @@ void dma1_c4_irq_handler(void) {
void spi2_irq_handler(void) {
-#if IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2001
+#if IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
Ms2001OnSpiIrq();
#endif
}
diff --git a/sw/airborne/boards/booz_1.0.h b/sw/airborne/boards/booz_1.0.h
index 7634648333..9f44e89514 100644
--- a/sw/airborne/boards/booz_1.0.h
+++ b/sw/airborne/boards/booz_1.0.h
@@ -62,23 +62,23 @@
-/* MS2001 on SSP, IMU connector */
-#define MS2001_SS_PIN 28
-#define MS2001_SS_IODIR IO1DIR
-#define MS2001_SS_IOSET IO1SET
-#define MS2001_SS_IOCLR IO1CLR
+/* MS2100 on SSP, IMU connector */
+#define MS2100_SS_PIN 28
+#define MS2100_SS_IODIR IO1DIR
+#define MS2100_SS_IOSET IO1SET
+#define MS2100_SS_IOCLR IO1CLR
-#define MS2001_RESET_PIN 19
-#define MS2001_RESET_IODIR IO1DIR
-#define MS2001_RESET_IOSET IO1SET
-#define MS2001_RESET_IOCLR IO1CLR
+#define MS2100_RESET_PIN 19
+#define MS2100_RESET_IODIR IO1DIR
+#define MS2100_RESET_IOSET IO1SET
+#define MS2100_RESET_IOCLR IO1CLR
-#define MS2001_DRDY_PIN 30
-#define MS2001_DRDY_PINSEL PINSEL1
-#define MS2001_DRDY_PINSEL_BIT 28
-#define MS2001_DRDY_PINSEL_VAL 2
-#define MS2001_DRDY_EINT 3
-#define MS2001_DRDY_VIC_IT VIC_EINT3
+#define MS2100_DRDY_PIN 30
+#define MS2100_DRDY_PINSEL PINSEL1
+#define MS2100_DRDY_PINSEL_BIT 28
+#define MS2100_DRDY_PINSEL_VAL 2
+#define MS2100_DRDY_EINT 3
+#define MS2100_DRDY_VIC_IT VIC_EINT3
/* PWM5 on CAM connector */
/* P0.21 */
diff --git a/sw/airborne/boards/lisa_l/baro_board.c b/sw/airborne/boards/lisa_l/baro_board.c
index 3bf8cc2a20..11829b5acf 100644
--- a/sw/airborne/boards/lisa_l/baro_board.c
+++ b/sw/airborne/boards/lisa_l/baro_board.c
@@ -26,6 +26,7 @@ void baro_init(void) {
void baro_periodic(void) {
// check i2c_done
+ if (!i2c_idle(&i2c2)) return;
switch (baro_board.status) {
case LBS_UNINITIALIZED:
baro_board_send_reset();
diff --git a/sw/airborne/boards/lisa_l/test_baro.c b/sw/airborne/boards/lisa_l/test_baro.c
index 20e9dbef66..8a24041f53 100644
--- a/sw/airborne/boards/lisa_l/test_baro.c
+++ b/sw/airborne/boards/lisa_l/test_baro.c
@@ -29,8 +29,9 @@
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
+#include "mcu_periph/uart.h"
#include "downlink.h"
@@ -58,7 +59,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
baro_init();
diff --git a/conf/autopilot/tiny_sim.h b/sw/airborne/boards/tiny_sim.h
similarity index 89%
rename from conf/autopilot/tiny_sim.h
rename to sw/airborne/boards/tiny_sim.h
index c3bb4a9eea..ff3845ca86 100644
--- a/conf/autopilot/tiny_sim.h
+++ b/sw/airborne/boards/tiny_sim.h
@@ -2,20 +2,20 @@
#define CONFIG_TINY_H
/* Master oscillator freq. */
-#define FOSC (12000000)
+#define FOSC (12000000)
/* PLL multiplier */
-#define PLL_MUL (5)
+#define PLL_MUL (5)
/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
+#define CCLK (FOSC * PLL_MUL)
/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x00
+#define PBSD_BITS 0x00
#define PBSD_VAL 4
/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
+#define PCLK (CCLK / PBSD_VAL)
#define LED_1_BANK 1
#define LED_1_PIN 28
@@ -80,7 +80,14 @@
#define USE_AD0_1
#endif
-/* #define ADC_3 AdcBank1(7) Used for VSUPPLY */
+#define ADC_3 AdcBank0(6)
+#ifdef USE_ADC_3
+#ifndef USE_AD0
+#define USE_AD0
+#endif
+#define USE_AD0_6
+#endif
+
#define ADC_4 AdcBank1(3)
#ifdef USE_ADC_4
@@ -114,6 +121,7 @@
#define USE_AD1_2
#endif
+/* #define ADC_3 AdcBank1(7) Used for VSUPPLY */
#define ADC_CHANNEL_VSUPPLY AdcBank1(7)
#ifndef USE_AD1
#define USE_AD1
diff --git a/sw/airborne/booz/booz_gps.h b/sw/airborne/booz/booz_gps.h
index 7d30611baf..d7d7a7cd8c 100644
--- a/sw/airborne/booz/booz_gps.h
+++ b/sw/airborne/booz/booz_gps.h
@@ -54,14 +54,9 @@ extern struct Booz_gps_state booz_gps_state;
extern void booz_gps_impl_init(void);
-
-/* UBX NAV SOL */
#define BOOZ2_GPS_FIX_NONE 0x00
#define BOOZ2_GPS_FIX_3D 0x03
-
-#include "ubx_protocol.h"
-
#define GpsFixValid() (booz_gps_state.fix == BOOZ2_GPS_FIX_3D)
/*
diff --git a/sw/airborne/booz/gps/booz_gps_skytraq.c b/sw/airborne/booz/gps/booz_gps_skytraq.c
index 6fa2f1ccc8..853fa157c3 100644
--- a/sw/airborne/booz/gps/booz_gps_skytraq.c
+++ b/sw/airborne/booz/gps/booz_gps_skytraq.c
@@ -36,7 +36,7 @@ struct BoozGpsSkytraq booz_gps_skytraq;
#define GOT_CHECKSUM 7
#define GOT_SYNC3 8
-#include "my_debug_servo.h"
+//#include "my_debug_servo.h"
#include "led.h"
void booz_gps_impl_init(void) {
@@ -44,14 +44,14 @@ void booz_gps_impl_init(void) {
booz_gps_skytraq.status = UNINIT;
- DEBUG_SERVO1_INIT();
+ //DEBUG_SERVO1_INIT();
}
void booz_gps_skytraq_read_message(void) {
- DEBUG_S1_ON();
+ //DEBUG_S1_ON();
if (booz_gps_skytraq.msg_id == SKYTRAQ_ID_NAVIGATION_DATA) {
booz_gps_state.ecef_pos.x = SKYTRAQ_NAVIGATION_DATA_ECEFX(booz_gps_skytraq.msg_buf);
@@ -70,7 +70,7 @@ void booz_gps_skytraq_read_message(void) {
booz_gps_state.num_sv = SKYTRAQ_NAVIGATION_DATA_NumSV(booz_gps_skytraq.msg_buf);
booz_gps_state.fix = SKYTRAQ_NAVIGATION_DATA_FixMode(booz_gps_skytraq.msg_buf);
booz_gps_state.tow = SKYTRAQ_NAVIGATION_DATA_TOW(booz_gps_skytraq.msg_buf);
- DEBUG_S2_TOGGLE();
+ //DEBUG_S2_TOGGLE();
#ifdef GPS_LED
if (booz_gps_state.fix == BOOZ2_GPS_FIX_3D) {
@@ -82,7 +82,7 @@ void booz_gps_skytraq_read_message(void) {
#endif
}
- DEBUG_S1_OFF();
+ //DEBUG_S1_OFF();
}
void booz_gps_skytraq_parse(uint8_t c) {
diff --git a/sw/airborne/booz/gps/booz_gps_skytraq.h b/sw/airborne/booz/gps/booz_gps_skytraq.h
index f3fe7703f3..27f2345764 100644
--- a/sw/airborne/booz/gps/booz_gps_skytraq.h
+++ b/sw/airborne/booz/gps/booz_gps_skytraq.h
@@ -63,7 +63,7 @@ extern struct BoozGpsSkytraq booz_gps_skytraq;
extern void booz_gps_skytraq_read_message(void);
extern void booz_gps_skytraq_parse(uint8_t c);
-#include "my_debug_servo.h"
+//#include "my_debug_servo.h"
#define BoozGpsEvent(_sol_available_callback) { \
if (GpsBuffer()) { \
diff --git a/sw/airborne/booz/gps/booz_gps_ubx.h b/sw/airborne/booz/gps/booz_gps_ubx.h
index 28d306a0e7..ab2d25f709 100644
--- a/sw/airborne/booz/gps/booz_gps_ubx.h
+++ b/sw/airborne/booz/gps/booz_gps_ubx.h
@@ -1,6 +1,8 @@
#ifndef BOOZ_GPS_UBX_H
#define BOOZ_GPS_UBX_H
+#include "ubx_protocol.h"
+
#define GPS_UBX_MAX_PAYLOAD 255
struct BoosGpsUbx {
bool_t msg_available;
diff --git a/sw/airborne/booz/test/booz2_test_buss_bldc_hexa.c b/sw/airborne/booz/test/booz2_test_buss_bldc_hexa.c
index b20c2ccef4..c19f2ff874 100644
--- a/sw/airborne/booz/test/booz2_test_buss_bldc_hexa.c
+++ b/sw/airborne/booz/test/booz2_test_buss_bldc_hexa.c
@@ -23,7 +23,7 @@
#include
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "interrupt_hw.h"
#include "downlink.h"
@@ -59,9 +59,9 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_test_crista.c b/sw/airborne/booz/test/booz2_test_crista.c
index 21af105e1d..82f990afe4 100644
--- a/sw/airborne/booz/test/booz2_test_crista.c
+++ b/sw/airborne/booz/test/booz2_test_crista.c
@@ -24,10 +24,10 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
@@ -53,7 +53,7 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
@@ -66,7 +66,7 @@ static inline void main_init( void ) {
imu_impl_init();
imu_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_test_gps.c b/sw/airborne/booz/test/booz2_test_gps.c
index 0c67b7886a..a85f6f30a0 100644
--- a/sw/airborne/booz/test/booz2_test_gps.c
+++ b/sw/airborne/booz/test/booz2_test_gps.c
@@ -24,7 +24,7 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
#include "booz_gps.h"
@@ -47,11 +47,11 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
booz_gps_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_test_led.c b/sw/airborne/booz/test/booz2_test_led.c
index 126358b6b4..4986fb2a6d 100644
--- a/sw/airborne/booz/test/booz2_test_led.c
+++ b/sw/airborne/booz/test/booz2_test_led.c
@@ -24,7 +24,7 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "interrupt_hw.h"
@@ -43,9 +43,9 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_test_max1168.c b/sw/airborne/booz/test/booz2_test_max1168.c
index 12c858a824..dc57a9a454 100644
--- a/sw/airborne/booz/test/booz2_test_max1168.c
+++ b/sw/airborne/booz/test/booz2_test_max1168.c
@@ -24,7 +24,7 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "interrupt_hw.h"
#include "messages.h"
@@ -56,13 +56,13 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_init_ssp();
max1168_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_test_micromag.c b/sw/airborne/booz/test/booz2_test_micromag.c
index 68377fb5ef..9ba50b7fee 100644
--- a/sw/airborne/booz/test/booz2_test_micromag.c
+++ b/sw/airborne/booz/test/booz2_test_micromag.c
@@ -24,10 +24,10 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
@@ -58,7 +58,7 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
@@ -72,7 +72,7 @@ static inline void main_init( void ) {
main_init_ssp();
micromag_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_test_modem.c b/sw/airborne/booz/test/booz2_test_modem.c
index 1b5fb38628..df06203773 100644
--- a/sw/airborne/booz/test/booz2_test_modem.c
+++ b/sw/airborne/booz/test/booz2_test_modem.c
@@ -23,11 +23,11 @@
#include
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
@@ -47,11 +47,11 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
uart1_init_tx();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_test_radio_control.c b/sw/airborne/booz/test/booz2_test_radio_control.c
index f5b93da7a4..cc0ea59b95 100644
--- a/sw/airborne/booz/test/booz2_test_radio_control.c
+++ b/sw/airborne/booz/test/booz2_test_radio_control.c
@@ -23,9 +23,10 @@
#include
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "interrupt_hw.h"
+#include "mcu_periph/uart.h"
#include "downlink.h"
@@ -48,10 +49,10 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
radio_control_init();
- int_enable();
+ mcu_int_enable();
}
extern uint32_t debug_len;
diff --git a/sw/airborne/booz/test/booz2_test_rc.c b/sw/airborne/booz/test/booz2_test_rc.c
index d88f5e9e75..5806e65250 100644
--- a/sw/airborne/booz/test/booz2_test_rc.c
+++ b/sw/airborne/booz/test/booz2_test_rc.c
@@ -24,10 +24,10 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
@@ -52,7 +52,7 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
@@ -61,7 +61,7 @@ static inline void main_init( void ) {
ppm_init();
radio_control_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_test_usb.c b/sw/airborne/booz/test/booz2_test_usb.c
index c694603709..9e35042c62 100644
--- a/sw/airborne/booz/test/booz2_test_usb.c
+++ b/sw/airborne/booz/test/booz2_test_usb.c
@@ -24,7 +24,7 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
@@ -51,13 +51,13 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
VCOM_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_tunnel.c b/sw/airborne/booz/test/booz2_tunnel.c
index 9229ae1aef..9f8a4689ea 100644
--- a/sw/airborne/booz/test/booz2_tunnel.c
+++ b/sw/airborne/booz/test/booz2_tunnel.c
@@ -24,10 +24,10 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
static inline void main_init( void );
static inline void main_periodic_task( void );
@@ -44,12 +44,12 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
uart0_init();
uart1_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/booz/test/booz2_tunnel_bb.c b/sw/airborne/booz/test/booz2_tunnel_bb.c
index 33f8b7ff65..db0deaa5d3 100644
--- a/sw/airborne/booz/test/booz2_tunnel_bb.c
+++ b/sw/airborne/booz/test/booz2_tunnel_bb.c
@@ -25,7 +25,7 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "led.h"
#define TXD0_PIN 0
@@ -34,7 +34,7 @@
#define RXD1_PIN 9
int main (int argc, char** argv) {
- hw_init();
+ mcu_init();
led_init();
/* TXD0 and TXD1 output */
diff --git a/sw/airborne/booz/test/booz_test_imu.c b/sw/airborne/booz/test/booz_test_imu.c
index c5f5c32291..fa4bd2591d 100644
--- a/sw/airborne/booz/test/booz_test_imu.c
+++ b/sw/airborne/booz/test/booz_test_imu.c
@@ -24,10 +24,10 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
@@ -42,6 +42,7 @@ static inline void main_periodic_task( void );
static inline void main_event_task( void );
static inline void on_gyro_accel_event(void);
+static inline void on_accel_event(void);
static inline void on_mag_event(void);
int main( void ) {
@@ -56,7 +57,7 @@ int main( void ) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
imu_init();
@@ -64,7 +65,7 @@ static inline void main_init( void ) {
DEBUG_SERVO2_INIT();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
@@ -92,13 +93,32 @@ static inline void main_periodic_task( void ) {
static inline void main_event_task( void ) {
- ImuEvent(on_gyro_accel_event, on_mag_event);
+ ImuEvent(on_gyro_accel_event, on_accel_event, on_mag_event);
}
+static inline void on_accel_event(void) {
+ ImuScaleAccel(imu);
+
+ static uint8_t cnt;
+ cnt++;
+ if (cnt > 15) cnt = 0;
+ if (cnt == 0) {
+ DOWNLINK_SEND_IMU_ACCEL_RAW(DefaultChannel,
+ &imu.accel_unscaled.x,
+ &imu.accel_unscaled.y,
+ &imu.accel_unscaled.z);
+ }
+ else if (cnt == 7) {
+ DOWNLINK_SEND_BOOZ2_ACCEL(DefaultChannel,
+ &imu.accel.x,
+ &imu.accel.y,
+ &imu.accel.z);
+ }
+}
+
static inline void on_gyro_accel_event(void) {
ImuScaleGyro(imu);
- ImuScaleAccel(imu);
LED_TOGGLE(2);
static uint8_t cnt;
@@ -110,22 +130,12 @@ static inline void on_gyro_accel_event(void) {
&imu.gyro_unscaled.p,
&imu.gyro_unscaled.q,
&imu.gyro_unscaled.r);
-
- DOWNLINK_SEND_IMU_ACCEL_RAW(DefaultChannel,
- &imu.accel_unscaled.x,
- &imu.accel_unscaled.y,
- &imu.accel_unscaled.z);
}
else if (cnt == 7) {
DOWNLINK_SEND_BOOZ2_GYRO(DefaultChannel,
&imu.gyro.p,
&imu.gyro.q,
&imu.gyro.r);
-
- DOWNLINK_SEND_BOOZ2_ACCEL(DefaultChannel,
- &imu.accel.x,
- &imu.accel.y,
- &imu.accel.z);
}
}
diff --git a/sw/airborne/booz/test/booz_test_telemetry.c b/sw/airborne/booz/test/booz_test_telemetry.c
index 940952d9fd..f21b005ff9 100644
--- a/sw/airborne/booz/test/booz_test_telemetry.c
+++ b/sw/airborne/booz/test/booz_test_telemetry.c
@@ -23,7 +23,7 @@
#include
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "interrupt_hw.h"
@@ -45,9 +45,9 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/csc/csc_ap_main.c b/sw/airborne/csc/csc_ap_main.c
index 55273d6d65..012d151e38 100644
--- a/sw/airborne/csc/csc_ap_main.c
+++ b/sw/airborne/csc/csc_ap_main.c
@@ -28,11 +28,11 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "downlink.h"
#include "generated/periodic.h"
#include "generated/airframe.h"
@@ -141,7 +141,7 @@ static void on_gpspos_cmd( struct CscGPSPosMsg *msg )
static void csc_main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
@@ -167,7 +167,7 @@ static void csc_main_init( void ) {
actuators_init();
csc_ap_init();
- int_enable();
+ mcu_int_enable();
}
diff --git a/sw/airborne/csc/csc_baro.c b/sw/airborne/csc/csc_baro.c
index ed6ddf8278..22649b4f4a 100644
--- a/sw/airborne/csc/csc_baro.c
+++ b/sw/airborne/csc/csc_baro.c
@@ -1,10 +1,10 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
#include "csc_booz2_ins.h"
diff --git a/sw/airborne/csc/csc_datalink.c b/sw/airborne/csc/csc_datalink.c
index 04362db411..72118be9e0 100644
--- a/sw/airborne/csc/csc_datalink.c
+++ b/sw/airborne/csc/csc_datalink.c
@@ -5,7 +5,7 @@
#include "downlink.h"
#include "messages.h"
#include "dl_protocol.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#define IdOfMsg(x) (x[1])
diff --git a/sw/airborne/csc/csc_protocol.c b/sw/airborne/csc/csc_protocol.c
index f3167c7c20..f2027347eb 100644
--- a/sw/airborne/csc/csc_protocol.c
+++ b/sw/airborne/csc/csc_protocol.c
@@ -29,7 +29,7 @@
#include "mcu_periph/can.h"
#include "csc_msg_def.h"
-// #include "init_hw.h"
+// #include "mcu.h"
// #include "sys_time.h"
// #include "downlink.h"
diff --git a/sw/airborne/csc/csc_rc_spektrum.c b/sw/airborne/csc/csc_rc_spektrum.c
index 4771fc55e9..9347a8d9f7 100644
--- a/sw/airborne/csc/csc_rc_spektrum.c
+++ b/sw/airborne/csc/csc_rc_spektrum.c
@@ -34,7 +34,7 @@
#include "paparazzi.h"
#include "downlink.h"
#include "messages.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "string.h"
#include "csc_ap_link.h"
#include "csc_msg_def.h"
diff --git a/sw/airborne/csc/csc_xsens.c b/sw/airborne/csc/csc_xsens.c
index e71569cbe5..ee0a2e6ec0 100644
--- a/sw/airborne/csc/csc_xsens.c
+++ b/sw/airborne/csc/csc_xsens.c
@@ -34,7 +34,7 @@
#include "downlink.h"
#include "messages.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
//#include "com_stats.h"
#include "math/pprz_algebra_float.h"
#include "string.h"
diff --git a/sw/airborne/csc/mercury_csc_main.c b/sw/airborne/csc/mercury_csc_main.c
index 18f81b3197..4c259524a9 100644
--- a/sw/airborne/csc/mercury_csc_main.c
+++ b/sw/airborne/csc/mercury_csc_main.c
@@ -28,7 +28,7 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
@@ -47,7 +47,7 @@
// #include "ams5812.h"
#include "interrupt_hw.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "csc_telemetry.h"
#include "generated/periodic.h"
diff --git a/sw/airborne/csc/mercury_main.c b/sw/airborne/csc/mercury_main.c
index 637b5bf7c7..b6914fb70f 100644
--- a/sw/airborne/csc/mercury_main.c
+++ b/sw/airborne/csc/mercury_main.c
@@ -28,11 +28,11 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "downlink.h"
#include "generated/periodic.h"
#include "generated/airframe.h"
@@ -105,7 +105,7 @@ static void on_rc_cmd(struct CscRCMsg *msg)
static inline void csc_main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
@@ -136,7 +136,7 @@ static inline void csc_main_init( void ) {
props_init();
csc_ap_init();
- int_enable();
+ mcu_int_enable();
stabilization_attitude_enter();
}
diff --git a/sw/airborne/csc/mercury_xsens.c b/sw/airborne/csc/mercury_xsens.c
index d8a3692132..54f4c5e447 100644
--- a/sw/airborne/csc/mercury_xsens.c
+++ b/sw/airborne/csc/mercury_xsens.c
@@ -39,7 +39,7 @@
#include "downlink.h"
#include "messages.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
//#include "com_stats.h"
#include "math/pprz_algebra_float.h"
#include "string.h"
diff --git a/sw/airborne/csc/ppm_bridge_main.c b/sw/airborne/csc/ppm_bridge_main.c
index b2e1bcff8a..e2915321b7 100644
--- a/sw/airborne/csc/ppm_bridge_main.c
+++ b/sw/airborne/csc/ppm_bridge_main.c
@@ -28,11 +28,11 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "downlink.h"
#include "generated/periodic.h"
#include "generated/airframe.h"
@@ -52,7 +52,7 @@ static uint16_t cpu_time = 0;
static void csc_main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
@@ -66,7 +66,7 @@ static void csc_main_init( void ) {
IO0DIR = IO0DIR | (0x1 << 21);
IO0PIN = IO0DIR | (0x1 << 21);
- int_enable();
+ mcu_int_enable();
}
diff --git a/sw/airborne/datalink.h b/sw/airborne/datalink.h
index 690b06462a..9baa824a92 100644
--- a/sw/airborne/datalink.h
+++ b/sw/airborne/datalink.h
@@ -78,8 +78,8 @@ EXTERN void dl_parse_msg(void);
#elif DATALINK == XBEE
#define DatalinkEvent() { \
- if (XbeeBuffer()) { \
- ReadXbeeBuffer(); \
+ if (XBeeBuffer()) { \
+ ReadXBeeBuffer(); \
if (xbee_msg_received) { \
xbee_parse_payload(); \
xbee_msg_received = FALSE; \
diff --git a/sw/airborne/estimator.h b/sw/airborne/estimator.h
index a26e5cdc89..54d25d9a4d 100644
--- a/sw/airborne/estimator.h
+++ b/sw/airborne/estimator.h
@@ -37,7 +37,7 @@
#endif
#ifdef USE_BARO_ETS
-#include "baro_ets.h"
+#include "modules/sensors/baro_ets.h"
#endif
/* position in meters */
diff --git a/sw/airborne/firmwares/beth/main_beth.c b/sw/airborne/firmwares/beth/main_beth.c
index 42da9633e3..ff7ee9a0b9 100644
--- a/sw/airborne/firmwares/beth/main_beth.c
+++ b/sw/airborne/firmwares/beth/main_beth.c
@@ -1,5 +1,5 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "interrupt_hw.h"
@@ -24,9 +24,9 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/firmwares/beth/main_coders.c b/sw/airborne/firmwares/beth/main_coders.c
index 31e873270d..c0ea74c6fd 100644
--- a/sw/airborne/firmwares/beth/main_coders.c
+++ b/sw/airborne/firmwares/beth/main_coders.c
@@ -1,5 +1,5 @@
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "mcu_periph/can.h"
#include "sys_time.h"
#include "downlink.h"
@@ -73,11 +73,11 @@ int main(void) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_init_adc();
bench_sensors_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic( void ) {
diff --git a/sw/airborne/firmwares/beth/main_stm32.c b/sw/airborne/firmwares/beth/main_stm32.c
index bec7f05419..ee5aca10d2 100644
--- a/sw/airborne/firmwares/beth/main_stm32.c
+++ b/sw/airborne/firmwares/beth/main_stm32.c
@@ -40,6 +40,7 @@ static inline void main_periodic( void );
static inline void main_event( void );
static inline void on_gyro_accel_event(void);
+static inline void on_accel_event(void);
static inline void on_mag_event(void);
static inline void main_on_overo_msg_received(void);
@@ -114,7 +115,7 @@ static inline void main_periodic( void ) {
}
static inline void main_event( void ) {
- ImuEvent(on_gyro_accel_event, on_mag_event);
+ ImuEvent(on_gyro_accel_event, on_accel_event, on_mag_event);
OveroLinkEvent(main_on_overo_msg_received,main_on_overo_link_error);
}
@@ -150,6 +151,10 @@ static inline void main_on_overo_link_lost(void) {
}
+static inline void on_accel_event(void) {
+
+}
+
static inline void on_gyro_accel_event(void) {
ImuScaleGyro(imu);
ImuScaleAccel(imu);
diff --git a/sw/airborne/firmwares/beth/rcv_telemetry.c b/sw/airborne/firmwares/beth/rcv_telemetry.c
index 904932f7de..72b1d92359 100755
--- a/sw/airborne/firmwares/beth/rcv_telemetry.c
+++ b/sw/airborne/firmwares/beth/rcv_telemetry.c
@@ -44,7 +44,7 @@
#ifndef DOWNLINK_DEVICE
#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
#endif
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "downlink.h"
diff --git a/sw/airborne/firmwares/beth/uart_hw.c b/sw/airborne/firmwares/beth/uart_hw.c
index 6b0c583ace..5a769e4a83 100644
--- a/sw/airborne/firmwares/beth/uart_hw.c
+++ b/sw/airborne/firmwares/beth/uart_hw.c
@@ -21,7 +21,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include
#include
diff --git a/sw/airborne/datalink.c b/sw/airborne/firmwares/fixedwing/datalink.c
similarity index 100%
rename from sw/airborne/datalink.c
rename to sw/airborne/firmwares/fixedwing/datalink.c
diff --git a/sw/airborne/firmwares/fixedwing/main_ap.c b/sw/airborne/firmwares/fixedwing/main_ap.c
index deb1512a6e..9ff099da95 100644
--- a/sw/airborne/firmwares/fixedwing/main_ap.c
+++ b/sw/airborne/firmwares/fixedwing/main_ap.c
@@ -39,7 +39,9 @@
#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"
#include "firmwares/fixedwing/guidance/guidance_v.h"
#include "gps.h"
+#ifdef USE_INFRARED
#include "subsystems/sensors/infrared.h"
+#endif
#include "gyro.h"
#include "ap_downlink.h"
#include "subsystems/nav.h"
@@ -65,12 +67,15 @@
#endif
-#ifdef USE_ANALOG_IMU
+#ifdef USE_IMU
#include "subsystems/imu.h"
+#endif
+#ifdef USE_AHRS
#include "subsystems/ahrs.h"
#include "subsystems/ahrs/ahrs_aligner.h"
#include "subsystems/ahrs/ahrs_float_dcm.h"
static inline void on_gyro_accel_event( void );
+static inline void on_accel_event( void );
static inline void on_mag_event( void );
#endif
@@ -369,12 +374,37 @@ static void navigation_task( void ) {
*
*/
-void periodic_task_ap( void ) {
- static uint8_t _20Hz = 0;
- static uint8_t _10Hz = 0;
- static uint8_t _4Hz = 0;
- static uint8_t _1Hz = 0;
+void periodic_task_ap( void ) {
+
+ static uint8_t _60Hz = 0;
+ static uint8_t _20Hz = 0;
+ static uint8_t _10Hz = 0;
+ static uint8_t _4Hz = 0;
+ static uint8_t _1Hz = 0;
+
+#ifdef USE_IMU
+ // Run at PERIODIC_FREQUENCY (60Hz if not defined)
+ imu_periodic();
+
+#endif // USE_IMU
+
+#define _check_periodic_freq_ PERIODIC_FREQUENCY % 60
+#if _check_periodic_freq_
+#error Using HighSpeed Periodic: PERIODIC_FREQUENCY has to be a multiple of 60!
+#endif
+ _60Hz++;
+ if (_60Hz >= (PERIODIC_FREQUENCY / 60))
+ {
+ _60Hz = 0;
+ }
+ else
+ {
+ return;
+ }
+
+
+ // Rest of the periodic function still runs at 60Hz like always
_20Hz++;
if (_20Hz>=3) _20Hz=0;
_10Hz++;
@@ -440,11 +470,6 @@ void periodic_task_ap( void ) {
#error "Only 20 and 60 allowed for CONTROL_RATE"
#endif
-#ifdef USE_ANALOG_IMU
- if (!_20Hz) {
- imu_periodic();
- }
-#endif // USE_ANALOG_IMU
#if CONTROL_RATE == 20
if (!_20Hz)
@@ -499,8 +524,10 @@ void init_ap( void ) {
GpioInit();
#endif
-#ifdef USE_ANALOG_IMU
+#ifdef USE_IMU
imu_init();
+#endif
+#ifdef USE_AHRS
ahrs_aligner_init();
ahrs_init();
#endif
@@ -559,9 +586,13 @@ void init_ap( void ) {
/*********** EVENT ***********************************************************/
void event_task_ap( void ) {
-#ifdef USE_ANALOG_IMU
- ImuEvent(on_gyro_accel_event, on_mag_event);
-#endif // USE_ANALOG_IMU
+#ifdef USE_INFRARED
+ infrared_event();
+#endif
+
+#ifdef USE_AHRS
+ ImuEvent(on_gyro_accel_event, on_accel_event, on_mag_event);
+#endif // USE_AHRS
#ifdef USE_GPS
#if !(defined HITL) && !(defined UBX_EXTERNAL) /** else comes through the datalink */
@@ -593,33 +624,8 @@ void event_task_ap( void ) {
#endif /** USE_GPS */
-#if defined DATALINK
+ DatalinkEvent();
-#if DATALINK == PPRZ
- if (PprzBuffer()) {
- ReadPprzBuffer();
- if (pprz_msg_received) {
- pprz_parse_payload();
- pprz_msg_received = FALSE;
- }
- }
-#elif DATALINK == XBEE
- if (XBeeBuffer()) {
- ReadXBeeBuffer();
- if (xbee_msg_received) {
- xbee_parse_payload();
- xbee_msg_received = FALSE;
- }
- }
-#else
-#error "Unknown DATALINK"
-#endif
-
- if (dl_msg_available) {
- dl_parse_msg();
- dl_msg_available = FALSE;
- }
-#endif /** DATALINK */
#ifdef MCU_SPI_LINK
link_mcu_event_task();
@@ -634,20 +640,75 @@ void event_task_ap( void ) {
modules_event_task();
} /* event_task_ap() */
-#ifdef USE_ANALOG_IMU
+#ifdef USE_AHRS
+static inline void on_accel_event( void ) {
+}
+
static inline void on_gyro_accel_event( void ) {
- ImuScaleGyro(imu);
- ImuScaleAccel(imu);
+
+#ifdef AHRS_CPU_LED
+ LED_ON(AHRS_CPU_LED);
+#endif
+
+ // Run aligner on raw data as it also makes averages.
if (ahrs.status == AHRS_UNINIT) {
+ ImuScaleGyro(imu);
+ ImuScaleAccel(imu);
ahrs_aligner_run();
if (ahrs_aligner.status == AHRS_ALIGNER_LOCKED)
ahrs_align();
+ return;
}
- else {
+
+#if PERIODIC_FREQUENCY == 60
+ ImuScaleGyro(imu);
+ ImuScaleAccel(imu);
+
+ ahrs_propagate();
+ ahrs_update_accel();
+ ahrs_update_fw_estimator();
+
+#else //PERIODIC_FREQUENCY
+ static uint8_t _reduced_propagation_rate = 0;
+ static uint8_t _reduced_correction_rate = 0;
+ static struct Int32Vect3 acc_avg;
+ static struct Int32Rates gyr_avg;
+
+ RATES_ADD(gyr_avg, imu.gyro_unscaled);
+ VECT3_ADD(acc_avg, imu.accel_unscaled);
+
+ _reduced_propagation_rate++;
+ if (_reduced_propagation_rate < (PERIODIC_FREQUENCY / AHRS_PROPAGATE_FREQUENCY))
+ {
+ }
+ else
+ {
+ _reduced_propagation_rate = 0;
+
+ RATES_SDIV(imu.gyro_unscaled, gyr_avg, (PERIODIC_FREQUENCY / AHRS_PROPAGATE_FREQUENCY) );
+ INT_RATES_ZERO(gyr_avg);
+
+ ImuScaleGyro(imu);
+
ahrs_propagate();
- ahrs_update_accel();
- ahrs_update_fw_estimator();
+
+ _reduced_correction_rate++;
+ if (_reduced_correction_rate >= (AHRS_PROPAGATE_FREQUENCY / AHRS_CORRECT_FREQUENCY))
+ {
+ _reduced_correction_rate = 0;
+ VECT3_SDIV(imu.accel_unscaled, acc_avg, (PERIODIC_FREQUENCY / AHRS_CORRECT_FREQUENCY) );
+ INT_VECT3_ZERO(acc_avg);
+ ImuScaleAccel(imu);
+ ahrs_update_accel();
+ ahrs_update_fw_estimator();
+ }
}
+#endif //PERIODIC_FREQUENCY
+
+#ifdef AHRS_CPU_LED
+ LED_OFF(AHRS_CPU_LED);
+#endif
+
}
static inline void on_mag_event(void) {
@@ -659,4 +720,4 @@ static inline void on_mag_event(void) {
}
*/
}
-#endif // USE_ANALOG_IMU
+#endif // USE_AHRS
diff --git a/sw/airborne/firmwares/logger/main_logger.c b/sw/airborne/firmwares/logger/main_logger.c
index 69a104dde1..8f3eea1406 100644
--- a/sw/airborne/firmwares/logger/main_logger.c
+++ b/sw/airborne/firmwares/logger/main_logger.c
@@ -520,7 +520,7 @@ static inline void main_init( void ) {
max11040_init();
#endif
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/firmwares/motor_bench/main_turntable.c b/sw/airborne/firmwares/motor_bench/main_turntable.c
index d170077efc..8345c948e7 100644
--- a/sw/airborne/firmwares/motor_bench/main_turntable.c
+++ b/sw/airborne/firmwares/motor_bench/main_turntable.c
@@ -1,5 +1,5 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
@@ -32,10 +32,10 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_init_tacho();
- int_enable();
+ mcu_int_enable();
}
#define NB_STEP 256
diff --git a/sw/airborne/firmwares/motor_bench/mb_tacho.c b/sw/airborne/firmwares/motor_bench/mb_tacho.c
index 7875b3c3b7..31e26ae80d 100644
--- a/sw/airborne/firmwares/motor_bench/mb_tacho.c
+++ b/sw/airborne/firmwares/motor_bench/mb_tacho.c
@@ -31,7 +31,7 @@ uint32_t mb_tacho_get_duration( void ) {
my_duration = mb_tacho_duration;
}
got_one_pulse = FALSE;
- int_enable();
+ mcu_int_enable();
return my_duration;
}
@@ -53,7 +53,7 @@ float mb_tacho_get_averaged( void ) {
mb_tacho_averaged = 0.;
mb_tacho_nb_pulse = 0;
- int_enable();
+ mcu_int_enable();
return ret;
diff --git a/sw/airborne/firmwares/rotorcraft/actuators/actuators_pwm_supervision.c b/sw/airborne/firmwares/rotorcraft/actuators/actuators_pwm_supervision.c
new file mode 100644
index 0000000000..06fb68f5ad
--- /dev/null
+++ b/sw/airborne/firmwares/rotorcraft/actuators/actuators_pwm_supervision.c
@@ -0,0 +1,62 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2010 The Paparazzi Team
+ *
+ * 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, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "firmwares/rotorcraft/actuators.h"
+#include "actuators_pwm_supervision.h"
+#include "booz/booz2_commands.h"
+#include "subsystems/radio_control.h"
+
+/* let's start butchery now and use the actuators_pwm arch functions */
+#include "firmwares/rotorcraft/actuators/actuators_pwm.h"
+
+#include "generated/airframe.h"
+
+int32_t actuators_pwm_values[ACTUATORS_PWM_NB];
+
+void actuators_init(void)
+{
+ supervision_init();
+ actuators_pwm_arch_init();
+}
+
+#define PWM_GAIN_SCALE 2
+#define PWM_OFF 1000
+
+void actuators_set(bool_t motors_on) {
+ booz2_commands[COMMAND_PITCH] = booz2_commands[COMMAND_PITCH] * PWM_GAIN_SCALE;
+ booz2_commands[COMMAND_ROLL] = booz2_commands[COMMAND_ROLL] * PWM_GAIN_SCALE;
+ booz2_commands[COMMAND_YAW] = booz2_commands[COMMAND_YAW] * PWM_GAIN_SCALE;
+
+ supervision_run(motors_on, FALSE, booz2_commands);
+
+ if (motors_on) {
+ for (int i = 0; i < SUPERVISION_NB_MOTOR; i++)
+ actuators_pwm_values[i] = supervision.commands[i];
+ } else {
+ for (int i = 0; i < ACTUATORS_PWM_NB; i++)
+ actuators_pwm_values[i] = PWM_OFF;
+ }
+ actuators_pwm_commit();
+
+}
+
diff --git a/sw/airborne/firmwares/rotorcraft/actuators/actuators_pwm_supervision.h b/sw/airborne/firmwares/rotorcraft/actuators/actuators_pwm_supervision.h
new file mode 100644
index 0000000000..cf10740cc2
--- /dev/null
+++ b/sw/airborne/firmwares/rotorcraft/actuators/actuators_pwm_supervision.h
@@ -0,0 +1,30 @@
+/*
+ * $Id: actuators_pwm_supervision$
+ *
+ * Copyright (C) 2010 The Paparazzi Team
+ *
+ * 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, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef ACTUATORS_PWM_SUPERVISION_H
+#define ACTUATORS_PWM_SUPERVISION_H
+
+#include "firmwares/rotorcraft/actuators/supervision.h"
+
+#endif /* ACTUATORS_PWM_SUPERVISION_H */
diff --git a/sw/airborne/booz/booz2_datalink.c b/sw/airborne/firmwares/rotorcraft/datalink.c
similarity index 100%
rename from sw/airborne/booz/booz2_datalink.c
rename to sw/airborne/firmwares/rotorcraft/datalink.c
diff --git a/sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c b/sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c
index dff5047344..03a4b251b2 100644
--- a/sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c
+++ b/sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c
@@ -37,6 +37,14 @@
#include "generated/airframe.h"
+/* In case Asctec controllers are used without supervision */
+#ifndef SUPERVISION_MIN_MOTOR
+#define SUPERVISION_MIN_MOTOR 1
+#endif
+#ifndef SUPERVISION_MAX_MOTOR
+#define SUPERVISION_MAX_MOTOR 200
+#endif
+
uint8_t guidance_v_mode;
int32_t guidance_v_ff_cmd;
int32_t guidance_v_fb_cmd;
@@ -103,7 +111,7 @@ void guidance_v_read_rc(void) {
// used in RC_DIRECT directly and as saturation in CLIMB and HOVER
#ifndef USE_HELI
- guidance_v_rc_delta_t = (int32_t)radio_control.values[RADIO_THROTTLE] * 200 / MAX_PPRZ;
+ guidance_v_rc_delta_t = (int32_t)radio_control.values[RADIO_THROTTLE] * (SUPERVISION_MAX_MOTOR - SUPERVISION_MIN_MOTOR) / MAX_PPRZ + SUPERVISION_MIN_MOTOR;
#else
guidance_v_rc_delta_t = (int32_t)radio_control.values[RADIO_THROTTLE] * 4 / 5;
#endif
@@ -153,8 +161,9 @@ void guidance_v_run(bool_t in_flight) {
// AKA SUPERVISION and co
if (in_flight) {
// we should use something after the supervision!!! fuck!!!
- int32_t cmd_hack = Chop(stabilization_cmd[COMMAND_THRUST], 1, 200);
+ int32_t cmd_hack = Chop(stabilization_cmd[COMMAND_THRUST], SUPERVISION_MIN_MOTOR, SUPERVISION_MAX_MOTOR);
gv_adapt_run(ins_ltp_accel.z, cmd_hack);
+ //gv_adapt_run(ins_ltp_accel.z, cmd_hack, guidance_v_zd_ref);
}
else {
// reset vertical filter until takeoff
diff --git a/sw/airborne/firmwares/rotorcraft/main.c b/sw/airborne/firmwares/rotorcraft/main.c
index 4d72a022e3..ad0bf0e3c0 100644
--- a/sw/airborne/firmwares/rotorcraft/main.c
+++ b/sw/airborne/firmwares/rotorcraft/main.c
@@ -32,6 +32,7 @@
#include "downlink.h"
#include "firmwares/rotorcraft/telemetry.h"
#include "datalink.h"
+#include "xbee.h"
#include "booz2_commands.h"
#include "firmwares/rotorcraft/actuators.h"
@@ -42,6 +43,7 @@
#include "booz/booz2_analog.h"
#include "subsystems/sensors/baro.h"
+#include "baro_board.h"
#include "firmwares/rotorcraft/battery.h"
@@ -54,10 +56,6 @@
#include "subsystems/ahrs.h"
#include "subsystems/ins.h"
-#if defined USE_CAM || USE_DROP
-#include "booz2_pwm_hw.h"
-#endif
-
#include "firmwares/rotorcraft/main.h"
#ifdef SITL
@@ -66,7 +64,8 @@
#include "generated/modules.h"
-static inline void on_gyro_accel_event( void );
+static inline void on_gyro_event( void );
+static inline void on_accel_event( void );
static inline void on_baro_abs_event( void );
static inline void on_baro_dif_event( void );
static inline void on_gps_event( void );
@@ -87,11 +86,13 @@ int main( void ) {
STATIC_INLINE void main_init( void ) {
+#ifndef NO_FUCKING_STARTUP_DELAY
#ifndef RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT
/* IF THIS IS NEEDED SOME PERHIPHERAL THEN PLEASE MOVE IT THERE */
for (uint32_t startup_counter=0; startup_counter<2000000; startup_counter++){
__asm("nop");
}
+#endif
#endif
mcu_init();
@@ -101,13 +102,13 @@ STATIC_INLINE void main_init( void ) {
actuators_init();
radio_control_init();
+#if DATALINK == XBEE
+ xbee_init();
+#endif
+
booz2_analog_init();
baro_init();
-#if defined USE_CAM || USE_DROP
- booz2_pwm_init_hw();
-#endif
-
battery_init();
imu_init();
@@ -143,33 +144,32 @@ STATIC_INLINE void main_periodic( void ) {
/* set actuators */
actuators_set(autopilot_motors_on);
- PeriodicPrescaleBy10( \
- { \
- radio_control_periodic_task(); \
- if (radio_control.status != RC_OK && \
- autopilot_mode != AP_MODE_KILL && \
- autopilot_mode != AP_MODE_NAV) \
- autopilot_set_mode(AP_MODE_FAILSAFE); \
- }, \
- { \
- /* booz_fms_periodic(); FIXME */ \
- }, \
- { \
- /*BoozControlSurfacesSetFromCommands();*/ \
- }, \
- { \
- LED_PERIODIC(); \
- }, \
- { baro_periodic();
- }, \
- {}, \
- {}, \
- {}, \
- {}, \
- { \
- Booz2TelemetryPeriodic(); \
- } \
- ); \
+ PeriodicPrescaleBy10( \
+ { \
+ radio_control_periodic_task(); \
+ if (radio_control.status != RC_OK && \
+ autopilot_mode != AP_MODE_KILL && \
+ autopilot_mode != AP_MODE_NAV) \
+ autopilot_set_mode(AP_MODE_FAILSAFE); \
+ }, \
+ { \
+ /* booz_fms_periodic(); FIXME */ \
+ }, \
+ { \
+ /*BoozControlSurfacesSetFromCommands();*/ \
+ }, \
+ { \
+ LED_PERIODIC(); \
+ }, \
+ { baro_periodic(); \
+ }, \
+ {}, \
+ {}, \
+ {}, \
+ {}, \
+ { \
+ Booz2TelemetryPeriodic(); \
+ } );
#ifdef USE_GPS
if (radio_control.status != RC_OK && \
@@ -198,7 +198,7 @@ STATIC_INLINE void main_event( void ) {
RadioControlEvent(autopilot_on_rc_frame);
}
- ImuEvent(on_gyro_accel_event, on_mag_event);
+ ImuEvent(on_gyro_event, on_accel_event, on_mag_event);
BaroEvent(on_baro_abs_event, on_baro_dif_event);
@@ -214,10 +214,17 @@ STATIC_INLINE void main_event( void ) {
}
-static inline void on_gyro_accel_event( void ) {
+static inline void on_accel_event( void ) {
+ ImuScaleAccel(imu);
+
+ if (ahrs.status != AHRS_UNINIT) {
+ ahrs_update_accel();
+ }
+}
+
+static inline void on_gyro_event( void ) {
ImuScaleGyro(imu);
- ImuScaleAccel(imu);
if (ahrs.status == AHRS_UNINIT) {
ahrs_aligner_run();
@@ -226,7 +233,6 @@ static inline void on_gyro_accel_event( void ) {
}
else {
ahrs_propagate();
- ahrs_update_accel();
#ifdef SITL
if (nps_bypass_ahrs) sim_overwrite_ahrs();
#endif
diff --git a/sw/airborne/firmwares/tutorial/main_demo2.c b/sw/airborne/firmwares/tutorial/main_demo2.c
index 005b76e505..0ced604473 100644
--- a/sw/airborne/firmwares/tutorial/main_demo2.c
+++ b/sw/airborne/firmwares/tutorial/main_demo2.c
@@ -1,6 +1,6 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
@@ -17,7 +17,7 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
}
diff --git a/sw/airborne/firmwares/tutorial/main_demo3.c b/sw/airborne/firmwares/tutorial/main_demo3.c
index 29ae419e12..5699adefe5 100644
--- a/sw/airborne/firmwares/tutorial/main_demo3.c
+++ b/sw/airborne/firmwares/tutorial/main_demo3.c
@@ -19,11 +19,11 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
uart0_init_tx();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/firmwares/tutorial/main_demo6.c b/sw/airborne/firmwares/tutorial/main_demo6.c
index af9d8f777a..dd312de7a2 100644
--- a/sw/airborne/firmwares/tutorial/main_demo6.c
+++ b/sw/airborne/firmwares/tutorial/main_demo6.c
@@ -1,5 +1,5 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
@@ -21,11 +21,11 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
usb_serial_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/firmwares/vor/lpc_vor_main.c b/sw/airborne/firmwares/vor/lpc_vor_main.c
index dd1e2e77d6..bb6ee1e1b4 100644
--- a/sw/airborne/firmwares/vor/lpc_vor_main.c
+++ b/sw/airborne/firmwares/vor/lpc_vor_main.c
@@ -1,9 +1,9 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "print.h"
//#include "messages.h"
//#include "downlink.h"
@@ -86,14 +86,14 @@ static inline void main_report( void ) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
uart0_init();
vor_int_demod_init();
VorDacInit();
vor_adc_init();
- int_enable();
+ mcu_int_enable();
}
diff --git a/sw/airborne/firmwares/wind_tunnel/main.c b/sw/airborne/firmwares/wind_tunnel/main.c
index a8f779296a..e32d4f3441 100644
--- a/sw/airborne/firmwares/wind_tunnel/main.c
+++ b/sw/airborne/firmwares/wind_tunnel/main.c
@@ -1,9 +1,9 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
@@ -38,7 +38,7 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
uart0_init();
@@ -50,7 +50,7 @@ static inline void main_init( void ) {
spi_init();
wt_baro_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/firmwares/wind_tunnel/main_mb.c b/sw/airborne/firmwares/wind_tunnel/main_mb.c
index 48e0403f44..437e0fab32 100644
--- a/sw/airborne/firmwares/wind_tunnel/main_mb.c
+++ b/sw/airborne/firmwares/wind_tunnel/main_mb.c
@@ -1,9 +1,9 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
@@ -37,7 +37,7 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
uart0_init();
@@ -49,7 +49,7 @@ static inline void main_init( void ) {
//motor_power = 0;
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/fms/lpc_test_spi.c b/sw/airborne/fms/lpc_test_spi.c
index 9ca9f5b902..97a0de0407 100644
--- a/sw/airborne/fms/lpc_test_spi.c
+++ b/sw/airborne/fms/lpc_test_spi.c
@@ -24,7 +24,7 @@
#include
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "interrupt_hw.h"
#include "armVIC.h"
@@ -50,10 +50,10 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_spi_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic_task( void ) {
diff --git a/sw/airborne/fms/overo_test_passthrough.c b/sw/airborne/fms/overo_test_passthrough.c
index 826975fd6c..47002d5037 100644
--- a/sw/airborne/fms/overo_test_passthrough.c
+++ b/sw/airborne/fms/overo_test_passthrough.c
@@ -84,7 +84,7 @@ static void dialog_with_io_proc() {
uint8_t crc_valid;
for (uint8_t i=0; i<6; i++) msg_out.payload.msg_down.pwm_outputs_usecs[i] = otp.servos_outputs_usecs[i];
- for (uint8_t i=0; i<4; i++) msg_out.payload.msg_down.csc_servo_cmd[i] = otp.csc_servo_outputs[i];
+// for (uint8_t i=0; i<4; i++) msg_out.payload.msg_down.csc_servo_cmd[i] = otp.csc_servo_outputs[i];
spi_link_send(&msg_out, sizeof(struct AutopilotMessageCRCFrame), &msg_in, &crc_valid);
diff --git a/sw/airborne/gps.h b/sw/airborne/gps.h
index b6c28317b8..e201bc4980 100644
--- a/sw/airborne/gps.h
+++ b/sw/airborne/gps.h
@@ -56,7 +56,7 @@ extern uint8_t gps_status_flags;
extern uint8_t gps_sol_flags;
extern uint16_t gps_week; /* weeks */
extern uint32_t gps_itow; /* ms */
-extern int32_t gps_alt; /* cm */
+extern int32_t gps_alt; /* above MSL in cm */
extern uint16_t gps_speed_3d; /* cm/s */
extern uint16_t gps_gspeed; /* cm/s */
extern int16_t gps_climb; /* m/s */
diff --git a/sw/airborne/latlong.c b/sw/airborne/latlong.c
index f0f158ad48..9aff7963cc 100644
--- a/sw/airborne/latlong.c
+++ b/sw/airborne/latlong.c
@@ -69,15 +69,13 @@ static inline float inverse_isometric_latitude(float lat, float e, float epsilon
return phi0;
}
-/** us on arm7@60MHz, i.e. % of cputime at 4Hz
+/** use on ARM7 at 60MHz, i.e. percentage of cputime at 4Hz
specialize CSin: 951us i.e.
One CSin: 120us
init:
- iso_lat: 155, 172
+ iso_lat: 155, 172
for loop: 258
-
-
- %*/
+*/
#define LambdaOfUtmZone(utm_zone) RadOfDeg((utm_zone-1)*6-180+3)
diff --git a/sw/airborne/led.h b/sw/airborne/led.h
index 98a943dbed..55a9c0493e 100644
--- a/sw/airborne/led.h
+++ b/sw/airborne/led.h
@@ -31,8 +31,7 @@
#ifndef LED_H
#define LED_H
-// FIXME : remove LED
-#if defined USE_LED || defined LED
+#if defined USE_LED
#include "led_hw.h"
diff --git a/sw/airborne/lisa/lisa_stm_gps_passthrough_main.c b/sw/airborne/lisa/lisa_stm_gps_passthrough_main.c
index 5a115a0c74..a718ad9a7c 100644
--- a/sw/airborne/lisa/lisa_stm_gps_passthrough_main.c
+++ b/sw/airborne/lisa/lisa_stm_gps_passthrough_main.c
@@ -22,7 +22,7 @@
*
*/
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "lisa/lisa_overo_link.h"
#include "lisa/lisa_spistream.h"
@@ -91,7 +91,7 @@ int main(void) {
static inline void main_init(void) {
- hw_init();
+ mcu_init();
sys_time_init();
overo_link_init();
diff --git a/sw/airborne/lisa/lisa_stm_passthrough_main.c b/sw/airborne/lisa/lisa_stm_passthrough_main.c
index 60a3725cd6..2a23a7c705 100644
--- a/sw/airborne/lisa/lisa_stm_passthrough_main.c
+++ b/sw/airborne/lisa/lisa_stm_passthrough_main.c
@@ -23,20 +23,21 @@
*/
#include "mcu.h"
+#include "mcu_periph/uart.h"
#include "sys_time.h"
#include "downlink.h"
#include "booz/booz2_commands.h"
#include "actuators.h"
#include "actuators/actuators_pwm.h"
#include "subsystems/imu.h"
-#include "booz/booz_radio_control.h"
+#include "subsystems/radio_control.h"
#include "autopilot.h"
-#include "ins.h"
+#include "subsystems/ins.h"
#include "guidance.h"
#include "navigation.h"
#include "lisa/lisa_overo_link.h"
#include "generated/airframe.h"
-#include "ahrs.h"
+#include "subsystems/ahrs.h"
#ifdef PASSTHROUGH_CYGNUS
#include "stabilization.h"
#endif
@@ -54,6 +55,7 @@ static inline void main_periodic(void);
static inline void main_event(void);
static inline void on_gyro_accel_event(void);
+static inline void on_accel_event(void);
static inline void on_mag_event(void);
static inline void on_overo_link_msg_received(void);
@@ -283,6 +285,9 @@ static inline void on_overo_link_lost(void) {
static inline void on_overo_link_crc_failed(void) {
}
+static inline void on_accel_event(void) {
+}
+
static inline void on_gyro_accel_event(void) {
ImuScaleGyro(imu);
ImuScaleAccel(imu);
@@ -336,7 +341,7 @@ static inline void main_on_baro_abs(void) {
static inline void main_event(void) {
- ImuEvent(on_gyro_accel_event, on_mag_event);
+ ImuEvent(on_gyro_accel_event, on_accel_event, on_mag_event);
BaroEvent(main_on_baro_abs, main_on_baro_diff);
OveroLinkEvent(on_overo_link_msg_received, on_overo_link_crc_failed);
RadioControlEvent(on_rc_message);
diff --git a/sw/airborne/lisa/stm_test_spi_link.c b/sw/airborne/lisa/stm_test_spi_link.c
index 0f5ae21ae5..6aed277afc 100644
--- a/sw/airborne/lisa/stm_test_spi_link.c
+++ b/sw/airborne/lisa/stm_test_spi_link.c
@@ -27,7 +27,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "lisa/lisa_overo_link.h"
@@ -42,7 +42,7 @@ static inline void on_overo_link_lost(void);
int main(void) {
- hw_init();
+ mcu_init();
sys_time_init();
overo_link_init();
DEBUG_SERVO1_INIT();
diff --git a/sw/airborne/lisa/test/hs_gyro.c b/sw/airborne/lisa/test/hs_gyro.c
index e82e1dd4be..544e4579c2 100644
--- a/sw/airborne/lisa/test/hs_gyro.c
+++ b/sw/airborne/lisa/test/hs_gyro.c
@@ -45,6 +45,7 @@ static inline void main_periodic_task( void );
static inline void main_event_task( void );
static inline void on_gyro_accel_event(void);
+static inline void on_accel_event(void);
static inline void on_mag_event(void);
int main( void ) {
@@ -77,10 +78,14 @@ static inline void main_periodic_task( void ) {
static inline void main_event_task( void ) {
- ImuEvent(on_gyro_accel_event, on_mag_event);
+ ImuEvent(on_gyro_accel_event, on_accel_event, on_mag_event);
}
+
+static inline void on_accel_event(void) {
+}
+
#define NB_SAMPLES 20
static inline void on_gyro_accel_event(void) {
diff --git a/sw/airborne/lisa/test/lisa_test_actuators_mkk.c b/sw/airborne/lisa/test/lisa_test_actuators_mkk.c
index 2c5a646ebc..bc3e4c8f64 100644
--- a/sw/airborne/lisa/test/lisa_test_actuators_mkk.c
+++ b/sw/airborne/lisa/test/lisa_test_actuators_mkk.c
@@ -22,7 +22,7 @@
*/
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "booz2_commands.h"
#include "actuators.h"
@@ -49,7 +49,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
actuators_init();
}
diff --git a/sw/airborne/lisa/test/lisa_test_adxl345.c b/sw/airborne/lisa/test/lisa_test_adxl345.c
index 40f6bd8906..6b8c65ca58 100644
--- a/sw/airborne/lisa/test/lisa_test_adxl345.c
+++ b/sw/airborne/lisa/test/lisa_test_adxl345.c
@@ -35,7 +35,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
@@ -63,7 +63,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_init_hw();
diff --git a/sw/airborne/lisa/test/lisa_test_adxl345_dma.c b/sw/airborne/lisa/test/lisa_test_adxl345_dma.c
index 20dfd6f70b..fa74e5018a 100644
--- a/sw/airborne/lisa/test/lisa_test_adxl345_dma.c
+++ b/sw/airborne/lisa/test/lisa_test_adxl345_dma.c
@@ -29,7 +29,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
@@ -58,7 +58,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_init_hw();
diff --git a/sw/airborne/lisa/test/lisa_test_aspirin.c b/sw/airborne/lisa/test/lisa_test_aspirin.c
index 4f7cbecbb3..2641273fe2 100644
--- a/sw/airborne/lisa/test/lisa_test_aspirin.c
+++ b/sw/airborne/lisa/test/lisa_test_aspirin.c
@@ -28,7 +28,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
@@ -60,7 +60,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_init_hw();
diff --git a/sw/airborne/lisa/test/lisa_test_hmc5843.c b/sw/airborne/lisa/test/lisa_test_hmc5843.c
index 64b786a367..b21d0c84e9 100644
--- a/sw/airborne/lisa/test/lisa_test_hmc5843.c
+++ b/sw/airborne/lisa/test/lisa_test_hmc5843.c
@@ -34,11 +34,12 @@
*/
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
#include "std.h"
+#include "mcu_periph/uart.h"
#include "peripherals/hmc5843.h"
#include "my_debug_servo.h"
#include "math/pprz_algebra_int.h"
@@ -74,7 +75,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_init_hw();
}
diff --git a/sw/airborne/lisa/test/lisa_test_itg3200.c b/sw/airborne/lisa/test/lisa_test_itg3200.c
index 9e425cdad2..66848cb408 100644
--- a/sw/airborne/lisa/test/lisa_test_itg3200.c
+++ b/sw/airborne/lisa/test/lisa_test_itg3200.c
@@ -35,7 +35,9 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
+#include "mcu_periph/uart.h"
+#include "mcu_periph/i2c.h"
#include "sys_time.h"
#include "downlink.h"
#include "std.h"
@@ -71,7 +73,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_init_hw();
}
diff --git a/sw/airborne/lisa/test/lisa_test_max1168.c b/sw/airborne/lisa/test/lisa_test_max1168.c
index af7bc514c9..38a6cc67bc 100644
--- a/sw/airborne/lisa/test/lisa_test_max1168.c
+++ b/sw/airborne/lisa/test/lisa_test_max1168.c
@@ -29,7 +29,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
#include "peripherals/max1168.h"
@@ -54,7 +54,7 @@ int main(void) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
max1168_init();
main_spi2_init();
diff --git a/sw/airborne/lisa/test/lisa_test_ms2001.c b/sw/airborne/lisa/test/lisa_test_ms2001.c
deleted file mode 100644
index 1eb0342e80..0000000000
--- a/sw/airborne/lisa/test/lisa_test_ms2001.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2010 Antoine Drouin
- *
- * 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, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include BOARD_CONFIG
-#include "init_hw.h"
-#include "sys_time.h"
-#include "downlink.h"
-#include "peripherals/ms2001.h"
-
-static inline void main_init( void );
-static inline void main_periodic_task( void );
-static inline void main_event_task( void );
-
-static inline void main_spi2_init(void);
-
-int main(void) {
- main_init();
-
- while(1) {
- if (sys_time_periodic())
- main_periodic_task();
- main_event_task();
- }
-
- return 0;
-}
-
-
-static inline void main_init( void ) {
- hw_init();
- sys_time_init();
- ms2001_init();
- main_spi2_init();
-}
-
-static inline void main_periodic_task( void ) {
- RunOnceEvery(10,
- {
- DOWNLINK_SEND_BOOT(DefaultChannel, &cpu_time_sec);
- LED_PERIODIC();
- });
-
- switch(ms2001_status) {
- case MS2001_IDLE:
- Ms2001SendReq();
- break;
- case MS2001_WAITING_EOC:
- if (Ms2001HasEOC()) {
- Ms2001ReadRes();
- }
- break;
- }
-}
-
-static inline void main_event_task( void ) {
- if (ms2001_status == MS2001_DATA_AVAILABLE) {
- RunOnceEvery(10, {
- DOWNLINK_SEND_IMU_MAG_RAW(DefaultChannel,
- &ms2001_values[0],
- &ms2001_values[1],
- &ms2001_values[2]);
- });
- ms2001_status = MS2001_IDLE;
- }
-}
-
-static inline void main_spi2_init( void ) {
-
- /* set max1168 slave select as output and assert it ( on PB12) */
- GPIOB->BSRR = GPIO_Pin_12;
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
- GPIO_InitTypeDef GPIO_InitStructure;
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_Init(GPIOB, &GPIO_InitStructure);
-
- /* Enable SPI2 Periph clock -------------------------------------------------*/
- RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
-
- /* Configure GPIOs: SCK, MISO and MOSI --------------------------------*/
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15;
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
- GPIO_Init(GPIOB, &GPIO_InitStructure);
-
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO , ENABLE);
-
-
- /* Enable SPI_2 DMA clock ---------------------------------------------------*/
- RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
-
-
-
-}
-
diff --git a/sw/airborne/lisa/test/lisa_test_ms2100.c b/sw/airborne/lisa/test/lisa_test_ms2100.c
index cedf7cacd2..1bf869b3fa 100644
--- a/sw/airborne/lisa/test/lisa_test_ms2100.c
+++ b/sw/airborne/lisa/test/lisa_test_ms2100.c
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * Copyright (C) 2009 Antoine Drouin
+ * Copyright (C) 2010 Antoine Drouin
*
* This file is part of paparazzi.
*
@@ -29,7 +29,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
#include "peripherals/ms2100.h"
@@ -54,48 +54,53 @@ int main(void) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
- max1168_init();
+ ms2100_init();
main_spi2_init();
}
static inline void main_periodic_task( void ) {
- // LED_TOGGLE(6);
- max1168_read();
RunOnceEvery(10,
{
DOWNLINK_SEND_BOOT(DefaultChannel, &cpu_time_sec);
LED_PERIODIC();
});
-}
-
-static inline void main_event_task( void ) {
- if (max1168_status == STA_MAX1168_DATA_AVAILABLE) {
- RunOnceEvery(10, {
- DOWNLINK_SEND_IMU_GYRO_RAW(DefaultChannel, &max1168_values[0], &max1168_values[1], &max1168_values[2]);
- DOWNLINK_SEND_IMU_ACCEL_RAW(DefaultChannel, &max1168_values[3], &max1168_values[4], &max1168_values[6]);
- // DOWNLINK_SEND_BOOT(DefaultChannel, &max1168_values[7]); });
- });
- max1168_status = STA_MAX1168_IDLE;
+ switch(ms2100_status) {
+ case MS2100_IDLE:
+ Ms2001SendReq();
+ break;
+ case MS2100_WAITING_EOC:
+ if (Ms2001HasEOC()) {
+ Ms2001ReadRes();
+ }
+ break;
}
}
+static inline void main_event_task( void ) {
+ if (ms2100_status == MS2100_DATA_AVAILABLE) {
+ RunOnceEvery(10, {
+ DOWNLINK_SEND_IMU_MAG_RAW(DefaultChannel,
+ &ms2100_values[0],
+ &ms2100_values[1],
+ &ms2100_values[2]);
+ });
+ ms2100_status = MS2100_IDLE;
+ }
+}
static inline void main_spi2_init( void ) {
- /* set mag ss as output and assert it (on PC12) ------------------------------*/
- /* set mag reset as output and assert it (on PC13) ------------------------------*/
- GPIOC->BSRR = GPIO_Pin_12;
- GPIOC->BSRR = GPIO_Pin_13;
-
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
+ /* set max1168 slave select as output and assert it ( on PB12) */
+ GPIOB->BSRR = GPIO_Pin_12;
+ RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
GPIO_InitTypeDef GPIO_InitStructure;
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13;
+ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_Init(GPIOC, &GPIO_InitStructure);
+ GPIO_Init(GPIOB, &GPIO_InitStructure);
/* Enable SPI2 Periph clock -------------------------------------------------*/
RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
@@ -108,24 +113,11 @@ static inline void main_spi2_init( void ) {
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO , ENABLE);
- /* SPI Master configuration --------------------------------------------------*/
- SPI_InitTypeDef SPI_InitStructure;
- SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
- SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
- SPI_InitStructure.SPI_DataSize = SPI_DataSize_16b;
- SPI_InitStructure.SPI_CPOL = SPI_CPOL_Low;
- SPI_InitStructure.SPI_CPHA = SPI_CPHA_1Edge;
- SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
- SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_8;
- SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
- SPI_InitStructure.SPI_CRCPolynomial = 7;
- SPI_Init(SPI2, &SPI_InitStructure);
-
- /* Enable SPI */
- SPI_Cmd(SPI2, ENABLE);
/* Enable SPI_2 DMA clock ---------------------------------------------------*/
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
+
+
}
diff --git a/sw/airborne/lisa/test/lisa_test_sc18is600.c b/sw/airborne/lisa/test/lisa_test_sc18is600.c
index 044ba8cad3..846e4cab96 100644
--- a/sw/airborne/lisa/test/lisa_test_sc18is600.c
+++ b/sw/airborne/lisa/test/lisa_test_sc18is600.c
@@ -26,7 +26,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
#include "peripherals/sc18is600.h"
@@ -51,7 +51,7 @@ int main(void) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
sc18is600_init();
main_spi2_init();
diff --git a/sw/airborne/lisa/test/lisa_tunnel.c b/sw/airborne/lisa/test/lisa_tunnel.c
index 1a7bec287a..48c5072eca 100644
--- a/sw/airborne/lisa/test/lisa_tunnel.c
+++ b/sw/airborne/lisa/test/lisa_tunnel.c
@@ -44,7 +44,7 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
}
diff --git a/sw/airborne/lisa/test/test_board.c b/sw/airborne/lisa/test/test_board.c
index 292fb22bca..603f6ec155 100644
--- a/sw/airborne/lisa/test/test_board.c
+++ b/sw/airborne/lisa/test/test_board.c
@@ -98,7 +98,7 @@ int main( void ) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
led_init();
diff --git a/sw/airborne/lisa/test/test_bswap.c b/sw/airborne/lisa/test/test_bswap.c
index b1a9cc5bc3..ccf1a9ad33 100644
--- a/sw/airborne/lisa/test/test_bswap.c
+++ b/sw/airborne/lisa/test/test_bswap.c
@@ -1,6 +1,6 @@
#include
-#include "init_hw.h"
+#include "mcu.h"
#define MyByteSwap16(n) \
diff --git a/sw/airborne/lisa/test/test_mc_asctec_v1_simple.c b/sw/airborne/lisa/test/test_mc_asctec_v1_simple.c
index be1a213223..b83160e704 100644
--- a/sw/airborne/lisa/test/test_mc_asctec_v1_simple.c
+++ b/sw/airborne/lisa/test/test_mc_asctec_v1_simple.c
@@ -28,7 +28,7 @@
*/
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
@@ -51,7 +51,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
}
diff --git a/sw/airborne/lisa/test_adc.c b/sw/airborne/lisa/test_adc.c
index 7132bc90e3..2666e8f0bb 100644
--- a/sw/airborne/lisa/test_adc.c
+++ b/sw/airborne/lisa/test_adc.c
@@ -30,6 +30,7 @@
#include "sys_time.h"
#include "led.h"
#include "mcu_periph/adc.h"
+#include "mcu_periph/uart.h"
#include "downlink.h"
int main_periodic(void);
diff --git a/sw/airborne/lisa/test_csc_servo.c b/sw/airborne/lisa/test_csc_servo.c
index d0fe135f49..7249d89ec4 100644
--- a/sw/airborne/lisa/test_csc_servo.c
+++ b/sw/airborne/lisa/test_csc_servo.c
@@ -22,7 +22,7 @@
*/
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "csc_msg_def.h"
#include "csc_protocol.h"
diff --git a/sw/airborne/lisa/test_datalink.c b/sw/airborne/lisa/test_datalink.c
index 2315f1370f..ce5a02f314 100644
--- a/sw/airborne/lisa/test_datalink.c
+++ b/sw/airborne/lisa/test_datalink.c
@@ -24,7 +24,7 @@
#define DATALINK_C
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
@@ -47,7 +47,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
}
diff --git a/sw/airborne/lisa/test_float.c b/sw/airborne/lisa/test_float.c
index 0188012ca9..0339888cac 100644
--- a/sw/airborne/lisa/test_float.c
+++ b/sw/airborne/lisa/test_float.c
@@ -24,7 +24,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
static inline void main_init( void );
@@ -43,7 +43,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
}
diff --git a/sw/airborne/lisa/test_led.c b/sw/airborne/lisa/test_led.c
index 887d62e540..0052006f56 100644
--- a/sw/airborne/lisa/test_led.c
+++ b/sw/airborne/lisa/test_led.c
@@ -25,7 +25,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "led.h"
void Delay(__IO uint32_t nCount);
@@ -38,7 +38,7 @@ const int LED_PROG_OFF[LED_PROGRAM_SIZE] = {-1, -1, -1, -1, 3, 5, 7, 1,
int main(void) {
int i = 0;
- hw_init();
+ mcu_init();
while (1) {
for (i=0; i< LED_PROGRAM_SIZE; i++)
{
diff --git a/sw/airborne/lisa/test_mc.c b/sw/airborne/lisa/test_mc.c
index fa6f1a3d3c..978c2857d1 100644
--- a/sw/airborne/lisa/test_mc.c
+++ b/sw/airborne/lisa/test_mc.c
@@ -30,7 +30,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
static inline void main_init( void );
@@ -55,7 +55,7 @@ int main(void) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_i2c_init();
test_gpios();
diff --git a/sw/airborne/lisa/test_periodic.c b/sw/airborne/lisa/test_periodic.c
index 40f8c1371f..6104c4ad3e 100644
--- a/sw/airborne/lisa/test_periodic.c
+++ b/sw/airborne/lisa/test_periodic.c
@@ -25,7 +25,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
static inline void main_init( void );
@@ -43,7 +43,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
}
diff --git a/sw/airborne/lisa/test_servos.c b/sw/airborne/lisa/test_servos.c
index 4bf9235b67..533feedc1a 100644
--- a/sw/airborne/lisa/test_servos.c
+++ b/sw/airborne/lisa/test_servos.c
@@ -23,7 +23,7 @@
#include
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "firmwares/rotorcraft/actuators/actuators_pwm.h"
@@ -41,7 +41,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
actuators_init();
}
diff --git a/sw/airborne/lisa/test_spi_slave.c b/sw/airborne/lisa/test_spi_slave.c
index 001219a8e4..d78e32ccdd 100644
--- a/sw/airborne/lisa/test_spi_slave.c
+++ b/sw/airborne/lisa/test_spi_slave.c
@@ -26,7 +26,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
@@ -51,7 +51,7 @@ int main(void) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_spi_slave_init();
}
diff --git a/sw/airborne/lisa/test_spi_slave2.c b/sw/airborne/lisa/test_spi_slave2.c
index 75c5e8ecc8..09bdee54e5 100644
--- a/sw/airborne/lisa/test_spi_slave2.c
+++ b/sw/airborne/lisa/test_spi_slave2.c
@@ -27,7 +27,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "downlink.h"
#include "fms/fms_autopilot_msg.h"
@@ -59,7 +59,7 @@ int main(void) {
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
main_spi_slave_init();
}
diff --git a/sw/airborne/lisa/test_uart.c b/sw/airborne/lisa/test_uart.c
index cd0a3314f5..599c9581d2 100644
--- a/sw/airborne/lisa/test_uart.c
+++ b/sw/airborne/lisa/test_uart.c
@@ -28,7 +28,8 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
+#include "mcu_periph/uart.h"
#include "sys_time.h"
static inline void main_init( void );
@@ -46,7 +47,7 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
}
diff --git a/sw/airborne/lisa/tunnel_hw.c b/sw/airborne/lisa/tunnel_hw.c
index 0d9770e05b..10741ff5ae 100644
--- a/sw/airborne/lisa/tunnel_hw.c
+++ b/sw/airborne/lisa/tunnel_hw.c
@@ -27,7 +27,7 @@
#include
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
@@ -52,7 +52,7 @@ void Delay(__IO uint32_t nCount) {
int main(void) {
- hw_init();
+ mcu_init();
sys_time_init();
diff --git a/sw/airborne/math/pprz_algebra.h b/sw/airborne/math/pprz_algebra.h
index f090c8a189..6e687e8dd3 100644
--- a/sw/airborne/math/pprz_algebra.h
+++ b/sw/airborne/math/pprz_algebra.h
@@ -101,7 +101,7 @@
}
/* a = b */
-#define VECT3_COPY(_a, _b) { \
+#define VECT3_COPY(_a, _b) { \
(_a).x = (_b).x; \
(_a).y = (_b).y; \
(_a).z = (_b).z; \
@@ -186,9 +186,9 @@
/* */
#define VECT3_BOUND_BOX(_v, _v_min, _v_max) { \
- if ((_v).x > (_v_max.x)) (_v).x = (_v_max.x); else if ((_v).x < (_v_min.x)) (_v).x = (_v_min.x); \
- if ((_v).y > (_v_max.y)) (_v).y = (_v_max.y); else if ((_v).y < (_v_min.y)) (_v).y = (_v_min.z); \
- if ((_v).z > (_v_max.y)) (_v).z = (_v_max.z); else if ((_v).z < (_v_min.z)) (_v).z = (_v_min.z); \
+ if ((_v).x > (_v_max).x) (_v).x = (_v_max).x; else if ((_v).x < (_v_min).x) (_v).x = (_v_min).x; \
+ if ((_v).y > (_v_max).y) (_v).y = (_v_max).y; else if ((_v).y < (_v_min).y) (_v).y = (_v_min).z; \
+ if ((_v).z > (_v_max).y) (_v).z = (_v_max).z; else if ((_v).z < (_v_min).z) (_v).z = (_v_min).z; \
}
@@ -204,9 +204,9 @@
}
#define EULERS_ASSIGN(_e, _phi, _theta, _psi) { \
- (_e).phi = _phi; \
- (_e).theta = _theta; \
- (_e).psi = _psi; \
+ (_e).phi = (_phi); \
+ (_e).theta = (_theta); \
+ (_e).psi = (_psi); \
}
/* a += b */
@@ -247,9 +247,9 @@
/* _v = Bound(_v, _min, _max) */
#define EULERS_BOUND_CUBE(_v, _min, _max) { \
- (_v).phi = (_v).phi < _min ? _min : (_v).phi > _max ? _max : (_v).phi; \
- (_v).theta = (_v).theta < _min ? _min : (_v).theta > _max ? _max : (_v).theta; \
- (_v).psi = (_v).psi < _min ? _min : (_v).psi > _max ? _max : (_v).psi; \
+ (_v).phi = (_v).phi < (_min) ? (_min) : (_v).phi > (_max) ? (_max) : (_v).phi; \
+ (_v).theta = (_v).theta < (_min) ? (_min) : (_v).theta > (_max) ? (_max) : (_v).theta; \
+ (_v).psi = (_v).psi < (_min) ? (_min) : (_v).psi > (_max) ? (_max) : (_v).psi; \
}
/*
@@ -313,24 +313,24 @@
}
/* Element wise vector multiplication */
-#define RATES_EWMULT_RSHIFT(c, a, b, _s) { \
- c.p = (a.p * b.p) >> (_s); \
- c.q = (a.q * b.q) >> (_s); \
- c.r = (a.r * b.r) >> (_s); \
+#define RATES_EWMULT_RSHIFT(c, a, b, _s) { \
+ (c).p = ((a).p * (b).p) >> (_s); \
+ (c).q = ((a).q * (b).q) >> (_s); \
+ (c).r = ((a).r * (b).r) >> (_s); \
}
/* _v = Bound(_v, _min, _max) */
#define RATES_BOUND_CUBE(_v, _min, _max) { \
- (_v).p = (_v).p < _min ? _min : (_v).p > _max ? _max : (_v).p; \
- (_v).q = (_v).q < _min ? _min : (_v).q > _max ? _max : (_v).q; \
- (_v).r = (_v).r < _min ? _min : (_v).r > _max ? _max : (_v).r; \
+ (_v).p = (_v).p < (_min) ? (_min) : (_v).p > (_max) ? (_max) : (_v).p; \
+ (_v).q = (_v).q < (_min) ? (_min) : (_v).q > (_max) ? (_max) : (_v).q; \
+ (_v).r = (_v).r < (_min) ? (_min) : (_v).r > (_max) ? (_max) : (_v).r; \
}
#define RATES_BOUND_BOX(_v, _v_min, _v_max) { \
- if ((_v).p > (_v_max.p)) (_v).p = (_v_max.p); else if ((_v).p < (_v_min.p)) (_v).p = (_v_min.p); \
- if ((_v).q > (_v_max.q)) (_v).q = (_v_max.q); else if ((_v).q < (_v_min.q)) (_v).q = (_v_min.q); \
- if ((_v).r > (_v_max.r)) (_v).r = (_v_max.r); else if ((_v).r < (_v_min.r)) (_v).r = (_v_min.r); \
+ if ((_v).p > (_v_max).p) (_v).p = (_v_max).p; else if ((_v).p < (_v_min).p) (_v).p = (_v_min).p; \
+ if ((_v).q > (_v_max).q) (_v).q = (_v_max).q; else if ((_v).q < (_v_min).q) (_v).q = (_v_min).q; \
+ if ((_v).r > (_v_max).r) (_v).r = (_v_max).r; else if ((_v).r < (_v_min).r) (_v).r = (_v_min).r; \
}
@@ -339,7 +339,7 @@
* 3x3 matrices
*/
/* accessor : row and col range from 0 to 2 */
-#define MAT33_ELMT(_m, _row, _col) ((_m).m[_row*3+_col])
+#define MAT33_ELMT(_m, _row, _col) ((_m).m[(_row)*3+(_col)])
#define MAT33_COPY(_mat1,_mat2) { \
MAT33_ELMT((_mat1),0,0) = MAT33_ELMT((_mat2),0,0); \
@@ -427,26 +427,26 @@
(_qc).qz = (_qa).qz - (_qb).qz; \
}
-#define QUAT_COPY(_qo, _qi) { \
+#define QUAT_COPY(_qo, _qi) { \
(_qo).qi = (_qi).qi; \
(_qo).qx = (_qi).qx; \
(_qo).qy = (_qi).qy; \
(_qo).qz = (_qi).qz; \
}
-#define QUAT_EXPLEMENTARY(b,a) { \
- b.qi = -a.qi; \
- b.qx = -a.qx; \
- b.qy = -a.qy; \
- b.qz = -a.qz; \
+#define QUAT_EXPLEMENTARY(b,a) { \
+ (b).qi = -(a).qi; \
+ (b).qx = -(a).qx; \
+ (b).qy = -(a).qy; \
+ (b).qz = -(a).qz; \
}
#define QUAT_SMUL(_qo, _qi, _s) { \
- (_qo).qi = (_qi).qi * _s; \
- (_qo).qx = (_qi).qx * _s; \
- (_qo).qy = (_qi).qy * _s; \
- (_qo).qz = (_qi).qz * _s; \
+ (_qo).qi = (_qi).qi * (_s); \
+ (_qo).qx = (_qi).qx * (_s); \
+ (_qo).qy = (_qi).qy * (_s); \
+ (_qo).qz = (_qi).qz * (_s); \
}
#define QUAT_ADD(_qo, _qi) { \
@@ -568,27 +568,27 @@
}
#define ACCELS_FLOAT_OF_BFP(_ef, _ei) { \
- (_ef).x = ACCEL_FLOAT_OF_BFP((_ei).x); \
- (_ef).y = ACCEL_FLOAT_OF_BFP((_ei).y); \
- (_ef).z = ACCEL_FLOAT_OF_BFP((_ei).z); \
+ (_ef).x = ACCEL_FLOAT_OF_BFP((_ei).x); \
+ (_ef).y = ACCEL_FLOAT_OF_BFP((_ei).y); \
+ (_ef).z = ACCEL_FLOAT_OF_BFP((_ei).z); \
}
#define ACCELS_BFP_OF_REAL(_ef, _ei) { \
- (_ef).x = ACCEL_BFP_OF_REAL((_ei).x); \
- (_ef).y = ACCEL_BFP_OF_REAL((_ei).y); \
- (_ef).z = ACCEL_BFP_OF_REAL((_ei).z); \
+ (_ef).x = ACCEL_BFP_OF_REAL((_ei).x); \
+ (_ef).y = ACCEL_BFP_OF_REAL((_ei).y); \
+ (_ef).z = ACCEL_BFP_OF_REAL((_ei).z); \
}
#define MAGS_FLOAT_OF_BFP(_ef, _ei) { \
- (_ef).x = MAG_FLOAT_OF_BFP((_ei).x); \
- (_ef).y = MAG_FLOAT_OF_BFP((_ei).y); \
- (_ef).z = MAG_FLOAT_OF_BFP((_ei).z); \
+ (_ef).x = MAG_FLOAT_OF_BFP((_ei).x); \
+ (_ef).y = MAG_FLOAT_OF_BFP((_ei).y); \
+ (_ef).z = MAG_FLOAT_OF_BFP((_ei).z); \
}
#define MAGS_BFP_OF_REAL(_ef, _ei) { \
- (_ef).x = MAG_BFP_OF_REAL((_ei).x); \
- (_ef).y = MAG_BFP_OF_REAL((_ei).y); \
- (_ef).z = MAG_BFP_OF_REAL((_ei).z); \
+ (_ef).x = MAG_BFP_OF_REAL((_ei).x); \
+ (_ef).y = MAG_BFP_OF_REAL((_ei).y); \
+ (_ef).z = MAG_BFP_OF_REAL((_ei).z); \
}
#endif /* PPRZ_ALGEBRA_H */
diff --git a/sw/airborne/math/pprz_algebra_double.h b/sw/airborne/math/pprz_algebra_double.h
index fd70ee2073..d712ae2f5f 100644
--- a/sw/airborne/math/pprz_algebra_double.h
+++ b/sw/airborne/math/pprz_algebra_double.h
@@ -1,3 +1,32 @@
+/*
+ * Copyright (C) 2008-2011 The Paparazzi Team
+ *
+ * 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
+ * .
+ *
+ */
+
+/**
+ * @file pprz_algebra_double.h
+ * @brief Paparazzi double precision floating point algebra.
+ *
+ * This is the more detailed description of this file.
+ *
+ */
+
#ifndef PPRZ_ALGEBRA_DOUBLE_H
#define PPRZ_ALGEBRA_DOUBLE_H
@@ -15,6 +44,9 @@ struct DoubleVect3 {
double z;
};
+/**
+ * @brief Roation quaternion
+ */
struct DoubleQuat {
double qi;
double qx;
@@ -26,20 +58,29 @@ struct DoubleMat33 {
double m[3*3];
};
+/**
+ * @brief rotation matrix
+ */
struct DoubleRMat {
double m[3*3];
};
+/**
+ * @brief euler angles
+ * @details Units: radians */
struct DoubleEulers {
- double phi;
- double theta;
- double psi;
+ double phi; ///< in radians
+ double theta; ///< in radians
+ double psi; ///< in radians
};
+/**
+ * @brief angular rates
+ * @details Units: rad/s^2 */
struct DoubleRates {
- double p;
- double q;
- double r;
+ double p; ///< in rad/s^2
+ double q; ///< in rad/s^2
+ double r; ///< in rad/s^2
};
#define DOUBLE_VECT3_ROUND(_v) DOUBLE_VECT3_RINT(_v, _v)
diff --git a/sw/airborne/math/pprz_algebra_float.h b/sw/airborne/math/pprz_algebra_float.h
index a534bbbea3..3b2bfb9688 100644
--- a/sw/airborne/math/pprz_algebra_float.h
+++ b/sw/airborne/math/pprz_algebra_float.h
@@ -1,7 +1,5 @@
/*
- * $Id$
- *
- * Copyright (C) 2008-2010 The Paparazzi Team
+ * Copyright (C) 2008-2011 The Paparazzi Team
*
* This file is part of paparazzi.
*
@@ -16,9 +14,16 @@
* 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, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * along with paparazzi; see the file COPYING. If not, see
+ * .
+ *
+ */
+
+/**
+ * @file pprz_algebra_float.h
+ * @brief Paparazzi floating point algebra.
+ *
+ * This is the more detailed description of this file.
*
*/
@@ -46,6 +51,9 @@ struct FloatVect3 {
float z;
};
+/**
+ * @brief Roation quaternion
+ */
struct FloatQuat {
float qi;
float qx;
@@ -57,20 +65,29 @@ struct FloatMat33 {
float m[3*3];
};
+/**
+ * @brief rotation matrix
+ */
struct FloatRMat {
float m[3*3];
};
+/**
+ * @brief euler angles
+ * @details Units: radians */
struct FloatEulers {
- float phi;
- float theta;
- float psi;
+ float phi; ///< in radians
+ float theta; ///< in radians
+ float psi; ///< in radians
};
+/**
+ * @brief angular rates
+ * @details Units: rad/s^2 */
struct FloatRates {
- float p;
- float q;
- float r;
+ float p; ///< in rad/s^2
+ float q; ///< in rad/s^2
+ float r; ///< in rad/s^2
};
#define FLOAT_ANGLE_NORMALIZE(_a) { \
diff --git a/sw/airborne/math/pprz_algebra_int.h b/sw/airborne/math/pprz_algebra_int.h
index 65c917207d..5570f8ee76 100644
--- a/sw/airborne/math/pprz_algebra_int.h
+++ b/sw/airborne/math/pprz_algebra_int.h
@@ -1,7 +1,5 @@
/*
- * $Id$
- *
- * Copyright (C) 2008-2010 The Paparazzi Team
+ * Copyright (C) 2008-2011 The Paparazzi Team
*
* This file is part of paparazzi.
*
@@ -16,9 +14,16 @@
* 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, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * along with paparazzi; see the file COPYING. If not, see
+ * .
+ *
+ */
+
+/**
+ * @file pprz_algebra_int.h
+ * @brief Paparazzi fixed point algebra.
+ *
+ * This is the more detailed description of this file.
*
*/
@@ -69,6 +74,9 @@ struct Int32Vect3 {
/* Rotation quaternions */
#define INT32_QUAT_FRAC 15
+/**
+ * @brief Roation quaternion
+ * @details Units: INT32_QUAT_FRAC */
struct Int32Quat {
int32_t qi;
int32_t qx;
@@ -84,17 +92,17 @@ struct Int32Quat {
#define INT32_ANGLE_PI (int32_t)ANGLE_BFP_OF_REAL( 3.1415926535897932384626433832795029)
#define INT32_ANGLE_2_PI (int32_t)ANGLE_BFP_OF_REAL(2.*3.1415926535897932384626433832795029)
-#define INT32_RAD_OF_DEG(_deg) (int32_t)(((int64_t)_deg * 14964008)/857374503)
-#define INT32_DEG_OF_RAD(_rad) (int32_t)(((int64_t)_rad * 857374503)/14964008)
+#define INT32_RAD_OF_DEG(_deg) (int32_t)(((int64_t)(_deg) * 14964008)/857374503)
+#define INT32_DEG_OF_RAD(_rad) (int32_t)(((int64_t)(_rad) * 857374503)/14964008)
#define INT32_ANGLE_NORMALIZE(_a) { \
- while (_a > INT32_ANGLE_PI) _a -= INT32_ANGLE_2_PI; \
- while (_a < -INT32_ANGLE_PI) _a += INT32_ANGLE_2_PI; \
+ while ((_a) > INT32_ANGLE_PI) (_a) -= INT32_ANGLE_2_PI; \
+ while ((_a) < -INT32_ANGLE_PI) (_a) += INT32_ANGLE_2_PI; \
}
#define INT32_COURSE_NORMALIZE(_a) { \
- while (_a < 0) _a += INT32_ANGLE_2_PI; \
- while (_a >= INT32_ANGLE_2_PI) _a -= INT32_ANGLE_2_PI; \
+ while ((_a) < 0) (_a) += INT32_ANGLE_2_PI; \
+ while ((_a) >= INT32_ANGLE_2_PI) (_a) -= INT32_ANGLE_2_PI; \
}
@@ -104,15 +112,22 @@ struct Int16Eulers {
int16_t psi;
};
+/**
+ * @brief euler angles
+ * @details Units: rad with INT32_ANGLE_FRAC */
struct Int32Eulers {
- int32_t phi;
- int32_t theta;
- int32_t psi;
+ int32_t phi; ///< in rad with INT32_ANGLE_FRAC
+ int32_t theta; ///< in rad with INT32_ANGLE_FRAC
+ int32_t psi; ///< in rad with INT32_ANGLE_FRAC
};
/* Rotation matrix. */
#define INT32_TRIG_FRAC 14
+
+/**
+ * @brief rotation matrix
+ * @details Units: rad with INT32_TRIG_FRAC */
struct Int32RMat {
int32_t m[3*3];
};
@@ -130,10 +145,13 @@ struct Int16Rates {
};
/* Rotational speed */
+/**
+ * @brief angular rates
+ * @details Units: rad/s^2 with INT32_RATE_FRAC */
struct Int32Rates {
- int32_t p;
- int32_t q;
- int32_t r;
+ int32_t p; ///< in rad/s^2 with INT32_RATE_FRAC
+ int32_t q; ///< in rad/s^2 with INT32_RATE_FRAC
+ int32_t r; ///< in rad/s^2 with INT32_RATE_FRAC
};
struct Int64Vect2 {
@@ -150,22 +168,22 @@ struct Int64Vect3 {
#define BFP_OF_REAL(_vr, _frac) ((_vr)*(1<<(_frac)))
#define FLOAT_OF_BFP(_vbfp, _frac) ((float)(_vbfp)/(1<<(_frac)))
-#define RATE_BFP_OF_REAL(_af) BFP_OF_REAL(_af, INT32_RATE_FRAC)
+#define RATE_BFP_OF_REAL(_af) BFP_OF_REAL((_af), INT32_RATE_FRAC)
#define RATE_FLOAT_OF_BFP(_ai) FLOAT_OF_BFP((_ai), INT32_RATE_FRAC)
-#define ANGLE_BFP_OF_REAL(_af) BFP_OF_REAL(_af, INT32_ANGLE_FRAC)
+#define ANGLE_BFP_OF_REAL(_af) BFP_OF_REAL((_af), INT32_ANGLE_FRAC)
#define ANGLE_FLOAT_OF_BFP(_ai) FLOAT_OF_BFP((_ai), INT32_ANGLE_FRAC)
-#define QUAT1_BFP_OF_REAL(_qf) BFP_OF_REAL(_qf, INT32_QUAT_FRAC)
-#define QUAT1_FLOAT_OF_BFP(_qi) FLOAT_OF_BFP(_qi, INT32_QUAT_FRAC)
-#define TRIG_BFP_OF_REAL(_tf) BFP_OF_REAL(_tf, INT32_TRIG_FRAC)
-#define TRIG_FLOAT_OF_BFP(_ti) FLOAT_OF_BFP(_ti,INT32_TRIG_FRAC)
-#define POS_BFP_OF_REAL(_af) BFP_OF_REAL(_af, INT32_POS_FRAC)
+#define QUAT1_BFP_OF_REAL(_qf) BFP_OF_REAL((_qf), INT32_QUAT_FRAC)
+#define QUAT1_FLOAT_OF_BFP(_qi) FLOAT_OF_BFP((_qi), INT32_QUAT_FRAC)
+#define TRIG_BFP_OF_REAL(_tf) BFP_OF_REAL((_tf), INT32_TRIG_FRAC)
+#define TRIG_FLOAT_OF_BFP(_ti) FLOAT_OF_BFP((_ti),INT32_TRIG_FRAC)
+#define POS_BFP_OF_REAL(_af) BFP_OF_REAL((_af), INT32_POS_FRAC)
#define POS_FLOAT_OF_BFP(_ai) FLOAT_OF_BFP((_ai), INT32_POS_FRAC)
-#define SPEED_BFP_OF_REAL(_af) BFP_OF_REAL(_af, INT32_SPEED_FRAC)
+#define SPEED_BFP_OF_REAL(_af) BFP_OF_REAL((_af), INT32_SPEED_FRAC)
#define SPEED_FLOAT_OF_BFP(_ai) FLOAT_OF_BFP((_ai), INT32_SPEED_FRAC)
-#define ACCEL_BFP_OF_REAL(_af) BFP_OF_REAL(_af, INT32_ACCEL_FRAC)
+#define ACCEL_BFP_OF_REAL(_af) BFP_OF_REAL((_af), INT32_ACCEL_FRAC)
#define ACCEL_FLOAT_OF_BFP(_ai) FLOAT_OF_BFP((_ai), INT32_ACCEL_FRAC)
-#define MAG_BFP_OF_REAL(_af) BFP_OF_REAL(_af, INT32_MAG_FRAC)
-#define MAG_FLOAT_OF_BFP(_ai) FLOAT_OF_BFP((_ai), INT32_MAG_FRAC)
+#define MAG_BFP_OF_REAL(_af) BFP_OF_REAL((_af), INT32_MAG_FRAC)
+#define MAG_FLOAT_OF_BFP(_ai) FLOAT_OF_BFP((_ai), INT32_MAG_FRAC)
#define INT_MULT_RSHIFT(_a, _b, _r) (((_a)*(_b))>>(_r))
/*
@@ -175,7 +193,7 @@ struct Int64Vect3 {
#define INT_VECT2_ZERO(_v) VECT2_ASSIGN(_v, 0, 0)
#define INT32_VECT2_NORM(n, v) { \
- int32_t n2 = v.x*v.x + v.y*v.y; \
+ int32_t n2 = (v).x*(v).x + (v).y*(v).y; \
INT32_SQRT(n, n2); \
}
@@ -201,29 +219,13 @@ struct Int64Vect3 {
#define INT_VECT3_ZERO(_v) VECT3_ASSIGN(_v, 0, 0, 0)
#define INT32_VECT3_ZERO(_v) VECT3_ASSIGN(_v, 0, 0, 0)
-#define INT32_VECT3_COPY(_o, _i) { \
- _o.x = _i.x; \
- _o.y = _i.y; \
- _o.z = _i.z; \
- }
+#define INT32_VECT3_COPY(_o, _i) VECT3_COPY(_o, _i)
-#define INT32_VECT3_SUM(_c, _a, _b) { \
- _c.x = _a.x + _b.x; \
- _c.y = _a.y + _b.y; \
- _c.z = _a.z + _b.z; \
- }
+#define INT32_VECT3_SUM(_c, _a, _b) VECT3_SUM(_c, _a, _b)
-#define INT32_VECT3_DIFF(_c, _a, _b) { \
- _c.x = _a.x - _b.x; \
- _c.y = _a.y - _b.y; \
- _c.z = _a.z - _b.z; \
- }
+#define INT32_VECT3_DIFF(_c, _a, _b) VECT3_DIFF(_c, _a, _b)
-#define INT32_VECT3_ADD(_a, _b) { \
- _a.x += _b.x; \
- _a.y += _b.y; \
- _a.z += _b.z; \
- }
+#define INT32_VECT3_ADD(_a, _b) VECT3_ADD(_a, _b)
#define INT32_VECT3_SCALE_2(_a, _b, _num, _den) { \
(_a).x = ((_b).x * (_num)) / (_den); \
@@ -231,15 +233,11 @@ struct Int64Vect3 {
(_a).z = ((_b).z * (_num)) / (_den); \
}
-#define INT32_VECT3_SDIV(_a, _b, _s) { \
- (_a).x = (_b).x / (_s); \
- (_a).y = (_b).y / (_s); \
- (_a).z = (_b).z / (_s); \
- }
+#define INT32_VECT3_SDIV(_a, _b, _s) VECT3_SDIV(_a, _b, _s)
#define INT32_VECT3_NORM(n, v) { \
- int32_t n2 = v.x*v.x + v.y*v.y + v.z*v.z; \
+ int32_t n2 = (v).x*(v).x + (v).y*(v).y + (v).z*(v).z; \
INT32_SQRT(n, n2); \
}
@@ -262,27 +260,27 @@ struct Int64Vect3 {
* 3x3 Matrices
*/
#define INT32_MAT33_ZERO(_m) { \
- MAT33_ELMT(_m, 0, 0) = 0; \
- MAT33_ELMT(_m, 0, 1) = 0; \
- MAT33_ELMT(_m, 0, 2) = 0; \
- MAT33_ELMT(_m, 1, 0) = 0; \
- MAT33_ELMT(_m, 1, 1) = 0; \
- MAT33_ELMT(_m, 1, 2) = 0; \
- MAT33_ELMT(_m, 2, 0) = 0; \
- MAT33_ELMT(_m, 2, 1) = 0; \
- MAT33_ELMT(_m, 2, 2) = 0; \
+ MAT33_ELMT((_m), 0, 0) = 0; \
+ MAT33_ELMT((_m), 0, 1) = 0; \
+ MAT33_ELMT((_m), 0, 2) = 0; \
+ MAT33_ELMT((_m), 1, 0) = 0; \
+ MAT33_ELMT((_m), 1, 1) = 0; \
+ MAT33_ELMT((_m), 1, 2) = 0; \
+ MAT33_ELMT((_m), 2, 0) = 0; \
+ MAT33_ELMT((_m), 2, 1) = 0; \
+ MAT33_ELMT((_m), 2, 2) = 0; \
}
#define INT32_MAT33_DIAG(_m, _d00, _d11, _d22) { \
- MAT33_ELMT(_m, 0, 0) = _d00; \
- MAT33_ELMT(_m, 0, 1) = 0; \
- MAT33_ELMT(_m, 0, 2) = 0; \
- MAT33_ELMT(_m, 1, 0) = 0; \
- MAT33_ELMT(_m, 1, 1) = _d11; \
- MAT33_ELMT(_m, 1, 2) = 0; \
- MAT33_ELMT(_m, 2, 0) = 0; \
- MAT33_ELMT(_m, 2, 1) = 0; \
- MAT33_ELMT(_m, 2, 2) = _d22; \
+ MAT33_ELMT((_m), 0, 0) = (_d00); \
+ MAT33_ELMT((_m), 0, 1) = 0; \
+ MAT33_ELMT((_m), 0, 2) = 0; \
+ MAT33_ELMT((_m), 1, 0) = 0; \
+ MAT33_ELMT((_m), 1, 1) = (_d11); \
+ MAT33_ELMT((_m), 1, 2) = 0; \
+ MAT33_ELMT((_m), 2, 0) = 0; \
+ MAT33_ELMT((_m), 2, 1) = 0; \
+ MAT33_ELMT((_m), 2, 2) = (_d22); \
}
@@ -301,28 +299,28 @@ struct Int64Vect3 {
/* _m_a2c = _m_a2b comp _m_b2c , aka _m_a2c = _m_b2c * _m_a2b */
#define INT32_RMAT_COMP(_m_a2c, _m_a2b, _m_b2c) { \
- _m_a2c.m[0] = (_m_b2c.m[0]*_m_a2b.m[0] + _m_b2c.m[1]*_m_a2b.m[3] + _m_b2c.m[2]*_m_a2b.m[6])>>INT32_TRIG_FRAC; \
- _m_a2c.m[1] = (_m_b2c.m[0]*_m_a2b.m[1] + _m_b2c.m[1]*_m_a2b.m[4] + _m_b2c.m[2]*_m_a2b.m[7])>>INT32_TRIG_FRAC; \
- _m_a2c.m[2] = (_m_b2c.m[0]*_m_a2b.m[2] + _m_b2c.m[1]*_m_a2b.m[5] + _m_b2c.m[2]*_m_a2b.m[8])>>INT32_TRIG_FRAC; \
- _m_a2c.m[3] = (_m_b2c.m[3]*_m_a2b.m[0] + _m_b2c.m[4]*_m_a2b.m[3] + _m_b2c.m[5]*_m_a2b.m[6])>>INT32_TRIG_FRAC; \
- _m_a2c.m[4] = (_m_b2c.m[3]*_m_a2b.m[1] + _m_b2c.m[4]*_m_a2b.m[4] + _m_b2c.m[5]*_m_a2b.m[7])>>INT32_TRIG_FRAC; \
- _m_a2c.m[5] = (_m_b2c.m[3]*_m_a2b.m[2] + _m_b2c.m[4]*_m_a2b.m[5] + _m_b2c.m[5]*_m_a2b.m[8])>>INT32_TRIG_FRAC; \
- _m_a2c.m[6] = (_m_b2c.m[6]*_m_a2b.m[0] + _m_b2c.m[7]*_m_a2b.m[3] + _m_b2c.m[8]*_m_a2b.m[6])>>INT32_TRIG_FRAC; \
- _m_a2c.m[7] = (_m_b2c.m[6]*_m_a2b.m[1] + _m_b2c.m[7]*_m_a2b.m[4] + _m_b2c.m[8]*_m_a2b.m[7])>>INT32_TRIG_FRAC; \
- _m_a2c.m[8] = (_m_b2c.m[6]*_m_a2b.m[2] + _m_b2c.m[7]*_m_a2b.m[5] + _m_b2c.m[8]*_m_a2b.m[8])>>INT32_TRIG_FRAC; \
+ (_m_a2c).m[0] = ((_m_b2c).m[0]*(_m_a2b).m[0] + (_m_b2c).m[1]*(_m_a2b).m[3] + (_m_b2c).m[2]*(_m_a2b).m[6])>>INT32_TRIG_FRAC; \
+ (_m_a2c).m[1] = ((_m_b2c).m[0]*(_m_a2b).m[1] + (_m_b2c).m[1]*(_m_a2b).m[4] + (_m_b2c).m[2]*(_m_a2b).m[7])>>INT32_TRIG_FRAC; \
+ (_m_a2c).m[2] = ((_m_b2c).m[0]*(_m_a2b).m[2] + (_m_b2c).m[1]*(_m_a2b).m[5] + (_m_b2c).m[2]*(_m_a2b).m[8])>>INT32_TRIG_FRAC; \
+ (_m_a2c).m[3] = ((_m_b2c).m[3]*(_m_a2b).m[0] + (_m_b2c).m[4]*(_m_a2b).m[3] + (_m_b2c).m[5]*(_m_a2b).m[6])>>INT32_TRIG_FRAC; \
+ (_m_a2c).m[4] = ((_m_b2c).m[3]*(_m_a2b).m[1] + (_m_b2c).m[4]*(_m_a2b).m[4] + (_m_b2c).m[5]*(_m_a2b).m[7])>>INT32_TRIG_FRAC; \
+ (_m_a2c).m[5] = ((_m_b2c).m[3]*(_m_a2b).m[2] + (_m_b2c).m[4]*(_m_a2b).m[5] + (_m_b2c).m[5]*(_m_a2b).m[8])>>INT32_TRIG_FRAC; \
+ (_m_a2c).m[6] = ((_m_b2c).m[6]*(_m_a2b).m[0] + (_m_b2c).m[7]*(_m_a2b).m[3] + (_m_b2c).m[8]*(_m_a2b).m[6])>>INT32_TRIG_FRAC; \
+ (_m_a2c).m[7] = ((_m_b2c).m[6]*(_m_a2b).m[1] + (_m_b2c).m[7]*(_m_a2b).m[4] + (_m_b2c).m[8]*(_m_a2b).m[7])>>INT32_TRIG_FRAC; \
+ (_m_a2c).m[8] = ((_m_b2c).m[6]*(_m_a2b).m[2] + (_m_b2c).m[7]*(_m_a2b).m[5] + (_m_b2c).m[8]*(_m_a2b).m[8])>>INT32_TRIG_FRAC; \
}
/* _m_a2b = _m_a2c comp_inv _m_b2c , aka _m_a2b = inv(_m_b2c) * _m_a2c */
#define INT32_RMAT_COMP_INV(_m_a2b, _m_a2c, _m_b2c) { \
- _m_a2b.m[0] = (_m_b2c.m[0]*_m_a2c.m[0] + _m_b2c.m[3]*_m_a2c.m[3] + _m_b2c.m[6]*_m_a2c.m[6])>>INT32_TRIG_FRAC; \
- _m_a2b.m[1] = (_m_b2c.m[0]*_m_a2c.m[1] + _m_b2c.m[3]*_m_a2c.m[4] + _m_b2c.m[6]*_m_a2c.m[7])>>INT32_TRIG_FRAC; \
- _m_a2b.m[2] = (_m_b2c.m[0]*_m_a2c.m[2] + _m_b2c.m[3]*_m_a2c.m[5] + _m_b2c.m[6]*_m_a2c.m[8])>>INT32_TRIG_FRAC; \
- _m_a2b.m[3] = (_m_b2c.m[1]*_m_a2c.m[0] + _m_b2c.m[4]*_m_a2c.m[3] + _m_b2c.m[7]*_m_a2c.m[6])>>INT32_TRIG_FRAC; \
- _m_a2b.m[4] = (_m_b2c.m[1]*_m_a2c.m[1] + _m_b2c.m[4]*_m_a2c.m[4] + _m_b2c.m[7]*_m_a2c.m[7])>>INT32_TRIG_FRAC; \
- _m_a2b.m[5] = (_m_b2c.m[1]*_m_a2c.m[2] + _m_b2c.m[4]*_m_a2c.m[5] + _m_b2c.m[7]*_m_a2c.m[8])>>INT32_TRIG_FRAC; \
- _m_a2b.m[6] = (_m_b2c.m[2]*_m_a2c.m[0] + _m_b2c.m[5]*_m_a2c.m[3] + _m_b2c.m[8]*_m_a2c.m[6])>>INT32_TRIG_FRAC; \
- _m_a2b.m[7] = (_m_b2c.m[2]*_m_a2c.m[1] + _m_b2c.m[5]*_m_a2c.m[4] + _m_b2c.m[8]*_m_a2c.m[7])>>INT32_TRIG_FRAC; \
- _m_a2b.m[8] = (_m_b2c.m[2]*_m_a2c.m[2] + _m_b2c.m[5]*_m_a2c.m[5] + _m_b2c.m[8]*_m_a2c.m[8])>>INT32_TRIG_FRAC; \
+ (_m_a2b).m[0] = ((_m_b2c).m[0]*(_m_a2c).m[0] + (_m_b2c).m[3]*(_m_a2c).m[3] + (_m_b2c).m[6]*(_m_a2c).m[6])>>INT32_TRIG_FRAC; \
+ (_m_a2b).m[1] = ((_m_b2c).m[0]*(_m_a2c).m[1] + (_m_b2c).m[3]*(_m_a2c).m[4] + (_m_b2c).m[6]*(_m_a2c).m[7])>>INT32_TRIG_FRAC; \
+ (_m_a2b).m[2] = ((_m_b2c).m[0]*(_m_a2c).m[2] + (_m_b2c).m[3]*(_m_a2c).m[5] + (_m_b2c).m[6]*(_m_a2c).m[8])>>INT32_TRIG_FRAC; \
+ (_m_a2b).m[3] = ((_m_b2c).m[1]*(_m_a2c).m[0] + (_m_b2c).m[4]*(_m_a2c).m[3] + (_m_b2c).m[7]*(_m_a2c).m[6])>>INT32_TRIG_FRAC; \
+ (_m_a2b).m[4] = ((_m_b2c).m[1]*(_m_a2c).m[1] + (_m_b2c).m[4]*(_m_a2c).m[4] + (_m_b2c).m[7]*(_m_a2c).m[7])>>INT32_TRIG_FRAC; \
+ (_m_a2b).m[5] = ((_m_b2c).m[1]*(_m_a2c).m[2] + (_m_b2c).m[4]*(_m_a2c).m[5] + (_m_b2c).m[7]*(_m_a2c).m[8])>>INT32_TRIG_FRAC; \
+ (_m_a2b).m[6] = ((_m_b2c).m[2]*(_m_a2c).m[0] + (_m_b2c).m[5]*(_m_a2c).m[3] + (_m_b2c).m[8]*(_m_a2c).m[6])>>INT32_TRIG_FRAC; \
+ (_m_a2b).m[7] = ((_m_b2c).m[2]*(_m_a2c).m[1] + (_m_b2c).m[5]*(_m_a2c).m[4] + (_m_b2c).m[8]*(_m_a2c).m[7])>>INT32_TRIG_FRAC; \
+ (_m_a2b).m[8] = ((_m_b2c).m[2]*(_m_a2c).m[2] + (_m_b2c).m[5]*(_m_a2c).m[5] + (_m_b2c).m[8]*(_m_a2c).m[8])>>INT32_TRIG_FRAC; \
}
/* _vb = _m_a2b * _va */
@@ -363,47 +361,47 @@ struct Int64Vect3 {
const int32_t one = TRIG_BFP_OF_REAL( 1); \
const int32_t two = TRIG_BFP_OF_REAL( 2); \
/* dcm00 = 1.0 - 2.*( qy2 + qz2 ); */ \
- _rm.m[0] = one - INT_MULT_RSHIFT( two, (qy2+qz2), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
+ (_rm).m[0] = one - INT_MULT_RSHIFT( two, (qy2+qz2), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
/* dcm01 = 2.*( qxqy + qiqz ); */ \
- _rm.m[1] = INT_MULT_RSHIFT( two, (qxqy+qiqz), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
+ (_rm).m[1] = INT_MULT_RSHIFT( two, (qxqy+qiqz), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
/* dcm02 = 2.*( qxqz - qiqy ); */ \
- _rm.m[2] = INT_MULT_RSHIFT( two, (qxqz-qiqy), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
+ (_rm).m[2] = INT_MULT_RSHIFT( two, (qxqz-qiqy), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
/* dcm10 = 2.*( qxqy - qiqz ); */ \
- _rm.m[3] = INT_MULT_RSHIFT( two, (qxqy-qiqz), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
+ (_rm).m[3] = INT_MULT_RSHIFT( two, (qxqy-qiqz), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
/* dcm11 = 1.0 - 2.*(qx2+qz2); */ \
- _rm.m[4] = one - INT_MULT_RSHIFT( two, (qx2+qz2), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
+ (_rm).m[4] = one - INT_MULT_RSHIFT( two, (qx2+qz2), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
/* dcm12 = 2.*( qyqz + qiqx ); */ \
- _rm.m[5] = INT_MULT_RSHIFT( two, (qyqz+qiqx), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
+ (_rm).m[5] = INT_MULT_RSHIFT( two, (qyqz+qiqx), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
/* dcm20 = 2.*( qxqz + qiqy ); */ \
- _rm.m[6] = INT_MULT_RSHIFT( two, (qxqz+qiqy), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
+ (_rm).m[6] = INT_MULT_RSHIFT( two, (qxqz+qiqy), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
/* dcm21 = 2.*( qyqz - qiqx ); */ \
- _rm.m[7] = INT_MULT_RSHIFT( two, (qyqz-qiqx), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
+ (_rm).m[7] = INT_MULT_RSHIFT( two, (qyqz-qiqx), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
/* dcm22 = 1.0 - 2.*( qx2 + qy2 ); */ \
- _rm.m[8] = one - INT_MULT_RSHIFT( two, (qx2+qy2), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
+ (_rm).m[8] = one - INT_MULT_RSHIFT( two, (qx2+qy2), INT32_TRIG_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC); \
}
#else
#define INT32_RMAT_OF_QUAT(_rm, _q) { \
const int32_t _2qi2_m1 = INT_MULT_RSHIFT((_q).qi,(_q).qi, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1)-TRIG_BFP_OF_REAL( 1); \
- _rm.m[0] = INT_MULT_RSHIFT((_q).qx,(_q).qx, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
- _rm.m[4] = INT_MULT_RSHIFT((_q).qy,(_q).qy, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
- _rm.m[8] = INT_MULT_RSHIFT((_q).qz,(_q).qz, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
+ (_rm).m[0] = INT_MULT_RSHIFT((_q).qx,(_q).qx, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
+ (_rm).m[4] = INT_MULT_RSHIFT((_q).qy,(_q).qy, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
+ (_rm).m[8] = INT_MULT_RSHIFT((_q).qz,(_q).qz, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
\
const int32_t _2qiqx = INT_MULT_RSHIFT((_q).qi,(_q).qx, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
const int32_t _2qiqy = INT_MULT_RSHIFT((_q).qi,(_q).qy, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
const int32_t _2qiqz = INT_MULT_RSHIFT((_q).qi,(_q).qz, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
- _rm.m[1] = INT_MULT_RSHIFT((_q).qx,(_q).qy, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
- _rm.m[2] = INT_MULT_RSHIFT((_q).qx,(_q).qz, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
- _rm.m[5] = INT_MULT_RSHIFT((_q).qy,(_q).qz, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
+ (_rm).m[1] = INT_MULT_RSHIFT((_q).qx,(_q).qy, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
+ (_rm).m[2] = INT_MULT_RSHIFT((_q).qx,(_q).qz, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
+ (_rm).m[5] = INT_MULT_RSHIFT((_q).qy,(_q).qz, INT32_QUAT_FRAC+INT32_QUAT_FRAC-INT32_TRIG_FRAC-1); \
\
- _rm.m[0] += _2qi2_m1; \
- _rm.m[3] = _rm.m[1]-_2qiqz; \
- _rm.m[6] = _rm.m[2]+_2qiqy; \
- _rm.m[7] = _rm.m[5]-_2qiqx; \
- _rm.m[4] += _2qi2_m1; \
- _rm.m[1] += _2qiqz; \
- _rm.m[2] -= _2qiqy; \
- _rm.m[5] += _2qiqx; \
- _rm.m[8] += _2qi2_m1; \
+ (_rm).m[0] += _2qi2_m1; \
+ (_rm).m[3] = (_rm).m[1]-_2qiqz; \
+ (_rm).m[6] = (_rm).m[2]+_2qiqy; \
+ (_rm).m[7] = (_rm).m[5]-_2qiqx; \
+ (_rm).m[4] += _2qi2_m1; \
+ (_rm).m[1] += _2qiqz; \
+ (_rm).m[2] -= _2qiqy; \
+ (_rm).m[5] += _2qiqx; \
+ (_rm).m[8] += _2qi2_m1; \
}
#endif
@@ -508,36 +506,31 @@ struct Int64Vect3 {
*/
#define INT32_QUAT_ZERO(_q) { \
- _q.qi = QUAT1_BFP_OF_REAL(1); \
- _q.qx = 0; \
- _q.qy = 0; \
- _q.qz = 0; \
+ (_q).qi = QUAT1_BFP_OF_REAL(1); \
+ (_q).qx = 0; \
+ (_q).qy = 0; \
+ (_q).qz = 0; \
}
-#define INT32_QUAT_INVERT(_qo, _qi) { \
- (_qo).qi = (_qi).qi; \
- (_qo).qx = -(_qi).qx; \
- (_qo).qy = -(_qi).qy; \
- (_qo).qz = -(_qi).qz; \
- }
+#define INT32_QUAT_INVERT(_qo, _qi) QUAT_INVERT(_qo, _qi)
#define INT32_QUAT_NORM(n, q) { \
- int32_t n2 = q.qi*q.qi + q.qx*q.qx + q.qy*q.qy + q.qz*q.qz; \
+ int32_t n2 = (q).qi*(q).qi + (q).qx*(q).qx + (q).qy*(q).qy + (q).qz*(q).qz; \
INT32_SQRT(n, n2); \
}
#define INT32_QUAT_WRAP_SHORTEST(q) { \
- if (q.qi < 0) \
+ if ((q).qi < 0) \
QUAT_EXPLEMENTARY(q,q); \
}
#define INT32_QUAT_NORMALISE(q) { \
int32_t n; \
INT32_QUAT_NORM(n, q); \
- q.qi = q.qi * QUAT1_BFP_OF_REAL(1) / n; \
- q.qx = q.qx * QUAT1_BFP_OF_REAL(1) / n; \
- q.qy = q.qy * QUAT1_BFP_OF_REAL(1) / n; \
- q.qz = q.qz * QUAT1_BFP_OF_REAL(1) / n; \
+ (q).qi = (q).qi * QUAT1_BFP_OF_REAL(1) / n; \
+ (q).qx = (q).qx * QUAT1_BFP_OF_REAL(1) / n; \
+ (q).qy = (q).qy * QUAT1_BFP_OF_REAL(1) / n; \
+ (q).qz = (q).qz * QUAT1_BFP_OF_REAL(1) / n; \
}
/* _a2c = _a2b comp _b2c , aka _a2c = _b2c * _a2b */
@@ -566,16 +559,16 @@ struct Int64Vect3 {
#ifdef ALGEBRA_INT_USE_SLOW_FUNCTIONS
#define INT32_QUAT_VMULT(v_out, q, v_in) { \
- const int32_t qi2 = (q.qi*q.qi)>>INT32_QUAT_FRAC; \
- const int32_t qx2 = (q.qx*q.qx)>>INT32_QUAT_FRAC; \
- const int32_t qy2 = (q.qy*q.qy)>>INT32_QUAT_FRAC; \
- const int32_t qz2 = (q.qz*q.qz)>>INT32_QUAT_FRAC; \
- const int32_t qiqx = (q.qi*q.qx)>>INT32_QUAT_FRAC; \
- const int32_t qiqy = (q.qi*q.qy)>>INT32_QUAT_FRAC; \
- const int32_t qiqz = (q.qi*q.qz)>>INT32_QUAT_FRAC; \
- const int32_t qxqy = (q.qx*q.qy)>>INT32_QUAT_FRAC; \
- const int32_t qxqz = (q.qx*q.qz)>>INT32_QUAT_FRAC; \
- const int32_t qyqz = (q.qy*q.qz)>>INT32_QUAT_FRAC; \
+ const int32_t qi2 = ((q).qi*(q).qi)>>INT32_QUAT_FRAC; \
+ const int32_t qx2 = ((q).qx*(q).qx)>>INT32_QUAT_FRAC; \
+ const int32_t qy2 = ((q).qy*(q).qy)>>INT32_QUAT_FRAC; \
+ const int32_t qz2 = ((q).qz*(q).qz)>>INT32_QUAT_FRAC; \
+ const int32_t qiqx = ((q).qi*(q).qx)>>INT32_QUAT_FRAC; \
+ const int32_t qiqy = ((q).qi*(q).qy)>>INT32_QUAT_FRAC; \
+ const int32_t qiqz = ((q).qi*(q).qz)>>INT32_QUAT_FRAC; \
+ const int32_t qxqy = ((q).qx*(q).qy)>>INT32_QUAT_FRAC; \
+ const int32_t qxqz = ((q).qx*(q).qz)>>INT32_QUAT_FRAC; \
+ const int32_t qyqz = ((q).qy*(q).qz)>>INT32_QUAT_FRAC; \
const int32_t m00 = qi2 + qx2 - qy2 - qz2; \
const int32_t m01 = 2 * (qxqy + qiqz ); \
const int32_t m02 = 2 * (qxqz - qiqy ); \
@@ -585,25 +578,25 @@ struct Int64Vect3 {
const int32_t m20 = 2 * (qxqz + qiqy ); \
const int32_t m21 = 2 * (qyqz - qiqx ); \
const int32_t m22 = qi2 - qx2 - qy2 + qz2; \
- v_out.x = (m00 * v_in.x + m01 * v_in.y + m02 * v_in.z)>>INT32_QUAT_FRAC; \
- v_out.y = (m10 * v_in.x + m11 * v_in.y + m12 * v_in.z)>>INT32_QUAT_FRAC; \
- v_out.z = (m20 * v_in.x + m21 * v_in.y + m22 * v_in.z)>>INT32_QUAT_FRAC; \
+ (v_out).x = (m00 * (v_in).x + m01 * (v_in).y + m02 * (v_in).z)>>INT32_QUAT_FRAC; \
+ (v_out).y = (m10 * (v_in).x + m11 * (v_in).y + m12 * (v_in).z)>>INT32_QUAT_FRAC; \
+ (v_out).z = (m20 * (v_in).x + m21 * (v_in).y + m22 * (v_in).z)>>INT32_QUAT_FRAC; \
}
#else
#define INT32_QUAT_VMULT(v_out, q, v_in) { \
- const int32_t _2qi2_m1 = ((q.qi*q.qi)>>(INT32_QUAT_FRAC-1)) - QUAT1_BFP_OF_REAL( 1); \
- const int32_t _2qx2 = (q.qx*q.qx)>>(INT32_QUAT_FRAC-1); \
- const int32_t _2qy2 = (q.qy*q.qy)>>(INT32_QUAT_FRAC-1); \
- const int32_t _2qz2 = (q.qz*q.qz)>>(INT32_QUAT_FRAC-1); \
- const int32_t _2qiqx = (q.qi*q.qx)>>(INT32_QUAT_FRAC-1); \
- const int32_t _2qiqy = (q.qi*q.qy)>>(INT32_QUAT_FRAC-1); \
- const int32_t _2qiqz = (q.qi*q.qz)>>(INT32_QUAT_FRAC-1); \
- const int32_t m01 = ((q.qx*q.qy)>>(INT32_QUAT_FRAC-1)) + _2qiqz; \
- const int32_t m02 = ((q.qx*q.qz)>>(INT32_QUAT_FRAC-1)) - _2qiqy; \
- const int32_t m12 = ((q.qy*q.qz)>>(INT32_QUAT_FRAC-1)) + _2qiqx; \
- v_out.x = (_2qi2_m1*v_in.x + _2qx2 * v_in.x + m01 * v_in.y + m02 * v_in.z)>>INT32_QUAT_FRAC; \
- v_out.y = (_2qi2_m1*v_in.y + m01 * v_in.x -2*_2qiqz*v_in.x+ _2qy2 * v_in.y + m12 * v_in.z)>>INT32_QUAT_FRAC; \
- v_out.z = (_2qi2_m1*v_in.z + m02 * v_in.x +2*_2qiqy*v_in.x+ m12 * v_in.y -2*_2qiqx*v_in.y+ _2qz2 * v_in.z)>>INT32_QUAT_FRAC; \
+ const int32_t _2qi2_m1 = (((q).qi*(q).qi)>>(INT32_QUAT_FRAC-1)) - QUAT1_BFP_OF_REAL( 1); \
+ const int32_t _2qx2 = ((q).qx*(q).qx)>>(INT32_QUAT_FRAC-1); \
+ const int32_t _2qy2 = ((q).qy*(q).qy)>>(INT32_QUAT_FRAC-1); \
+ const int32_t _2qz2 = ((q).qz*(q).qz)>>(INT32_QUAT_FRAC-1); \
+ const int32_t _2qiqx = ((q).qi*(q).qx)>>(INT32_QUAT_FRAC-1); \
+ const int32_t _2qiqy = ((q).qi*(q).qy)>>(INT32_QUAT_FRAC-1); \
+ const int32_t _2qiqz = ((q).qi*(q).qz)>>(INT32_QUAT_FRAC-1); \
+ const int32_t m01 = (((q).qx*(q).qy)>>(INT32_QUAT_FRAC-1)) + _2qiqz; \
+ const int32_t m02 = (((q).qx*(q).qz)>>(INT32_QUAT_FRAC-1)) - _2qiqy; \
+ const int32_t m12 = (((q).qy*(q).qz)>>(INT32_QUAT_FRAC-1)) + _2qiqx; \
+ (v_out).x = (_2qi2_m1*(v_in).x + _2qx2 * (v_in).x + m01 * (v_in).y + m02 * (v_in).z)>>INT32_QUAT_FRAC; \
+ (v_out).y = (_2qi2_m1*(v_in).y + m01 * (v_in).x -2*_2qiqz*(v_in).x + _2qy2 * (v_in).y + m12 * (v_in).z)>>INT32_QUAT_FRAC; \
+ (v_out).z = (_2qi2_m1*(v_in).z + m02 * (v_in).x +2*_2qiqy*(v_in).x+ m12 * (v_in).y -2*_2qiqx*(v_in).y+ _2qz2 * (v_in).z)>>INT32_QUAT_FRAC; \
}
#endif
@@ -653,14 +646,14 @@ struct Int64Vect3 {
int32_t two_qi; \
INT32_SQRT(two_qi, (two_qi_two< 1) && (iter < INT32_SQRT_MAX_ITER)); \
- _out = s2; \
+ (_out) = s2; \
} \
}
@@ -884,16 +877,16 @@ struct Int64Vect3 {
const int32_t c2 = 3 * INT32_ANGLE_PI_4; \
const int32_t abs_y = abs(_y) + 1; \
int32_t r; \
- if ( _x >= 0) { \
- r = ((_x-abs_y)<>R_FRAC); \
+ if ( (_x) >= 0) { \
+ r = (((_x)-abs_y)<>R_FRAC); \
} \
else { \
- r = ((_x+abs_y)<>R_FRAC); \
+ r = (((_x)+abs_y)<>R_FRAC); \
} \
- if (_y<0) \
- _a = -_a; \
+ if ((_y)<0) \
+ (_a) = -(_a); \
}
@@ -902,18 +895,18 @@ struct Int64Vect3 {
const int32_t c2 = 3 * INT32_ANGLE_PI_4; \
const int32_t abs_y = abs(_y) + 1; \
int32_t r; \
- if ( _x >= 0) { \
- r = ((_x-abs_y)<= 0) { \
+ r = (((_x)-abs_y)<>R_FRAC; \
int32_t tmp1 = ((r2 * (int32_t)ANGLE_BFP_OF_REAL(0.1963))>>INT32_ANGLE_FRAC) - ANGLE_BFP_OF_REAL(0.9817); \
- _a = ((tmp1 * r)>>R_FRAC) + c1; \
+ (_a) = ((tmp1 * r)>>R_FRAC) + c1; \
} \
else { \
- r = ((_x+abs_y)<>R_FRAC); \
+ r = (((_x)+abs_y)<>R_FRAC); \
} \
- if (_y<0) \
- _a = -_a; \
+ if ((_y)<0) \
+ (_a) = -(_a); \
}
diff --git a/sw/airborne/math/pprz_geodetic_double.h b/sw/airborne/math/pprz_geodetic_double.h
index df9d840705..2bed3451c2 100644
--- a/sw/airborne/math/pprz_geodetic_double.h
+++ b/sw/airborne/math/pprz_geodetic_double.h
@@ -1,71 +1,90 @@
+/*
+ * Copyright (C) 2008-2011 The Paparazzi Team
+ *
+ * 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
+ * .
+ *
+ */
+
+/**
+ * @file pprz_geodetic_double.h
+ * @brief Paparazzi double-precision floating point math for geodetic calculations.
+ *
+ * This is the more detailed description of this file.
+ *
+ */
+
#ifndef PPRZ_GEODETIC_DOUBLE_H
#define PPRZ_GEODETIC_DOUBLE_H
-#include
-
#include "pprz_geodetic.h"
#include "pprz_algebra_double.h"
-/*
- * Definitions for coordinate systems
- *
- */
-
-/* Earth Centered Earth Fixed
- * x, y, z in meters
- */
+/**
+ * @brief vector in EarthCenteredEarthFixed coordinates
+ * @details Origin at center of mass of the Earth. Z-axis is pointing north,
+ * the x-axis intersects the sphere of the earth at 0° latitude (Equator)
+ * and 0° longitude (Greenwich). Y-axis completes it to right-hand system.
+ * Units: meters */
struct EcefCoor_d {
- double x;
- double y;
- double z;
+ double x; ///< in meters
+ double y; ///< in meters
+ double z; ///< in meters
};
-/* Lon Lat Alt
- * lon, lat in radians, alt in meters
+/**
+ * @brief vector in Latitude, Longitude and Altitude
+ * @details Units lat,lon: radians
+ * Unit alt: meters above MSL
*/
struct LlaCoor_d {
- double lon;
- double lat;
- double alt;
+ double lon; ///< in radians
+ double lat; ///< in radians
+ double alt; ///< in meters above MSL
};
-/* North East Down local tangeant plane
- * x, y, z in meters
- */
+/**
+ * @brief vector in North East Down coordinates
+ * Units: meters */
struct NedCoor_d {
- double x;
- double y;
- double z;
+ double x; ///< in meters
+ double y; ///< in meters
+ double z; ///< in meters
};
-/* East North Up local tangeant plane
- * x, y, z in meters
- */
+/**
+ * @brief vector in East North Up coordinates
+ * Units: meters */
struct EnuCoor_d {
- double x;
- double y;
- double z;
+ double x; ///< in meters
+ double y; ///< in meters
+ double z; ///< in meters
};
-/* Local tangeant plane reference */
+/**
+ * @brief definition of the local (flat earth) coordinate system
+ * @details Defines the origin of the local coordinate system
+ * in ECEF and LLA coordinates and the roation matrix from
+ * ECEF to local frame */
struct LtpDef_d {
- struct EcefCoor_d ecef;
- struct LlaCoor_d lla;
- struct DoubleMat33 ltp_of_ecef;
+ struct EcefCoor_d ecef; ///< origin of local frame in ECEF
+ struct LlaCoor_d lla; ///< origin of local frame in LLA
+ struct DoubleMat33 ltp_of_ecef; ///< rotation from ECEF to local frame
};
-/* UTM projection
-*/
-struct UTMCoor_d {
- double east;
- double north;
- uint8_t zone;
-};
-
-
-/*
- * Convertions between coordinate systems
- */
extern void ltp_def_from_ecef_d(struct LtpDef_d* def, struct EcefCoor_d* ecef);
extern void lla_of_ecef_d(struct LlaCoor_d* out, struct EcefCoor_d* in);
extern void ecef_of_lla_d(struct EcefCoor_d* out, struct LlaCoor_d* in);
@@ -84,7 +103,5 @@ extern void ecef_of_ned_vect_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, st
extern double gc_of_gd_lat_d(double gd_lat, double hmsl);
-extern void lla_of_utm(struct LlaCoor_d* out, struct UTMCoor_d* in);
-
#endif /* PPRZ_GEODETIC_DOUBLE_H */
diff --git a/sw/airborne/math/pprz_geodetic_float.c b/sw/airborne/math/pprz_geodetic_float.c
index 6fef1d0411..9d5f4fdb5e 100644
--- a/sw/airborne/math/pprz_geodetic_float.c
+++ b/sw/airborne/math/pprz_geodetic_float.c
@@ -3,6 +3,9 @@
#include "pprz_algebra_float.h"
#include
+/* for ecef_of_XX functions the double versions are needed */
+#include "pprz_geodetic_double.h"
+
void ltp_def_from_ecef_f(struct LtpDef_f* def, struct EcefCoor_f* ecef) {
/* store the origin of the tangeant plane */
@@ -16,7 +19,7 @@ void ltp_def_from_ecef_f(struct LtpDef_f* def, struct EcefCoor_f* ecef) {
const float cos_lon = cosf(def->lla.lon);
def->ltp_of_ecef.m[0] = -sin_lon;
def->ltp_of_ecef.m[1] = cos_lon;
- def->ltp_of_ecef.m[2] = 0.;
+ def->ltp_of_ecef.m[2] = 0.; /* this element is always zero http://en.wikipedia.org/wiki/Geodetic_system#From_ECEF_to_ENU */
def->ltp_of_ecef.m[3] = -sin_lat*cos_lon;
def->ltp_of_ecef.m[4] = -sin_lat*sin_lon;
def->ltp_of_ecef.m[5] = cos_lat;
@@ -26,14 +29,28 @@ void ltp_def_from_ecef_f(struct LtpDef_f* def, struct EcefCoor_f* ecef) {
}
-#if 0
-void init_ltp_ref_from_lla_f(struct LtpRef_f* def, struct LlaCoor_f* ref_pos) {
- def->lla.lon = ref_pos->lon;
- def->lla.lat = ref_pos->lat;
- /* compute ecef */
+void ltp_def_from_lla_f(struct LtpDef_f* def, struct LlaCoor_f* lla) {
+ /* store the origin of the tangeant plane */
+ LLA_COPY(def->lla, *lla);
+ /* compute the ecef representation of the origin */
+ ecef_of_lla_f(&def->ecef, &def->lla);
+ /* store the rotation matrix */
+ const float sin_lat = sinf(def->lla.lat);
+ const float cos_lat = cosf(def->lla.lat);
+ const float sin_lon = sinf(def->lla.lon);
+ const float cos_lon = cosf(def->lla.lon);
+
+ def->ltp_of_ecef.m[0] = -sin_lon;
+ def->ltp_of_ecef.m[1] = cos_lon;
+ def->ltp_of_ecef.m[2] = 0.; /* this element is always zero http://en.wikipedia.org/wiki/Geodetic_system#From_ECEF_to_ENU */
+ def->ltp_of_ecef.m[3] = -sin_lat*cos_lon;
+ def->ltp_of_ecef.m[4] = -sin_lat*sin_lon;
+ def->ltp_of_ecef.m[5] = cos_lat;
+ def->ltp_of_ecef.m[6] = cos_lat*cos_lon;
+ def->ltp_of_ecef.m[7] = cos_lat*sin_lon;
+ def->ltp_of_ecef.m[8] = sin_lat;
}
-#endif
void enu_of_ecef_point_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct EcefCoor_f* ecef) {
struct EcefCoor_f delta;
@@ -58,21 +75,79 @@ void ned_of_ecef_vect_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct Ecef
ENU_OF_TO_NED(*ned, enu);
}
-/* not enought precision with float - use double */
-# if 0
+void enu_of_lla_point_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct LlaCoor_f* lla) {
+ struct EcefCoor_f ecef;
+ ecef_of_lla_f(&ecef,lla);
+ enu_of_ecef_point_f(enu,def,&ecef);
+}
+
+void ned_of_lla_point_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct LlaCoor_f* lla) {
+ struct EcefCoor_f ecef;
+ ecef_of_lla_f(&ecef,lla);
+ ned_of_ecef_point_f(ned,def,&ecef);
+}
+
+/*
+ * not enought precision with float - use double
+ */
void ecef_of_enu_point_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct EnuCoor_f* enu) {
- MAT33_VECT3_TRANSP_MUL(*ecef, def->ltp_of_ecef.m, *enu);
- VECT3_ADD(*ecef, def->ecef);
+ /* convert used floats to double */
+ struct DoubleMat33 ltp_of_ecef_d;
+ ltp_of_ecef_d.m[0] = (double) def->ltp_of_ecef.m[0];
+ ltp_of_ecef_d.m[1] = (double) def->ltp_of_ecef.m[1];
+ ltp_of_ecef_d.m[2] = (double) def->ltp_of_ecef.m[2];
+ ltp_of_ecef_d.m[3] = (double) def->ltp_of_ecef.m[3];
+ ltp_of_ecef_d.m[4] = (double) def->ltp_of_ecef.m[4];
+ ltp_of_ecef_d.m[5] = (double) def->ltp_of_ecef.m[5];
+ ltp_of_ecef_d.m[6] = (double) def->ltp_of_ecef.m[6];
+ ltp_of_ecef_d.m[7] = (double) def->ltp_of_ecef.m[7];
+ ltp_of_ecef_d.m[8] = (double) def->ltp_of_ecef.m[8];
+ struct EnuCoor_f enu_d;
+ enu_d.x = (double) enu->x;
+ enu_d.y = (double) enu->y;
+ enu_d.z = (double) enu->z;
+
+ /* compute in double */
+ struct EcefCoor_d ecef_d;
+ MAT33_VECT3_TRANSP_MUL(ecef_d, ltp_of_ecef_d, enu_d);
+
+ /* convert result back to float and add it*/
+ ecef->x = (float) ecef_d.x + def->ecef.x;
+ ecef->y = (float) ecef_d.y + def->ecef.y;
+ ecef->z = (float) ecef_d.z + def->ecef.z;
}
void ecef_of_ned_point_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct NedCoor_f* ned) {
struct EnuCoor_f enu;
ENU_OF_TO_NED(enu, *ned);
- ecef_of_enu_pos_f(ecef, def, &enu);
+ ecef_of_enu_point_f(ecef, def, &enu);
}
void ecef_of_enu_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct EnuCoor_f* enu) {
- MAT33_VECT3_TRANSP_MUL(*ecef, def->ltp_of_ecef.m, *enu);
+ /* convert used floats to double */
+ struct DoubleMat33 ltp_of_ecef_d;
+ ltp_of_ecef_d.m[0] = (double) def->ltp_of_ecef.m[0];
+ ltp_of_ecef_d.m[1] = (double) def->ltp_of_ecef.m[1];
+ ltp_of_ecef_d.m[2] = (double) def->ltp_of_ecef.m[2];
+ ltp_of_ecef_d.m[3] = (double) def->ltp_of_ecef.m[3];
+ ltp_of_ecef_d.m[4] = (double) def->ltp_of_ecef.m[4];
+ ltp_of_ecef_d.m[5] = (double) def->ltp_of_ecef.m[5];
+ ltp_of_ecef_d.m[6] = (double) def->ltp_of_ecef.m[6];
+ ltp_of_ecef_d.m[7] = (double) def->ltp_of_ecef.m[7];
+ ltp_of_ecef_d.m[8] = (double) def->ltp_of_ecef.m[8];
+ struct EnuCoor_f enu_d;
+ enu_d.x = (double) enu->x;
+ enu_d.y = (double) enu->y;
+ enu_d.z = (double) enu->z;
+
+ /* compute in double */
+ struct EcefCoor_d ecef_d;
+ MAT33_VECT3_TRANSP_MUL(ecef_d, ltp_of_ecef_d, enu_d);
+
+ /* convert result back to float*/
+ ecef->x = (float) ecef_d.x;
+ ecef->y = (float) ecef_d.y;
+ ecef->z = (float) ecef_d.z;
}
void ecef_of_ned_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct NedCoor_f* ned) {
@@ -80,7 +155,7 @@ void ecef_of_ned_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct Ne
ENU_OF_TO_NED(enu, *ned);
ecef_of_enu_vect_f(ecef, def, &enu);
}
-#endif
+/* end use double versions */
diff --git a/sw/airborne/math/pprz_geodetic_float.h b/sw/airborne/math/pprz_geodetic_float.h
index 4eef0066ee..47d3fdfd2c 100644
--- a/sw/airborne/math/pprz_geodetic_float.h
+++ b/sw/airborne/math/pprz_geodetic_float.h
@@ -1,61 +1,107 @@
+/*
+ * Copyright (C) 2008-2011 The Paparazzi Team
+ *
+ * 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
+ * .
+ *
+ */
+
+/**
+ * @file pprz_geodetic_float.h
+ * @brief Paparazzi floating point math for geodetic calculations.
+ *
+ * This is the more detailed description of this file.
+ *
+ */
+
#ifndef PPRZ_GEODETIC_FLOAT_H
#define PPRZ_GEODETIC_FLOAT_H
#include "pprz_geodetic.h"
#include "pprz_algebra_float.h"
-/* Earth Centered Earth Fixed in meters */
+/**
+ * @brief vector in EarthCenteredEarthFixed coordinates
+ * @details Origin at center of mass of the Earth. Z-axis is pointing north,
+ * the x-axis intersects the sphere of the earth at 0° latitude (Equator)
+ * and 0° longitude (Greenwich). Y-axis completes it to right-hand system.
+ * Units: meters */
struct EcefCoor_f {
- float x;
- float y;
- float z;
+ float x;///< in meters
+ float y;///< in meters
+ float z;///< in meters
};
-/* lon, lat in radians */
-/* alt in meters */
+/**
+ * @brief vector in Latitude, Longitude and Altitude
+ * @details Units lat,lon: radians
+ * Unit alt: meters above MSL
+ */
struct LlaCoor_f {
- float lon;
- float lat;
- float alt;
+ float lon;///< in radians
+ float lat;///< in radians
+ float alt;///< in meters above MSL
};
-/* North East Down local tangeant plane */
+/**
+ * @brief vector in North East Down coordinates
+ * Units: meters */
struct NedCoor_f {
- float x;
- float y;
- float z;
+ float x;///< in meters
+ float y;///< in meters
+ float z;///< in meters
};
-/* East North Up local tangeant plane */
+/**
+ * @brief vector in East North Up coordinates
+ * Units: meters */
struct EnuCoor_f {
- float x;
- float y;
- float z;
+ float x;///< in meters
+ float y;///< in meters
+ float z;///< in meters
};
-/* Local tangeant plane reference */
+/**
+ * @brief definition of the local (flat earth) coordinate system
+ * @details Defines the origin of the local coordinate system
+ * in ECEF and LLA coordinates and the roation matrix from
+ * ECEF to local frame */
struct LtpDef_f {
- struct EcefCoor_f ecef;
- struct LlaCoor_f lla;
- struct FloatMat33 ltp_of_ecef;
+ struct EcefCoor_f ecef;///< origin of local frame in ECEF
+ struct LlaCoor_f lla;///< origin of local frame in LLA
+ struct FloatMat33 ltp_of_ecef;///< rotation from ECEF to local frame
};
extern void ltp_def_from_ecef_f(struct LtpDef_f* def, struct EcefCoor_f* ecef);
-//extern void ltp_def_from_lla_f(struct LtpDef_f* def, struct LlaCoor_f* lla);
+extern void ltp_def_from_lla_f(struct LtpDef_f* def, struct LlaCoor_f* lla);
extern void lla_of_ecef_f(struct LlaCoor_f* out, struct EcefCoor_f* in);
extern void ecef_of_lla_f(struct EcefCoor_f* out, struct LlaCoor_f* in);
extern void enu_of_ecef_point_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct EcefCoor_f* ecef);
extern void ned_of_ecef_point_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct EcefCoor_f* ecef);
extern void enu_of_ecef_vect_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct EcefCoor_f* ecef);
extern void ned_of_ecef_vect_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct EcefCoor_f* ecef);
+extern void enu_of_lla_point_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct LlaCoor_f* lla);
+extern void ned_of_lla_point_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct LlaCoor_f* lla);
/* not enought precision with floats - used the double version */
-#if 0
extern void ecef_of_enu_point_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct EnuCoor_f* enu);
extern void ecef_of_ned_point_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct NedCoor_f* ned);
extern void ecef_of_enu_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct EnuCoor_f* enu);
extern void ecef_of_ned_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct NedCoor_f* ned);
-#endif
+/* end use double versions */
#endif /* PPRZ_GEODETIC_FLOAT_H */
diff --git a/sw/airborne/math/pprz_geodetic_int.c b/sw/airborne/math/pprz_geodetic_int.c
index e5675607c5..99153cc38c 100644
--- a/sw/airborne/math/pprz_geodetic_int.c
+++ b/sw/airborne/math/pprz_geodetic_int.c
@@ -24,10 +24,6 @@
#include "pprz_geodetic_int.h"
#include "pprz_algebra_int.h"
-#define CM_OF_M(_m) ((_m)*1e2)
-#define M_OF_CM(_cm) ((_cm)/1e2)
-#define EM7RAD_OF_RAD(_r) (_r*1e7)
-#define RAD_OF_EM7RAD(_r) (_r/1e7)
#define HIGH_RES_TRIG_FRAC 20
void ltp_def_from_ecef_i(struct LtpDef_i* def, struct EcefCoor_i* ecef) {
@@ -53,7 +49,7 @@ void ltp_def_from_ecef_i(struct LtpDef_i* def, struct EcefCoor_i* ecef) {
def->ltp_of_ecef.m[0] = -sin_lon;
def->ltp_of_ecef.m[1] = cos_lon;
- def->ltp_of_ecef.m[2] = 0;
+ def->ltp_of_ecef.m[2] = 0; /* this element is always zero http://en.wikipedia.org/wiki/Geodetic_system#From_ECEF_to_ENU */
def->ltp_of_ecef.m[3] = (int32_t)((-(int64_t)sin_lat*(int64_t)cos_lon)>>HIGH_RES_TRIG_FRAC);
def->ltp_of_ecef.m[4] = (int32_t)((-(int64_t)sin_lat*(int64_t)sin_lon)>>HIGH_RES_TRIG_FRAC);
def->ltp_of_ecef.m[5] = cos_lat;
@@ -63,9 +59,38 @@ void ltp_def_from_ecef_i(struct LtpDef_i* def, struct EcefCoor_i* ecef) {
}
+void ltp_def_from_lla_i(struct LtpDef_i* def, struct LlaCoor_i* lla) {
-//void init_ltp_from_lla_i(struct LtpRef_i* ref_param, struct LlaCoor_i* ref_pos) {
-//}
+ /* store the origin of the tangeant plane */
+ LLA_COPY(def->lla, *lla);
+ /* compute the ecef representation of the origin */
+ ecef_of_lla_i(&def->ecef, &def->lla);
+ /* store the rotation matrix */
+
+#if 1
+ int32_t sin_lat = rint(BFP_OF_REAL(sinf(RAD_OF_EM7RAD((float)def->lla.lat)), HIGH_RES_TRIG_FRAC));
+ int32_t cos_lat = rint(BFP_OF_REAL(cosf(RAD_OF_EM7RAD((float)def->lla.lat)), HIGH_RES_TRIG_FRAC));
+ int32_t sin_lon = rint(BFP_OF_REAL(sinf(RAD_OF_EM7RAD((float)def->lla.lon)), HIGH_RES_TRIG_FRAC));
+ int32_t cos_lon = rint(BFP_OF_REAL(cosf(RAD_OF_EM7RAD((float)def->lla.lon)), HIGH_RES_TRIG_FRAC));
+#else
+ int32_t sin_lat = rint(BFP_OF_REAL(sin(RAD_OF_EM7RAD((double)def->lla.lat)), HIGH_RES_TRIG_FRAC));
+ int32_t cos_lat = rint(BFP_OF_REAL(cos(RAD_OF_EM7RAD((double)def->lla.lat)), HIGH_RES_TRIG_FRAC));
+ int32_t sin_lon = rint(BFP_OF_REAL(sin(RAD_OF_EM7RAD((double)def->lla.lon)), HIGH_RES_TRIG_FRAC));
+ int32_t cos_lon = rint(BFP_OF_REAL(cos(RAD_OF_EM7RAD((double)def->lla.lon)), HIGH_RES_TRIG_FRAC));
+#endif
+
+
+ def->ltp_of_ecef.m[0] = -sin_lon;
+ def->ltp_of_ecef.m[1] = cos_lon;
+ def->ltp_of_ecef.m[2] = 0; /* this element is always zero http://en.wikipedia.org/wiki/Geodetic_system#From_ECEF_to_ENU */
+ def->ltp_of_ecef.m[3] = (int32_t)((-(int64_t)sin_lat*(int64_t)cos_lon)>>HIGH_RES_TRIG_FRAC);
+ def->ltp_of_ecef.m[4] = (int32_t)((-(int64_t)sin_lat*(int64_t)sin_lon)>>HIGH_RES_TRIG_FRAC);
+ def->ltp_of_ecef.m[5] = cos_lat;
+ def->ltp_of_ecef.m[6] = (int32_t)(( (int64_t)cos_lat*(int64_t)cos_lon)>>HIGH_RES_TRIG_FRAC);
+ def->ltp_of_ecef.m[7] = (int32_t)(( (int64_t)cos_lat*(int64_t)sin_lon)>>HIGH_RES_TRIG_FRAC);
+ def->ltp_of_ecef.m[8] = sin_lat;
+
+}
void enu_of_ecef_point_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct EcefCoor_i* ecef) {
@@ -73,14 +98,14 @@ void enu_of_ecef_point_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct Ece
VECT3_DIFF(delta, *ecef, def->ecef);
const int64_t tmpx = (int64_t)def->ltp_of_ecef.m[0]*delta.x +
(int64_t)def->ltp_of_ecef.m[1]*delta.y +
- 0;
+ 0; /* this element is always zero http://en.wikipedia.org/wiki/Geodetic_system#From_ECEF_to_ENU */
enu->x = (int32_t)(tmpx>>HIGH_RES_TRIG_FRAC);
const int64_t tmpy = (int64_t)def->ltp_of_ecef.m[3]*delta.x +
(int64_t)def->ltp_of_ecef.m[4]*delta.y +
(int64_t)def->ltp_of_ecef.m[5]*delta.z;
enu->y = (int32_t)(tmpy>>HIGH_RES_TRIG_FRAC);
const int64_t tmpz = (int64_t)def->ltp_of_ecef.m[6]*delta.x +
- (int64_t)def->ltp_of_ecef.m[7]*delta.y +
+ (int64_t)def->ltp_of_ecef.m[7]*delta.y +
(int64_t)def->ltp_of_ecef.m[8]*delta.z;
enu->z = (int32_t)(tmpz>>HIGH_RES_TRIG_FRAC);
@@ -99,14 +124,14 @@ void enu_of_ecef_vect_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct Ecef
const int64_t tmpx = (int64_t)def->ltp_of_ecef.m[0]*ecef->x +
(int64_t)def->ltp_of_ecef.m[1]*ecef->y +
- 0;
+ 0; /* this element is always zero http://en.wikipedia.org/wiki/Geodetic_system#From_ECEF_to_ENU */
enu->x = (int32_t)(tmpx>>HIGH_RES_TRIG_FRAC);
const int64_t tmpy = (int64_t)def->ltp_of_ecef.m[3]*ecef->x +
(int64_t)def->ltp_of_ecef.m[4]*ecef->y +
(int64_t)def->ltp_of_ecef.m[5]*ecef->z;
enu->y = (int32_t)(tmpy>>HIGH_RES_TRIG_FRAC);
const int64_t tmpz = (int64_t)def->ltp_of_ecef.m[6]*ecef->x +
- (int64_t)def->ltp_of_ecef.m[7]*ecef->y +
+ (int64_t)def->ltp_of_ecef.m[7]*ecef->y +
(int64_t)def->ltp_of_ecef.m[8]*ecef->z;
enu->z = (int32_t)(tmpz>>HIGH_RES_TRIG_FRAC);
@@ -114,15 +139,57 @@ void enu_of_ecef_vect_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct Ecef
void ned_of_ecef_vect_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct EcefCoor_i* ecef) {
-
struct EnuCoor_i enu;
enu_of_ecef_vect_i(&enu, def, ecef);
ENU_OF_TO_NED(*ned, enu);
+}
+/* check if resolution of INT32_TRIG_FRAC (14) is enough here */
+void ecef_of_enu_point_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct EnuCoor_i* enu) {
+ INT32_RMAT_TRANSP_VMULT(*ecef, def->ltp_of_ecef, *enu);
+ INT32_VECT3_ADD(*ecef, def->ecef);
+}
+
+void ecef_of_ned_point_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct NedCoor_i* ned) {
+ struct EnuCoor_i enu;
+ ENU_OF_TO_NED(enu, *ned);
+ ecef_of_enu_point_i(ecef, def, &enu);
+}
+
+void ecef_of_enu_vect_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct EnuCoor_i* enu) {
+ INT32_RMAT_TRANSP_VMULT(*ecef, def->ltp_of_ecef, *enu);
+}
+
+void ecef_of_ned_vect_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct NedCoor_i* ned) {
+ struct EnuCoor_i enu;
+ ENU_OF_TO_NED(enu, *ned);
+ ecef_of_enu_vect_i(ecef, def, &enu);
}
+void enu_of_lla_point_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct LlaCoor_i* lla) {
+ struct EcefCoor_i ecef;
+ ecef_of_lla_i(&ecef,lla);
+ enu_of_ecef_point_i(enu,def,&ecef);
+}
+void ned_of_lla_point_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct LlaCoor_i* lla) {
+ struct EcefCoor_i ecef;
+ ecef_of_lla_i(&ecef,lla);
+ ned_of_ecef_point_i(ned,def,&ecef);
+}
+
+void enu_of_lla_vect_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct LlaCoor_i* lla) {
+ struct EcefCoor_i ecef;
+ ecef_of_lla_i(&ecef,lla);
+ enu_of_ecef_vect_i(enu,def,&ecef);
+}
+
+void ned_of_lla_vect_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct LlaCoor_i* lla) {
+ struct EcefCoor_i ecef;
+ ecef_of_lla_i(&ecef,lla);
+ ned_of_ecef_vect_i(ned,def,&ecef);
+}
/*
For now we cheat and call the floating point version
@@ -164,19 +231,3 @@ void ecef_of_lla_i(struct EcefCoor_i* out, struct LlaCoor_i* in) {
out->z = (int32_t)CM_OF_M(out_d.z);
}
-
-//#include "stdio.h"
-void enu_of_lla_point_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct LlaCoor_i* lla) {
- struct EcefCoor_i ecef;
- ecef_of_lla_i(&ecef,lla);
- //printf("sim %d %d %d, def %d %d %d\n",ecef.x,ecef.y,ecef.z,def->ecef.x,def->ecef.y,def->ecef.z);
- //printf("sim lla def %d %d %d\n",def->lla.lat,def->lla.lon,def->lla.alt);
- enu_of_ecef_point_i(enu,def,&ecef);
-}
-
-void ned_of_lla_point_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct LlaCoor_i* lla) {
- struct EcefCoor_i ecef;
- ecef_of_lla_i(&ecef,lla);
- ned_of_ecef_point_i(ned,def,&ecef);
-}
-
diff --git a/sw/airborne/math/pprz_geodetic_int.h b/sw/airborne/math/pprz_geodetic_int.h
index 93a640387d..7d95b30512 100644
--- a/sw/airborne/math/pprz_geodetic_int.h
+++ b/sw/airborne/math/pprz_geodetic_int.h
@@ -1,3 +1,32 @@
+/*
+ * Copyright (C) 2008-2011 The Paparazzi Team
+ *
+ * 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
+ * .
+ *
+ */
+
+/**
+ * @file pprz_geodetic_int.h
+ * @brief Paparazzi fixed point math for geodetic calculations.
+ *
+ * This is the more detailed description of this file.
+ *
+ */
+
#ifndef PPRZ_GEODETIC_INT_H
#define PPRZ_GEODETIC_INT_H
@@ -6,47 +35,62 @@
#include "std.h"
#include "pprz_algebra_int.h"
-/*
- Earth Centered Earth Fixed in centimeters
-*/
+
+/**
+ * @brief vector in EarthCenteredEarthFixed coordinates
+ * @details Origin at center of mass of the Earth. Z-axis is pointing north,
+ * the x-axis intersects the sphere of the earth at 0° latitude (Equator)
+ * and 0° longitude (Greenwich). Y-axis completes it to right-hand system.
+ * Units: centimeters */
struct EcefCoor_i {
- int32_t x;
- int32_t y;
- int32_t z;
+ int32_t x; ///< in centimeters
+ int32_t y; ///< in centimeters
+ int32_t z; ///< in centimeters
};
-/* lon, lat in radians*1e7 */
-/* alt in centimeters */
+/**
+ * @brief vector in Latitude, Longitude and Altitude
+ * @details Units lat,lon: radians*1e7
+ * Unit alt: centimeters above MSL
+ */
struct LlaCoor_i {
- int32_t lon;
- int32_t lat;
- int32_t alt;
+ int32_t lon; ///< in radians*1e7
+ int32_t lat; ///< in radians*1e7
+ int32_t alt; ///< in centimeters above MSL
};
-/* North East Down local tangeant plane */
+/**
+ * @brief vector in North East Down coordinates
+ */
struct NedCoor_i {
int32_t x;
int32_t y;
int32_t z;
};
-/* East North Up local tangeant plane */
+/**
+ * @brief vector in East North Up coordinates
+ */
struct EnuCoor_i {
int32_t x;
int32_t y;
int32_t z;
};
-/* Local tangeant plane definition */
+/**
+ * @brief definition of the local (flat earth) coordinate system
+ * @details Defines the origin of the local coordinate system
+ * in ECEF and LLA coordinates and the roation matrix from
+ * ECEF to local frame */
struct LtpDef_i {
- struct EcefCoor_i ecef; /* Reference point in ecef */
- struct LlaCoor_i lla; /* Reference point in lla */
- struct Int32Mat33 ltp_of_ecef; /* Rotation matrix */
- int32_t hmsl; /* Height above mean sea level */
+ struct EcefCoor_i ecef; ///< Reference point in ecef
+ struct LlaCoor_i lla; ///< Reference point in lla
+ struct Int32Mat33 ltp_of_ecef; ///< Rotation matrix
+ int32_t hmsl; ///< Height above mean sea level
};
extern void ltp_def_from_ecef_i(struct LtpDef_i* def, struct EcefCoor_i* ecef);
-//extern void ltp_def_from_lla_i(struct LtpRef_i* def, struct LlaCoor_i* lla);
+extern void ltp_def_from_lla_i(struct LtpDef_i* def, struct LlaCoor_i* lla);
extern void lla_of_ecef_i(struct LlaCoor_i* out, struct EcefCoor_i* in);
extern void ecef_of_lla_i(struct EcefCoor_i* out, struct LlaCoor_i* in);
extern void enu_of_ecef_point_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct EcefCoor_i* ecef);
@@ -55,18 +99,69 @@ extern void enu_of_ecef_vect_i(struct EnuCoor_i* enu, struct LtpDef_i* def, stru
extern void ned_of_ecef_vect_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct EcefCoor_i* ecef);
extern void enu_of_lla_point_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct LlaCoor_i* lla);
extern void ned_of_lla_point_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct LlaCoor_i* lla);
+extern void enu_of_lla_vect_i(struct EnuCoor_i* enu, struct LtpDef_i* def, struct LlaCoor_i* lla);
+extern void ned_of_lla_vect_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct LlaCoor_i* lla);
+extern void ecef_of_enu_point_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct EnuCoor_i* enu);
+extern void ecef_of_ned_point_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct NedCoor_i* ned);
+extern void ecef_of_enu_vect_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct EnuCoor_i* enu);
+extern void ecef_of_ned_vect_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct NedCoor_i* ned);
+
+#define CM_OF_M(_m) ((_m)*1e2)
+#define M_OF_CM(_cm) ((_cm)/1e2)
+#define EM7RAD_OF_RAD(_r) (_r*1e7)
+#define RAD_OF_EM7RAD(_r) (_r/1e7)
#define INT32_VECT3_ENU_OF_NED(_o, _i) { \
- _o.x = _i.y; \
- _o.y = _i.x; \
- _o.z = -_i.z; \
+ (_o).x = (_i).y; \
+ (_o).y = (_i).x; \
+ (_o).z = -(_i).z; \
}
#define INT32_VECT3_NED_OF_ENU(_o, _i) INT32_VECT3_ENU_OF_NED(_o,_i)
+#define ECEF_BFP_OF_REAL(_o, _i) { \
+ (_o).x = (int32_t)CM_OF_M((_i).x); \
+ (_o).y = (int32_t)CM_OF_M((_i).y); \
+ (_o).z = (int32_t)CM_OF_M((_i).z); \
+ }
+
+#define ECEF_FLOAT_OF_BFP(_o, _i) { \
+ (_o).x = (float)M_OF_CM((_i).x); \
+ (_o).y = (float)M_OF_CM((_i).y); \
+ (_o).z = (float)M_OF_CM((_i).z); \
+ }
+
+#define LLA_BFP_OF_REAL(_o, _i) { \
+ (_o).lat = (int32_t)EM7RAD_OF_RAD((_i).lat); \
+ (_o).lon = (int32_t)EM7RAD_OF_RAD((_i).lon); \
+ (_o).alt = (int32_t)CM_OF_M((_i).alt); \
+ }
+
+#define LLA_FLOAT_OF_BFP(_o, _i) { \
+ (_o).lat = (float)RAD_OF_EM7RAD((_i).lat); \
+ (_o).lon = (float)RAD_OF_EM7RAD((_i).lon); \
+ (_o).alt = (float)M_OF_CM((_i).alt); \
+ }
+
+#define NED_BFP_OF_REAL(_o, _i) { \
+ (_o).x = POS_BFP_OF_REAL((_i).x); \
+ (_o).y = POS_BFP_OF_REAL((_i).y); \
+ (_o).z = POS_BFP_OF_REAL((_i).z); \
+ }
+
+#define ENU_BFP_OF_REAL(_o, _i) NED_BFP_OF_REAL(_o, _i)
+
+#define NED_FLOAT_OF_BFP(_o, _i) { \
+ (_o).x = POS_FLOAT_OF_BFP((_i).x); \
+ (_o).y = POS_FLOAT_OF_BFP((_i).y); \
+ (_o).z = POS_FLOAT_OF_BFP((_i).z); \
+ }
+
+#define ENU_FLOAT_OF_BFP(_o, _i) NED_FLOAT_OF_BFP(_o, _i)
+
#define INT32_VECT2_ENU_OF_NED(_o, _i) { \
- _o.x = _i.y; \
- _o.y = _i.x; \
+ (_o).x = (_i).y; \
+ (_o).y = (_i).x; \
}
#define INT32_VECT2_NED_OF_ENU(_o, _i) INT32_VECT2_ENU_OF_NED(_o,_i)
diff --git a/sw/airborne/mcu.c b/sw/airborne/mcu.c
index d1f02766d7..e0853e4bab 100644
--- a/sw/airborne/mcu.c
+++ b/sw/airborne/mcu.c
@@ -36,7 +36,7 @@
#if defined USE_UART0 || defined USE_UART1 || defined USE_UART2 || defined USE_UART3 || defined USE_UART4 || defined USE_UART5
#include "mcu_periph/uart.h"
#endif
-#if defined USE_I2C0 || defined USE_I2C1 || defined USE_I2C2
+#if defined USE_I2C0 || defined USE_I2C1 || defined USE_I2C2
#include "mcu_periph/i2c.h"
#endif
#if defined USE_ADC
diff --git a/sw/airborne/mcu_periph/i2c.h b/sw/airborne/mcu_periph/i2c.h
index 6c6b400682..43753823ce 100644
--- a/sw/airborne/mcu_periph/i2c.h
+++ b/sw/airborne/mcu_periph/i2c.h
@@ -48,7 +48,9 @@ struct i2c_transaction {
volatile enum I2CTransactionStatus status;
};
+#ifndef I2C_TRANSACTION_QUEUE_LEN
#define I2C_TRANSACTION_QUEUE_LEN 8
+#endif
struct i2c_periph {
/* circular buffer holding transactions */
@@ -126,6 +128,7 @@ extern void i2c2_init(void);
#endif /* USE_I2C2 */
extern void i2c_init(struct i2c_periph* p);
+extern bool_t i2c_idle(struct i2c_periph* p);
extern bool_t i2c_submit(struct i2c_periph* p, struct i2c_transaction* t);
#define I2CReceive(_p, _t, _s_addr, _len) { \
diff --git a/sw/airborne/modules/airborne_ant_track/airborne_ant_track.c b/sw/airborne/modules/airborne_ant_track/airborne_ant_track.c
new file mode 100755
index 0000000000..1e6ddb8dd0
--- /dev/null
+++ b/sw/airborne/modules/airborne_ant_track/airborne_ant_track.c
@@ -0,0 +1,177 @@
+/*
+ * Determines antenna pan angle.
+ *
+ * project: Paparazzi
+ * description: Determines antenna pan angle from
+ * plane's and home's positions and plane's heading angle.
+ * Software might be optimized
+ * by removing multiplications with 0, it is left this
+ * way for better understandabilty and changeability.
+ *
+ * authors: Arnold Schroeter, Martin Mueller, Chris Efstathiou
+ *
+ *
+ *
+ *
+ */
+
+#if defined(USE_AIRBORNE_ANT_TRACKING) && USE_AIRBORNE_ANT_TRACKING == 1
+
+#include
+#include
+#include "inter_mcu.h"
+#include "subsystems/navigation/common_nav.h"
+#include "autopilot.h"
+#include "generated/flight_plan.h"
+#include "estimator.h"
+#include "subsystems/navigation/traffic_info.h"
+#include "airborne_ant_track.h"
+
+
+typedef struct {
+ float fx;
+ float fy;
+ float fz;} VECTOR;
+
+typedef struct {
+ float fx1; float fx2; float fx3;
+ float fy1; float fy2; float fy3;
+ float fz1; float fz2; float fz3;} MATRIX;
+
+float airborne_ant_pan;
+static bool_t ant_pan_positive = 0;
+
+void ant_point(void);
+static void vSubtractVectors(VECTOR* svA, VECTOR svB, VECTOR svC);
+static void vMultiplyMatrixByVector(VECTOR* svA, MATRIX smB, VECTOR svC);
+
+/*******************************************************************
+; function name: vSubtractVectors
+; description: subtracts two vectors a = b - c
+; parameters:
+;*******************************************************************/
+static void vSubtractVectors(VECTOR* svA, VECTOR svB, VECTOR svC)
+{
+ svA->fx = svB.fx - svC.fx;
+ svA->fy = svB.fy - svC.fy;
+ svA->fz = svB.fz - svC.fz;
+}
+
+/*******************************************************************
+; function name: vMultiplyMatrixByVector
+; description: multiplies matrix by vector svA = smB * svC
+; parameters:
+;*******************************************************************/
+static void vMultiplyMatrixByVector(VECTOR* svA, MATRIX smB, VECTOR svC)
+{
+ svA->fx = smB.fx1 * svC.fx + smB.fx2 * svC.fy + smB.fx3 * svC.fz;
+ svA->fy = smB.fy1 * svC.fx + smB.fy2 * svC.fy + smB.fy3 * svC.fz;
+ svA->fz = smB.fz1 * svC.fx + smB.fz2 * svC.fy + smB.fz3 * svC.fz;
+}
+
+void airborne_ant_point_init(void){
+
+return;
+}
+
+void airborne_ant_point_periodic(void)
+{
+float airborne_ant_pan_servo = 0;
+
+ static VECTOR svPlanePosition,
+ Home_Position,
+ Home_PositionForPlane,
+ Home_PositionForPlane2;
+
+ static MATRIX smRotation;
+
+ svPlanePosition.fx = estimator_y;
+ svPlanePosition.fy = estimator_x;
+ svPlanePosition.fz = estimator_z;
+
+ Home_Position.fx = waypoints[WP_HOME].y;
+ Home_Position.fy = waypoints[WP_HOME].x;
+ Home_Position.fz = waypoints[WP_HOME].a;
+
+ /* distance between plane and object */
+ vSubtractVectors(&Home_PositionForPlane, Home_Position, svPlanePosition);
+
+ /* yaw */
+ smRotation.fx1 = (float)(cos(estimator_hspeed_dir));
+ smRotation.fx2 = (float)(sin(estimator_hspeed_dir));
+ smRotation.fx3 = 0.;
+ smRotation.fy1 = -smRotation.fx2;
+ smRotation.fy2 = smRotation.fx1;
+ smRotation.fy3 = 0.;
+ smRotation.fz1 = 0.;
+ smRotation.fz2 = 0.;
+ smRotation.fz3 = 1.;
+
+ vMultiplyMatrixByVector(&Home_PositionForPlane2, smRotation, Home_PositionForPlane);
+
+
+/*
+ * This is for one axis pan antenna mechanisms. The default is to
+ * circle clockwise so view is right. The pan servo neutral makes
+ * the antenna look to the right with 0° given, 90° is to the back and
+ * -90° is to the front.
+ *
+ *
+ *
+ * plane front
+ *
+ * 90
+ ^
+ * I
+ * 135 I 45°
+ * \ I /
+ * \I/
+ * 180-------I------- 0°
+ * /I\
+ * / I \
+ * -135 I -45°
+ * I
+ * -90
+ * plane back
+ *
+ *
+ */
+
+ /* fPan = 0 -> antenna looks along the wing
+ 90 -> antenna looks in flight direction
+ -90 -> antenna looks backwards
+ */
+ /* fixed to the plane*/
+ airborne_ant_pan = (float)(atan2(Home_PositionForPlane2.fx, (Home_PositionForPlane2.fy)));
+
+ // I need to avoid oscillations around the 180 degree mark.
+ if (airborne_ant_pan > 0 && airborne_ant_pan <= RadOfDeg(175)){ ant_pan_positive = 1; }
+ if (airborne_ant_pan < 0 && airborne_ant_pan >= RadOfDeg(-175)){ ant_pan_positive = 0; }
+
+ if (airborne_ant_pan > RadOfDeg(175) && ant_pan_positive == 0){
+ airborne_ant_pan = RadOfDeg(-180);
+
+ }else if (airborne_ant_pan < RadOfDeg(-175) && ant_pan_positive){
+ airborne_ant_pan = RadOfDeg(180);
+ ant_pan_positive = 0;
+ }
+
+#ifdef ANT_PAN_NEUTRAL
+ airborne_ant_pan = airborne_ant_pan - RadOfDeg(ANT_PAN_NEUTRAL);
+ if (airborne_ant_pan > 0)
+ airborne_ant_pan_servo = MAX_PPRZ * (airborne_ant_pan / (RadOfDeg(ANT_PAN_MAX - ANT_PAN_NEUTRAL)));
+ else
+ airborne_ant_pan_servo = MIN_PPRZ * (airborne_ant_pan / (RadOfDeg(ANT_PAN_MIN - ANT_PAN_NEUTRAL)));
+#endif
+
+ airborne_ant_pan_servo = TRIM_PPRZ(airborne_ant_pan_servo);
+
+#ifdef COMMAND_ANT_PAN
+ ap_state->commands[COMMAND_ANT_PAN] = airborne_ant_pan_servo;
+#endif
+
+
+return;
+}
+
+#endif
diff --git a/sw/airborne/modules/airborne_ant_track/airborne_ant_track.h b/sw/airborne/modules/airborne_ant_track/airborne_ant_track.h
new file mode 100755
index 0000000000..64cfaf50e6
--- /dev/null
+++ b/sw/airborne/modules/airborne_ant_track/airborne_ant_track.h
@@ -0,0 +1,34 @@
+/*
+ * $Id: point.h 2304 2008-02-07 21:35:08Z mmm $
+ *
+ * Copyright (C) 2005-2008 Arnold Schroeter
+ *
+ * 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, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#if defined(USE_AIRBORNE_ANT_TRACKING) && USE_AIRBORNE_ANT_TRACKING == 1
+#ifndef AIRBORNE_ANT_TRACK_H
+#define AIRBORNE_ANT_TRACK_H
+
+extern float airborne_ant_pan;
+void airborne_ant_point_init(void);
+void airborne_ant_point_periodic(void);
+
+#endif /* AIRBORNE_ANT_TRACK_H */
+#endif // #if defined(USE_AIRBORNE_ANT_TRACKING) && USE_AIRBORNE_ANT_TRACKING == 1
diff --git a/sw/airborne/modules/cam_control/booz_cam.c b/sw/airborne/modules/cam_control/booz_cam.c
index 80f509db57..c595b787b1 100644
--- a/sw/airborne/modules/cam_control/booz_cam.c
+++ b/sw/airborne/modules/cam_control/booz_cam.c
@@ -23,7 +23,7 @@
*/
#include "cam_control/booz_cam.h"
-#include "booz2_pwm_hw.h"
+#include "modules/core/booz_pwm_arch.h"
#include "subsystems/ahrs.h"
#include "firmwares/rotorcraft/navigation.h"
#include "subsystems/ins.h"
@@ -64,7 +64,7 @@ int16_t booz_cam_pan;
// PWM definition
#ifndef BOOZ_CAM_SetPwm
-#define BOOZ_CAM_SetPwm(_v) Booz2SetPwmValue(_v)
+#define BOOZ_CAM_SetPwm(_v) BoozSetPwmValue(_v)
#endif
#ifndef BOOZ_CAM_DEFAULT_MODE
diff --git a/sw/airborne/modules/core/extra_pprz_dl.h b/sw/airborne/modules/core/extra_pprz_dl.h
index 676075a90c..5c562122b2 100644
--- a/sw/airborne/modules/core/extra_pprz_dl.h
+++ b/sw/airborne/modules/core/extra_pprz_dl.h
@@ -138,7 +138,7 @@ extern uint8_t extra_pprz_ovrn, extra_pprz_error;
extern volatile uint8_t extra_pprz_payload_len;
#include "led.h"
-//#include "uart.h"
+//#include "mcu_periph/uart.h"
//#include "messages.h"
//#include "downlink.h"
static inline void parse_extra_pprz( uint8_t c ) {
diff --git a/sw/airborne/modules/drop/booz_drop.c b/sw/airborne/modules/drop/booz_drop.c
index 2e2ba6c4d8..206c8a09f3 100644
--- a/sw/airborne/modules/drop/booz_drop.c
+++ b/sw/airborne/modules/drop/booz_drop.c
@@ -21,8 +21,8 @@
* Boston, MA 02111-1307, USA.
*/
-#include "booz_drop.h"
-#include "booz2_pwm_hw.h"
+#include "modules/drop/booz_drop.h"
+#include "modules/core/booz_pwm_arch.h"
#include "generated/airframe.h"
bool_t booz_drop_ball;
@@ -37,7 +37,7 @@ int16_t booz_drop_servo;
// PWM definition
#ifndef BoozDropPwm
-#define BoozDropPwm(_v) Booz2SetPwmValue(_v)
+#define BoozDropPwm(_v) BoozSetPwmValue(_v)
#endif
void booz_drop_init(void) {
diff --git a/sw/airborne/modules/ins/fw_ins_vn100.c b/sw/airborne/modules/ins/fw_ins_vn100.c
index 1b08545606..a8524a7f03 100644
--- a/sw/airborne/modules/ins/fw_ins_vn100.c
+++ b/sw/airborne/modules/ins/fw_ins_vn100.c
@@ -28,9 +28,19 @@
#include "modules/ins/ins_vn100.h"
#include "mcu_periph/spi.h"
+#include "estimator.h"
+#include "generated/airframe.h"
+
+#ifndef INS_YAW_NEUTRAL_DEFAULT
+#define INS_YAW_NEUTRAL_DEFAULT 0.
+#endif
void ins_init( void ) {
+ ins_roll_neutral = INS_ROLL_NEUTRAL_DEFAULT;
+ ins_pitch_neutral = INS_PITCH_NEUTRAL_DEFAULT;
+ ins_yaw_neutral = INS_YAW_NEUTRAL_DEFAULT;
+
/* SPI polarity = 1 - data sampled on rising edge */
SpiSetCPOL();
/* SPI phase = 1 - SCK idle high */
@@ -100,6 +110,11 @@ void ins_event_task( void ) {
if (spi_message_received) {
spi_message_received = FALSE;
parse_ins_msg();
+#ifndef INS_VN100_READ_ONLY
+ // Update estimator
+ // FIXME Use a proper rotation matrix here
+ EstimatorSetAtt((ins_eulers.phi - ins_roll_neutral), ins_eulers.psi, (ins_eulers.theta - ins_pitch_neutral));
+#endif
//uint8_t s = 4+VN100_REG_QMR_SIZE;
//DOWNLINK_SEND_DEBUG(DefaultChannel,s,spi_buffer_input);
}
diff --git a/sw/airborne/modules/ins/ins_vn100.c b/sw/airborne/modules/ins/ins_vn100.c
index d0670ca565..576272072d 100644
--- a/sw/airborne/modules/ins/ins_vn100.c
+++ b/sw/airborne/modules/ins/ins_vn100.c
@@ -34,6 +34,11 @@
#include "downlink.h"
#include "messages.h"
+/* neutrals */
+float ins_roll_neutral;
+float ins_pitch_neutral;
+float ins_yaw_neutral;
+
struct FloatEulers ins_eulers;
struct FloatQuat ins_quat;
struct FloatRates ins_rates;
@@ -176,6 +181,9 @@ void parse_ins_msg( void ) {
}
+#ifndef DOWNLINK_DEVICE
+#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
+#endif
#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
diff --git a/sw/airborne/modules/ins/ins_vn100.h b/sw/airborne/modules/ins/ins_vn100.h
index f60f485de3..20d58f153f 100644
--- a/sw/airborne/modules/ins/ins_vn100.h
+++ b/sw/airborne/modules/ins/ins_vn100.h
@@ -35,6 +35,11 @@
#include "VN100.h"
#include "math/pprz_algebra_float.h"
+/* neutrals */
+extern float ins_roll_neutral;
+extern float ins_pitch_neutral;
+extern float ins_yaw_neutral;
+
/* state */
extern struct FloatEulers ins_eulers;
extern struct FloatQuat ins_quat;
diff --git a/sw/airborne/modules/sensors/baro_MS5534A.c b/sw/airborne/modules/sensors/baro_MS5534A.c
index d922cff51b..ecd698bbed 100644
--- a/sw/airborne/modules/sensors/baro_MS5534A.c
+++ b/sw/airborne/modules/sensors/baro_MS5534A.c
@@ -235,19 +235,19 @@ void baro_MS5534A_event_task( void ) {
baro_MS5534A_available = TRUE;
break;
- case STATUS_RESET:
- break;
+ case STATUS_RESET:
+ break;
default: /* Init status */
words[status] = Uint16(buf_input);
if (status == STATUS_INIT4) {
- calibration();
+ calibration();
}
}
} /* else nothing to read */
NextStatus();
if (!status_read_data) {
- /* Ask next conversion now */
+ /* Ask next conversion now */
baro_MS5534A_send();
}
}
@@ -261,9 +261,8 @@ void baro_MS5534A_event( void ) {
baro_MS5534A_available = FALSE;
baro_MS5534A_z = ground_alt +((float)baro_MS5534A_ground_pressure - baro_MS5534A_pressure)*0.084;
if (alt_baro_enabled) {
- EstimatorSetAlt(baro_MS5534A_z);
+ EstimatorSetAlt(baro_MS5534A_z);
}
}
}
}
-
diff --git a/sw/airborne/modules/sensors/baro_ets.c b/sw/airborne/modules/sensors/baro_ets.c
index 462956a181..520eac4f2f 100644
--- a/sw/airborne/modules/sensors/baro_ets.c
+++ b/sw/airborne/modules/sensors/baro_ets.c
@@ -40,6 +40,8 @@
#include "estimator.h"
#include
+#include "subsystems/nav.h"
+
#ifdef SITL
#include "gps.h"
#endif
@@ -132,12 +134,13 @@ void baro_ets_read_event( void ) {
baro_ets_offset_tmp += baro_ets_adc;
}
// Convert raw to m/s
- if (baro_ets_offset_init)
- baro_ets_altitude = BARO_ETS_SCALE * (float)(baro_ets_offset-baro_ets_adc);
- else
+ if (baro_ets_offset_init) {
+ baro_ets_altitude = ground_alt + BARO_ETS_SCALE * (float)(baro_ets_offset-baro_ets_adc);
+ // New value available
+ EstimatorSetAlt(baro_ets_altitude);
+ } else {
baro_ets_altitude = 0.0;
- // New value available
- EstimatorSetAlt(baro_ets_altitude);
+ }
} else {
baro_ets_altitude = 0.0;
}
diff --git a/sw/airborne/modules/sensors/baro_scp.c b/sw/airborne/modules/sensors/baro_scp.c
index 8cc888dc60..a4321049ae 100644
--- a/sw/airborne/modules/sensors/baro_scp.c
+++ b/sw/airborne/modules/sensors/baro_scp.c
@@ -3,9 +3,6 @@
#include "led.h"
#include "mcu.h"
-#ifndef DOWNLINK_DEVICE
-#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
-#endif
#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
diff --git a/sw/airborne/modules/sensors/baro_scp_i2c.c b/sw/airborne/modules/sensors/baro_scp_i2c.c
index 9a8d848f70..1c85bb5d16 100644
--- a/sw/airborne/modules/sensors/baro_scp_i2c.c
+++ b/sw/airborne/modules/sensors/baro_scp_i2c.c
@@ -11,9 +11,6 @@
#include "mcu_periph/i2c.h"
#include "led.h"
-#ifndef DOWNLINK_DEVICE
-#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
-#endif
#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
diff --git a/sw/airborne/booz/arch/sim/booz2_pwm_hw.h b/sw/airborne/modules/sensors/infrared_adc.h
similarity index 79%
rename from sw/airborne/booz/arch/sim/booz2_pwm_hw.h
rename to sw/airborne/modules/sensors/infrared_adc.h
index 3c8f3d00e1..9a0efb291a 100644
--- a/sw/airborne/booz/arch/sim/booz2_pwm_hw.h
+++ b/sw/airborne/modules/sensors/infrared_adc.h
@@ -1,7 +1,5 @@
/*
- * $Id: $
- *
- * Copyright (C) 2007 ENAC
+ * Copyright (C) 2010 ENAC
*
* This file is part of paparazzi.
*
@@ -22,11 +20,14 @@
*
*/
-#ifndef BOOZ2_PWM_HW_H
-#define BOOZ2_PWM_HW_H
+/*
+ * Wrapper for adc infrared sensor module
+ */
-extern void booz2_pwm_init_hw(void);
+#ifndef INFRARED_ADC_H
+#define INFRARED_ADC_H
-#define Booz2SetPwmValue(_v) {}
+#include "subsystems/sensors/infrared_adc.h"
+
+#endif // INFRARED_ADC_H
-#endif /* BOOZ2_PWM_HW_H */
diff --git a/sw/airborne/modules/sensors/infrared_i2c.h b/sw/airborne/modules/sensors/infrared_i2c.h
index 0b3422667c..95e9ea1d01 100644
--- a/sw/airborne/modules/sensors/infrared_i2c.h
+++ b/sw/airborne/modules/sensors/infrared_i2c.h
@@ -21,43 +21,12 @@
*/
/*
- * Driver for i2c infrared sensor
+ * Wrapper for i2c infrared sensor module
*/
#ifndef INFRARED_I2C_H
#define INFRARED_I2C_H
-#include "std.h"
-#include "generated/airframe.h"
-#include "subsystems/sensors/infrared.h"
-#include "mcu_periph/i2c.h"
-
-extern int16_t ir_i2c_ir1;
-extern int16_t ir_i2c_ir2;
-extern int16_t ir_i2c_top;
-extern volatile bool_t ir_i2c_done;
-extern bool_t ir_i2c_data_available;
-extern uint8_t ir_i2c_conf_word;
-extern bool_t ir_i2c_conf_hor_done, ir_i2c_conf_ver_done;
-
-extern struct i2c_transaction irh_trans, irv_trans;
-
-extern void infrared_i2c_init( void );
-extern void infrared_i2c_update( void );
-extern void infrared_i2c_hor_event( void );
-extern void infrared_i2c_ver_event( void );
-
-#define infrared_i2cEvent() { \
- if (irh_trans.status == I2CTransSuccess) infrared_i2c_hor_event(); \
- if (irv_trans.status == I2CTransSuccess) infrared_i2c_ver_event(); \
-}
-
-#define infrared_i2cDownlink() DOWNLINK_SEND_DEBUG_IR_I2C(DefaultChannel, &ir_i2c_ir1, &ir_i2c_ir2, &ir_i2c_top)
-
-#define infrared_i2c_SetConfWord(_v) { \
- ir_i2c_conf_hor_done = FALSE; \
- ir_i2c_conf_ver_done = FALSE; \
- ir_i2c_conf_word = _v; \
-}
+#include "subsystems/sensors/infrared_i2c.h"
#endif // INFRARED_I2C_H
diff --git a/sw/airborne/obsolete/3dmg.c b/sw/airborne/obsolete/3dmg.c
index eaaa3c6917..589dcc14e8 100644
--- a/sw/airborne/obsolete/3dmg.c
+++ b/sw/airborne/obsolete/3dmg.c
@@ -26,7 +26,7 @@
#include "std.h"
#include "3dmg.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
volatile bool_t _3dmg_data_ready;
int16_t _3dmg_roll, _3dmg_pitch, _3dmg_yaw;
diff --git a/sw/airborne/peripherals/hmc5843.c b/sw/airborne/peripherals/hmc5843.c
index 34aa71fb89..3f5c63f9f3 100644
--- a/sw/airborne/peripherals/hmc5843.c
+++ b/sw/airborne/peripherals/hmc5843.c
@@ -45,11 +45,13 @@ static void send_config(void)
void hmc5843_idle_task(void)
{
if (hmc5843.initialized && hmc5843.ready_for_read && (hmc5843.i2c_trans.status == I2CTransSuccess || hmc5843.i2c_trans.status == I2CTransFailed)) {
+ if (i2c2.status == I2CIdle && i2c_idle(&i2c2)) {
hmc5843.i2c_trans.type = I2CTransRx;
hmc5843.i2c_trans.len_r = 7;
i2c_submit(&i2c2, &hmc5843.i2c_trans);
hmc5843.reading = TRUE;
hmc5843.ready_for_read = FALSE;
+ }
}
if (hmc5843.reading && hmc5843.i2c_trans.status == I2CTransSuccess) {
@@ -70,6 +72,11 @@ void hmc5843_periodic(void)
hmc5843.initialized = TRUE;
} else if (hmc5843.timeout++ > HMC5843_TIMEOUT) {
hmc5843_arch_reset();
+ hmc5843.i2c_trans.type = I2CTransRx;
+ hmc5843.i2c_trans.len_r = 7;
+ i2c_submit(&i2c2, &hmc5843.i2c_trans);
+ hmc5843.reading = TRUE;
+ hmc5843.ready_for_read = FALSE;
hmc5843.timeout = 0;
}
}
diff --git a/sw/airborne/peripherals/ms2001.c b/sw/airborne/peripherals/ms2100.c
similarity index 74%
rename from sw/airborne/peripherals/ms2001.c
rename to sw/airborne/peripherals/ms2100.c
index 310efe2f83..1e0940339a 100644
--- a/sw/airborne/peripherals/ms2001.c
+++ b/sw/airborne/peripherals/ms2100.c
@@ -21,21 +21,21 @@
* Boston, MA 02111-1307, USA.
*/
-#include "ms2001.h"
+#include "ms2100.h"
-volatile uint8_t ms2001_status;
-volatile int16_t ms2001_values[MS2001_NB_AXIS];
+volatile uint8_t ms2100_status;
+volatile int16_t ms2100_values[MS2100_NB_AXIS];
-void ms2001_init( void ) {
+void ms2100_init( void ) {
- ms2001_arch_init();
+ ms2100_arch_init();
uint8_t i;
- for (i=0; i
-//FIXME this is still needed for fixedwing integration
+// FIXME this is still needed for fixedwing integration
#include "estimator.h"
+#include "led.h"
+
+// FIXME Debugging Only
+#ifndef DOWNLINK_DEVICE
+#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
+#endif
+#include "mcu_periph/uart.h"
+#include "messages.h"
+#include "downlink.h"
+
struct AhrsFloatDCM ahrs_impl;
@@ -49,7 +59,7 @@ float ins_pitch_neutral = INS_PITCH_NEUTRAL_DEFAULT;
// Positive yaw : clockwise
// DCM Working variables
-float G_Dt=0.05;
+const float G_Dt = 1. / ((float) AHRS_PROPAGATE_FREQUENCY );
struct FloatVect3 accel_float = {0,0,0};
@@ -69,14 +79,30 @@ float MAG_Heading;
static inline void compute_body_orientation_and_rates(void);
void Normalize(void);
void Drift_correction(void);
-void Euler_angles(void);
void Matrix_update(void);
+#if PERFORMANCE_REPORTING == 1
+int renorm_sqrt_count = 0;
+int renorm_blowup_count = 0;
+float imu_health = 0.;
+#endif
+
+
/**************************************************/
void ahrs_update_fw_estimator( void )
{
- Euler_angles();
+#if (OUTPUTMODE==2) // Only accelerometer info (debugging purposes)
+ ahrs_float.ltp_to_imu_euler.phi = atan2(accel_float.y,accel_float.z); // atan2(acc_y,acc_z)
+ ahrs_float.ltp_to_imu_euler.theta = -asin((accel_float.x)/GRAVITY); // asin(acc_x)
+ ahrs_float.ltp_to_imu_euler.psi = 0;
+#else
+ ahrs_float.ltp_to_imu_euler.phi = atan2(DCM_Matrix[2][1],DCM_Matrix[2][2]);
+ ahrs_float.ltp_to_imu_euler.theta = -asin(DCM_Matrix[2][0]);
+ ahrs_float.ltp_to_imu_euler.psi = atan2(DCM_Matrix[1][0],DCM_Matrix[0][0]);
+ ahrs_float.ltp_to_imu_euler.psi += M_PI; // Rotating the angle 180deg to fit for PPRZ
+#endif
+
//warning, only eulers written to ahrs struct so far
//compute_body_orientation_and_rates();
@@ -85,6 +111,24 @@ void ahrs_update_fw_estimator( void )
estimator_phi = ahrs_float.ltp_to_imu_euler.phi - ins_roll_neutral;
estimator_theta = ahrs_float.ltp_to_imu_euler.theta - ins_pitch_neutral;
estimator_psi = ahrs_float.ltp_to_imu_euler.psi;
+
+ estimator_p = Omega_Vector[0];
+
+ RunOnceEvery(6,DOWNLINK_SEND_RMAT_DEBUG(DefaultChannel,
+ &(DCM_Matrix[0][0]),
+ &(DCM_Matrix[0][1]),
+ &(DCM_Matrix[0][2]),
+
+ &(DCM_Matrix[1][0]),
+ &(DCM_Matrix[1][1]),
+ &(DCM_Matrix[1][2]),
+
+ &(DCM_Matrix[2][0]),
+ &(DCM_Matrix[2][1]),
+ &(DCM_Matrix[2][2])
+
+ ));
+
}
@@ -143,13 +187,30 @@ void ahrs_propagate(void)
/* unbias rate measurement */
RATES_DIFF(ahrs_float.imu_rate, gyro_float, ahrs_impl.gyro_bias);
+ /* Uncouple Motions */
+#ifdef IMU_GYRO_P_Q
+ float dp=0,dq=0,dr=0;
+ dp += ahrs_float.imu_rate.q * IMU_GYRO_P_Q;
+ dp += ahrs_float.imu_rate.r * IMU_GYRO_P_R;
+ dq += ahrs_float.imu_rate.p * IMU_GYRO_Q_P;
+ dq += ahrs_float.imu_rate.r * IMU_GYRO_Q_R;
+ dr += ahrs_float.imu_rate.p * IMU_GYRO_R_P;
+ dr += ahrs_float.imu_rate.q * IMU_GYRO_R_Q;
+
+ ahrs_float.imu_rate.p += dp;
+ ahrs_float.imu_rate.q += dq;
+ ahrs_float.imu_rate.r += dr;
+#endif
+
Matrix_update();
+ // INFO, ahrs struct only updated in ahrs_update_fw_estimator
+
Normalize();
- //INFO, ahrs struct only updated in ahrs_update_fw_estimator
}
void ahrs_update_accel(void)
{
+
ACCELS_FLOAT_OF_BFP(accel_float, imu.accel);
#ifdef USE_GPS
@@ -375,20 +436,6 @@ void Matrix_update(void)
}
}
-void Euler_angles(void)
-{
-#if (OUTPUTMODE==2) // Only accelerometer info (debugging purposes)
- ahrs_float.ltp_to_imu_euler.phi = atan2(accel_float.y,accel_float.z); // atan2(acc_y,acc_z)
- ahrs_float.ltp_to_imu_euler.theta = -asin((accel_float.x)/GRAVITY); // asin(acc_x)
- ahrs_float.ltp_to_imu_euler.psi = 0;
-#else
- ahrs_float.ltp_to_imu_euler.phi = atan2(DCM_Matrix[2][1],DCM_Matrix[2][2]);
- ahrs_float.ltp_to_imu_euler.theta = -asin(DCM_Matrix[2][0]);
- ahrs_float.ltp_to_imu_euler.psi = atan2(DCM_Matrix[1][0],DCM_Matrix[0][0]);
- ahrs_float.ltp_to_imu_euler.psi += M_PI; // Rotating the angle 180deg to fit for PPRZ
-#endif
-}
-
/*
* Compute body orientation and rates from imu orientation and rates
*/
diff --git a/sw/airborne/subsystems/ahrs/ahrs_float_dcm.h b/sw/airborne/subsystems/ahrs/ahrs_float_dcm.h
index 6bf2551539..ea54f0c1d4 100644
--- a/sw/airborne/subsystems/ahrs/ahrs_float_dcm.h
+++ b/sw/airborne/subsystems/ahrs/ahrs_float_dcm.h
@@ -47,7 +47,7 @@ void ahrs_update_fw_estimator(void);
//#define Kp_ROLLPITCH 0.2
#define Kp_ROLLPITCH 0.015
#define Ki_ROLLPITCH 0.000010
-#define Kp_YAW 1.2 //High yaw drift correction gain - use with caution!
+#define Kp_YAW 0.9 //High yaw drift correction gain - use with caution!
#define Ki_YAW 0.00005
#define GRAVITY 9.81
@@ -59,7 +59,7 @@ void ahrs_update_fw_estimator(void);
// Mode 2 = direct accelerometer -> euler
-#define PERFORMANCE_REPORTING 0
+#define PERFORMANCE_REPORTING 1
#if PERFORMANCE_REPORTING == 1
extern int renorm_sqrt_count;
extern int renorm_blowup_count;
diff --git a/sw/airborne/subsystems/imu/imu_analog.c b/sw/airborne/subsystems/imu/imu_analog.c
index 91727c687f..7901d0e86f 100644
--- a/sw/airborne/subsystems/imu/imu_analog.c
+++ b/sw/airborne/subsystems/imu/imu_analog.c
@@ -24,12 +24,14 @@
#include "mcu_periph/uart.h"
volatile bool_t analog_imu_available;
+int imu_overrun;
static struct adc_buf analog_imu_adc_buf[NB_ANALOG_IMU_ADC];
void imu_impl_init(void) {
analog_imu_available = FALSE;
+ imu_overrun = 0;
adc_buf_channel(ADC_CHANNEL_GYRO_P, &analog_imu_adc_buf[0], ADC_CHANNEL_GYRO_NB_SAMPLES);
adc_buf_channel(ADC_CHANNEL_GYRO_Q, &analog_imu_adc_buf[1], ADC_CHANNEL_GYRO_NB_SAMPLES);
@@ -41,6 +43,15 @@ void imu_impl_init(void) {
}
void imu_periodic(void) {
+ // Actual Nr of ADC measurements per channel per periodic loop
+ static int last_head = 0;
+
+ imu_overrun = analog_imu_adc_buf[0].head - last_head;
+ if (imu_overrun < 0)
+ imu_overrun += ADC_CHANNEL_GYRO_NB_SAMPLES;
+ last_head = analog_imu_adc_buf[0].head;
+
+ // Read All Measurements
imu.gyro_unscaled.p = analog_imu_adc_buf[0].sum / ADC_CHANNEL_GYRO_NB_SAMPLES;
imu.gyro_unscaled.q = analog_imu_adc_buf[1].sum / ADC_CHANNEL_GYRO_NB_SAMPLES;
imu.gyro_unscaled.r = analog_imu_adc_buf[2].sum / ADC_CHANNEL_GYRO_NB_SAMPLES;
diff --git a/sw/airborne/subsystems/imu/imu_analog.h b/sw/airborne/subsystems/imu/imu_analog.h
index c0ef110251..c7f7270fbf 100644
--- a/sw/airborne/subsystems/imu/imu_analog.h
+++ b/sw/airborne/subsystems/imu/imu_analog.h
@@ -27,11 +27,13 @@
#define NB_ANALOG_IMU_ADC 6
extern volatile bool_t analog_imu_available;
+extern int imu_overrun;
-#define ImuEvent(_gyro_accel_handler, _mag_handler) { \
+#define ImuEvent(_gyro_handler, _accel_handler, _mag_handler) { \
if (analog_imu_available) { \
analog_imu_available = FALSE; \
- _gyro_accel_handler(); \
+ _gyro_handler(); \
+ _accel_handler(); \
} \
ImuMagEvent(_mag_handler); \
}
diff --git a/sw/airborne/subsystems/imu/imu_aspirin.c b/sw/airborne/subsystems/imu/imu_aspirin.c
index 887bd724c8..7cb6f88b7c 100644
--- a/sw/airborne/subsystems/imu/imu_aspirin.c
+++ b/sw/airborne/subsystems/imu/imu_aspirin.c
@@ -1,4 +1,5 @@
#include "subsystems/imu.h"
+#include "peripherals/hmc5843.h"
#include "mcu_periph/i2c.h"
@@ -9,6 +10,18 @@ static void configure_gyro(void);
static void configure_mag(void);
static void configure_accel(void);
+static void send_i2c_msg_with_retry(struct i2c_transaction* t) {
+ uint8_t max_retry = 8;
+ uint8_t nb_retry = 0;
+ do {
+ i2c_submit(&i2c2, t);
+ while(I2C_GetFlagStatus(I2C2, I2C_FLAG_BUSY));
+ while (t->status == I2CTransPending || t->status == I2CTransRunning);
+ if (t->status == I2CTransFailed)
+ nb_retry++;
+ }
+ while (t->status != I2CTransSuccess && nb_retry < max_retry);
+}
void imu_impl_init(void) {
@@ -20,25 +33,29 @@ void imu_impl_init(void) {
imu_aspirin.accel_available = FALSE;
imu_aspirin_arch_init();
+ hmc5843_init();
}
void imu_periodic(void) {
+ hmc5843_periodic();
if (imu_aspirin.status == AspirinStatusUninit) {
configure_gyro();
- configure_mag();
configure_accel();
+ imu_aspirin_arch_int_enable();
imu_aspirin.status = AspirinStatusIdle;
}
- else
+ else {
imu_aspirin.gyro_available_blaaa = TRUE;
+ imu_aspirin.time_since_last_reading++;
+ }
+
}
/* sends a serie of I2C commands to configure the ITG3200 gyro */
static void configure_gyro(void) {
-
struct i2c_transaction t;
t.type = I2CTransTx;
t.slave_addr = ITG3200_ADDR;
@@ -46,62 +63,22 @@ static void configure_gyro(void) {
t.buf[0] = ITG3200_REG_DLPF_FS;
t.buf[1] = (0x03<<3);
t.len_w = 2;
- i2c_submit(&i2c2,&t);
- while (t.status != I2CTransSuccess);
+ send_i2c_msg_with_retry(&t);
/* set sample rate to 533Hz */
t.buf[0] = ITG3200_REG_SMPLRT_DIV;
t.buf[1] = 0x0E;
- i2c_submit(&i2c2,&t);
- while (t.status != I2CTransSuccess);
+ send_i2c_msg_with_retry(&t);
/* switch to gyroX clock */
t.buf[0] = ITG3200_REG_PWR_MGM;
t.buf[1] = 0x01;
- i2c_submit(&i2c2,&t);
- while (t.status != I2CTransSuccess);
+ send_i2c_msg_with_retry(&t);
/* enable interrupt on data ready, idle hight */
t.buf[0] = ITG3200_REG_INT_CFG;
t.buf[1] = (0x01 | 0x01<<7);
- i2c_submit(&i2c2,&t);
- while (t.status != I2CTransSuccess);
+ send_i2c_msg_with_retry(&t);
}
-/* sends a serie of I2C commands to configure the ITG3200 gyro */
-static void configure_mag(void) {
-
- struct i2c_transaction t;
- t.type = I2CTransTx;
- t.slave_addr = HMC5843_ADDR;
- /* set to rate to 50Hz */
- t.buf[0] = HMC5843_REG_CFGA;
- t.buf[1] = 0x00 | (0x06 << 2);
- i2c_submit(&i2c2,&t);
- while (t.status != I2CTransSuccess);
- /* set to gain to 1 Gauss */
- t.buf[0] = HMC5843_REG_CFGB;
- t.buf[1] = 0x01<<5;
- i2c_submit(&i2c2,&t);
- while (t.status != I2CTransSuccess);
- /* set to continuous mode */
- t.buf[0] = HMC5843_REG_MODE;
- t.buf[1] = 0x00;
- i2c_submit(&i2c2,&t);
- while (t.status != I2CTransSuccess);
-
-}
-
-
-static void send_i2c_msg_with_retry(struct i2c_transaction* t) {
- uint8_t max_retry = 8;
- uint8_t nb_retry = 0;
- do {
- i2c_submit(&i2c2,&t);
- while (t.status == I2CTransPending || t.status == I2CTransRunning);
- if (t.status == I2CTransFailed)
- nb_retry++;
- }
- while (t.status != I2CTransSuccess || nb_retry < max_retry);
-}
static void configure_accel(void) {
diff --git a/sw/airborne/subsystems/imu/imu_aspirin.h b/sw/airborne/subsystems/imu/imu_aspirin.h
index 740fad584c..439f755e5e 100644
--- a/sw/airborne/subsystems/imu/imu_aspirin.h
+++ b/sw/airborne/subsystems/imu/imu_aspirin.h
@@ -32,6 +32,9 @@
#include "peripherals/hmc5843.h"
#include "peripherals/adxl345.h"
+#define IMU_MAG_X_CHAN 0
+#define IMU_MAG_Y_CHAN 1
+#define IMU_MAG_Z_CHAN 2
#if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
#define IMU_GYRO_P_SIGN 1
@@ -60,6 +63,7 @@ struct ImuAspirin {
volatile enum AspirinStatus status;
struct i2c_transaction i2c_trans_gyro;
struct i2c_transaction i2c_trans_mag;
+ uint8_t gyro_eoc;
uint8_t gyro_available;
uint8_t gyro_available_blaaa;
uint8_t mag_available;
@@ -67,50 +71,63 @@ struct ImuAspirin {
volatile uint8_t accel_available;
volatile uint8_t accel_tx_buf[7];
volatile uint8_t accel_rx_buf[7];
+ uint32_t time_since_last_reading;
};
extern struct ImuAspirin imu_aspirin;
+#define ASPIRIN_GYRO_TIMEOUT 3
-#define ImuMagEvent(_mag_handler) {}
+#include "peripherals/hmc5843.h"
+#define foo_handler() {}
+#define ImuMagEvent(_mag_handler) { \
+ MagEvent(foo_handler); \
+ if (hmc5843.data_available) { \
+ imu.mag_unscaled.x = hmc5843.data.value[IMU_MAG_X_CHAN]; \
+ imu.mag_unscaled.y = hmc5843.data.value[IMU_MAG_Y_CHAN]; \
+ imu.mag_unscaled.z = hmc5843.data.value[IMU_MAG_Z_CHAN]; \
+ _mag_handler(); \
+ hmc5843.data_available = FALSE; \
+ } \
+}
-
-#define ImuEvent(_gyro_accel_handler, _mag_handler) { \
+#define ImuEvent(_gyro_handler, _accel_handler, _mag_handler) { \
+ if (imu_aspirin.status != AspirinStatusUninit) { \
+ ImuMagEvent(_mag_handler); \
+ imu_aspirin_arch_int_disable(); \
if (imu_aspirin.status == AspirinStatusReadingGyro && \
- imu_aspirin.i2c_trans_gyro.status == I2CTransSuccess) { \
+ imu_aspirin.i2c_trans_gyro.status == I2CTransSuccess && i2c_idle(&i2c2)) { \
int16_t gp = imu_aspirin.i2c_trans_gyro.buf[0]<<8 | imu_aspirin.i2c_trans_gyro.buf[1]; \
int16_t gq = imu_aspirin.i2c_trans_gyro.buf[2]<<8 | imu_aspirin.i2c_trans_gyro.buf[3]; \
int16_t gr = imu_aspirin.i2c_trans_gyro.buf[4]<<8 | imu_aspirin.i2c_trans_gyro.buf[5]; \
RATES_ASSIGN(imu.gyro_unscaled, gp, gq, gr); \
- if (imu_aspirin.mag_ready_for_read ) { \
- /* read mag */ \
- imu_aspirin.i2c_trans_mag.type = I2CTransRx; \
- imu_aspirin.i2c_trans_mag.slave_addr = HMC5843_ADDR; \
- imu_aspirin.i2c_trans_mag.len_r = 7; \
- i2c_submit(&i2c2,&imu_aspirin.i2c_trans_mag); \
- imu_aspirin.mag_ready_for_read = FALSE; \
- imu_aspirin.status = AspirinStatusReadingMag; \
- } \
- else { \
- imu_aspirin.status = AspirinStatusIdle; \
- } \
- } \
- if (imu_aspirin.status == AspirinStatusReadingMag && \
- imu_aspirin.i2c_trans_mag.status == I2CTransSuccess) { \
- int16_t mx = imu_aspirin.i2c_trans_mag.buf[0]<<8 | imu_aspirin.i2c_trans_mag.buf[1]; \
- int16_t my = imu_aspirin.i2c_trans_mag.buf[2]<<8 | imu_aspirin.i2c_trans_mag.buf[3]; \
- int16_t mz = imu_aspirin.i2c_trans_mag.buf[4]<<8 | imu_aspirin.i2c_trans_mag.buf[5]; \
- VECT3_ASSIGN(imu.mag_unscaled, mx, my, mz); \
- imu_aspirin.mag_available = TRUE; \
imu_aspirin.status = AspirinStatusIdle; \
- \
} \
- if (imu_aspirin.gyro_available_blaaa) { \
+ if (imu_aspirin.gyro_eoc && i2c2.status == I2CIdle && i2c_idle(&i2c2)) { \
+ if (imu_aspirin.i2c_trans_gyro.status == I2CTransSuccess) { \
+ imu_aspirin.time_since_last_reading = 0; \
+ } \
+ imu_aspirin.gyro_eoc = FALSE; \
+ imu_aspirin.i2c_trans_gyro.type = I2CTransTxRx; \
+ imu_aspirin.i2c_trans_gyro.buf[0] = ITG3200_REG_GYRO_XOUT_H; \
+ imu_aspirin.i2c_trans_gyro.slave_addr = ITG3200_ADDR; \
+ imu_aspirin.i2c_trans_gyro.len_w = 1; \
+ imu_aspirin.i2c_trans_gyro.len_r = 6; \
+ i2c_submit(&i2c2,&imu_aspirin.i2c_trans_gyro); \
+ } \
+ if (imu_aspirin.time_since_last_reading > ASPIRIN_GYRO_TIMEOUT) { \
+ imu_aspirin.gyro_eoc = FALSE; \
+ i2c2_er_irq_handler(); \
+ imu_aspirin.i2c_trans_gyro.type = I2CTransTxRx; \
+ imu_aspirin.i2c_trans_gyro.buf[0] = ITG3200_REG_GYRO_XOUT_H; \
+ imu_aspirin.i2c_trans_gyro.slave_addr = ITG3200_ADDR; \
+ imu_aspirin.i2c_trans_gyro.len_w = 1; \
+ imu_aspirin.i2c_trans_gyro.len_r = 6; \
+ i2c_submit(&i2c2,&imu_aspirin.i2c_trans_gyro); \
+ imu_aspirin.time_since_last_reading = 0; \
+ } \
+ if (imu_aspirin.gyro_available_blaaa && imu_aspirin.i2c_trans_gyro.status == I2CTransSuccess) { \
imu_aspirin.gyro_available_blaaa = FALSE; \
- _gyro_accel_handler(); \
- } \
- if (imu_aspirin.mag_available) { \
- imu_aspirin.mag_available = FALSE; \
- _mag_handler(); \
+ _gyro_handler(); \
} \
if (imu_aspirin.accel_available) { \
imu_aspirin.accel_available = FALSE; \
@@ -118,8 +135,10 @@ extern struct ImuAspirin imu_aspirin;
const int16_t ay = imu_aspirin.accel_rx_buf[3] | (imu_aspirin.accel_rx_buf[4]<<8); \
const int16_t az = imu_aspirin.accel_rx_buf[5] | (imu_aspirin.accel_rx_buf[6]<<8); \
VECT3_ASSIGN(imu.accel_unscaled, ax, ay, az); \
- _gyro_accel_handler(); \
+ _accel_handler(); \
} \
+ imu_aspirin_arch_int_enable(); \
+ } \
}
diff --git a/sw/airborne/subsystems/imu/imu_b2.c b/sw/airborne/subsystems/imu/imu_b2.c
index 394bcc16da..5d4bf680a6 100644
--- a/sw/airborne/subsystems/imu/imu_b2.c
+++ b/sw/airborne/subsystems/imu/imu_b2.c
@@ -28,8 +28,8 @@ void imu_impl_init(void) {
imu_b2_arch_init();
max1168_init();
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2001
- ms2001_init();
+#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
+ ms2100_init();
#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601
ami601_init();
#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC5843
diff --git a/sw/airborne/subsystems/imu/imu_b2.h b/sw/airborne/subsystems/imu/imu_b2.h
index fc9aa8660f..91f7b34759 100644
--- a/sw/airborne/subsystems/imu/imu_b2.h
+++ b/sw/airborne/subsystems/imu/imu_b2.h
@@ -31,7 +31,7 @@
/* type of magnetometer */
#define IMU_B2_MAG_NONE 0
-#define IMU_B2_MAG_MS2001 1
+#define IMU_B2_MAG_MS2100 1
#define IMU_B2_MAG_AMI601 2
@@ -135,21 +135,21 @@
#define IMU_ACCEL_Z_SIGN 1
#endif
#if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
-#define IMU_MAG_X_SIGN -1
-#define IMU_MAG_Y_SIGN 1
+#define IMU_MAG_X_SIGN 1
+#define IMU_MAG_Y_SIGN -1
#define IMU_MAG_Z_SIGN -1
#endif
#endif /* IMU_B2_VERSION_1_2 */
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2001
-#include "peripherals/ms2001.h"
+#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
+#include "peripherals/ms2100.h"
#define ImuMagEvent(_mag_handler) { \
- if (ms2001_status == MS2001_DATA_AVAILABLE) { \
- imu.mag_unscaled.x = ms2001_values[IMU_MAG_X_CHAN]; \
- imu.mag_unscaled.y = ms2001_values[IMU_MAG_Y_CHAN]; \
- imu.mag_unscaled.z = ms2001_values[IMU_MAG_Z_CHAN]; \
- ms2001_status = MS2001_IDLE; \
+ if (ms2100_status == MS2100_DATA_AVAILABLE) { \
+ imu.mag_unscaled.x = ms2100_values[IMU_MAG_X_CHAN]; \
+ imu.mag_unscaled.y = ms2100_values[IMU_MAG_Y_CHAN]; \
+ imu.mag_unscaled.z = ms2100_values[IMU_MAG_Z_CHAN]; \
+ ms2100_status = MS2100_IDLE; \
_mag_handler(); \
} \
}
@@ -184,7 +184,7 @@
#endif
-#define ImuEvent(_gyro_accel_handler, _mag_handler) { \
+#define ImuEvent(_gyro_handler, _accel_handler, _mag_handler) { \
if (max1168_status == STA_MAX1168_DATA_AVAILABLE) { \
imu.gyro_unscaled.p = max1168_values[IMU_GYRO_P_CHAN]; \
imu.gyro_unscaled.q = max1168_values[IMU_GYRO_Q_CHAN]; \
@@ -193,7 +193,8 @@
imu.accel_unscaled.y = max1168_values[IMU_ACCEL_Y_CHAN]; \
imu.accel_unscaled.z = max1168_values[IMU_ACCEL_Z_CHAN]; \
max1168_status = STA_MAX1168_IDLE; \
- _gyro_accel_handler(); \
+ _gyro_handler(); \
+ _accel_handler(); \
} \
ImuMagEvent(_mag_handler); \
}
diff --git a/sw/airborne/subsystems/imu/imu_crista.h b/sw/airborne/subsystems/imu/imu_crista.h
index 7f19861efa..6d7c1ab85a 100644
--- a/sw/airborne/subsystems/imu/imu_crista.h
+++ b/sw/airborne/subsystems/imu/imu_crista.h
@@ -31,7 +31,7 @@
extern uint16_t ADS8344_values[ADS8344_NB_CHANNELS];
extern volatile bool_t ADS8344_available;
-#define ImuEvent(_gyro_accel_handler, _mag_handler) { \
+#define ImuEvent(_gyro_handler, _accel_handler, _mag_handler) { \
if (ADS8344_available) { \
ADS8344_available = FALSE; \
imu.gyro_unscaled.p = ADS8344_values[IMU_GYRO_P_CHAN]; \
@@ -41,7 +41,8 @@ extern volatile bool_t ADS8344_available;
imu.accel_unscaled.y = ADS8344_values[IMU_ACCEL_Y_CHAN]; \
imu.accel_unscaled.z = ADS8344_values[IMU_ACCEL_Z_CHAN]; \
/* spare 3, temp 7 */ \
- _gyro_accel_handler(); \
+ _gyro_handler(); \
+ _accel_handler(); \
} \
ImuMagEvent(_mag_handler); \
}
diff --git a/sw/airborne/subsystems/ins.c b/sw/airborne/subsystems/ins.c
index df47371b6f..cd098c51b5 100644
--- a/sw/airborne/subsystems/ins.c
+++ b/sw/airborne/subsystems/ins.c
@@ -90,7 +90,7 @@ void ins_init() {
#ifdef USE_INS_NAV_INIT
ins_ltp_initialised = TRUE;
- /** FIXME: should use the same code than MOVE_WP in booz2_datalink.c */
+ /** FIXME: should use the same code than MOVE_WP in firmwares/rotorcraft/datalink.c */
struct LlaCoor_i llh; /* Height above the ellipsoid */
llh.lat = INT32_RAD_OF_DEG(NAV_LAT0);
llh.lon = INT32_RAD_OF_DEG(NAV_LON0);
diff --git a/sw/airborne/subsystems/ins/hf_float.c b/sw/airborne/subsystems/ins/hf_float.c
index e990dc896d..126a35c476 100644
--- a/sw/airborne/subsystems/ins/hf_float.c
+++ b/sw/airborne/subsystems/ins/hf_float.c
@@ -259,7 +259,7 @@ void b2_hff_init(float init_x, float init_xdot, float init_y, float init_ydot) {
printf("GPS_LAG_N: %d\n", GPS_LAG_N);
printf("GPS_DT_N: %d\n", GPS_DT_N);
printf("DT_HFILTER: %f\n", DT_HFILTER);
- printf("GPS_LAG_TOL_N: %f\n", GPS_LAG_TOL_N);
+ printf("GPS_LAG_TOL_N: %i\n", GPS_LAG_TOL_N);
#endif
#else
b2_hff_rb_last = &b2_hff_state;
diff --git a/sw/airborne/subsystems/navigation/OSAMNav.c b/sw/airborne/subsystems/navigation/OSAMNav.c
index 95cd4959ee..efd1c72099 100644
--- a/sw/airborne/subsystems/navigation/OSAMNav.c
+++ b/sw/airborne/subsystems/navigation/OSAMNav.c
@@ -365,9 +365,6 @@ bool_t InitializePolygonSurvey(uint8_t EntryWP, uint8_t Size, float sw, float Or
CSurveyStatus = Init;
- if (Size == 0)
- return TRUE;
-
if (Size == 0)
return TRUE;
diff --git a/sw/airborne/subsystems/navigation/poly_survey_adv.c b/sw/airborne/subsystems/navigation/poly_survey_adv.c
new file mode 100644
index 0000000000..b56ff6f579
--- /dev/null
+++ b/sw/airborne/subsystems/navigation/poly_survey_adv.c
@@ -0,0 +1,332 @@
+#include "poly_survey_adv.h"
+
+#include "subsystems/nav.h"
+#include "estimator.h"
+#include "autopilot.h"
+#include "generated/flight_plan.h"
+//#include "modules/digital_cam/dc.h"
+
+
+/**
+The following variables are set by poly_survey_init and not changed later on
+**/
+
+// precomputed vectors to ease calculations
+point2d dir_vec;
+point2d sweep_vec;
+point2d rad_vec;
+
+//the polygon from the flightplan
+uint8_t poly_first;
+uint8_t poly_count;
+
+//desired properties of the flyover
+float psa_min_rad;
+float psa_sweep_width;
+float psa_shot_dist;
+float psa_altitude;
+
+//direction for the flyover (0° == N)
+int segment_angle;
+int return_angle;
+
+/**
+The Following variables are dynamic, changed while navigating.
+**/
+
+/*
+psa_stage starts at ENTRY and than circles trought the other
+states until to polygon is completely covered
+ENTRY : getting in the right position and height for the first flyover
+SEG : fly from seg_start to seg_end and take pictures,
+ then calculate navigation points of next flyover
+TURN1 : do a 180° turn around seg_center1
+RET : fly from ret_start to ret_end
+TURN2 : do a 180° turn around seg_center2
+*/
+survey_stage psa_stage;
+
+// points for navigation
+point2d seg_start;
+point2d seg_end;
+point2d seg_center1;
+point2d seg_center2;
+point2d entry_center;
+point2d ret_start;
+point2d ret_end;
+
+
+//helper functions and macro
+#define VEC_CALC(A, B, C, OP) A.x = B.x OP C.x; A.y = B.y OP C.y;
+
+static point2d vec_add(point2d a, point2d b)
+{
+ point2d tmp;
+ VEC_CALC(tmp, a, b, +);
+
+ return tmp;
+}
+
+static void nav_points(point2d start, point2d end)
+{
+ nav_route_xy(start.x, start.y, end.x, end.y);
+}
+
+/**
+ intercept two lines and give back the point of intersection
+ returns : FALSE if no intersection can be found or intersection does not lie between points a and b
+ else TRUE
+ p : returns intersection
+ x, y : first line is defined by point x and y (goes through this points)
+ a1, a2, b1, b2 : second line by coordinates a1/a2, b1/b2
+**/
+static bool_t intercept_two_lines(point2d *p, point2d x, point2d y, float a1, float a2, float b1, float b2)
+{
+ float div, fac;
+
+ div = (((b2 - a2)*(y.x - x.x)) + ((x.y - y.y)*(b1 - a1)));
+ if (div == 0) return FALSE;
+ fac = ((y.x*(x.y - a2)) + (x.x*(a2 - y.y)) + (a1*(y.y - x.y))) / div;
+ if (fac > 1.0) return FALSE;
+ if (fac < 0.0) return FALSE;
+
+ p->x = a1 + fac*(b1 - a1);
+ p->y = a2 + fac*(b2 - a2);
+
+ return TRUE;
+}
+
+/**
+ intersects a line with the polygon and gives back the two intersection points
+ returns : TRUE if two intersection can be found, else FALSE
+ x, y : intersection points
+ a, b : define the line to intersection
+**/
+static bool_t get_two_intersects(point2d *x, point2d *y, point2d a, point2d b)
+{
+ int i, count = 0;
+ point2d tmp;
+
+ for (i=0;i fabs(dir_vec.y)) {
+ if ((y->x - x->x) / dir_vec.x < 0.0){
+ tmp = *x;
+ *x = *y;
+ *y = tmp;
+ }
+ }
+ else
+ if ((y->y - x->y) / dir_vec.y < 0.0) {
+ tmp = *x;
+ *x = *y;
+ *y = tmp;
+ }
+
+ return TRUE;
+}
+
+/**
+ initializes the variables needed for the survey to start
+ first_wp : the first Waypoint of the polygon
+ size : the number of points that make up the polygon
+ angle : angle in which to do the flyovers
+ sweep_width : distance between the sweeps
+ shot_dist : distance between the shots
+ min_rad : minimal radius when navigating
+ altitude : the altitude that must be reached before the flyover starts
+**/
+bool_t init_poly_survey_adv(uint8_t first_wp, uint8_t size, float angle, float sweep_width, float shot_dist, float min_rad, float altitude)
+{
+ int i;
+ point2d small, sweep;
+ float div, len, angle_rad = angle/180.0*M_PI;
+
+ if (angle < 0.0) angle += 360.0;
+ if (angle >= 360.0) angle -= 360.0;
+
+ poly_first = first_wp;
+ poly_count = size;
+
+ psa_sweep_width = sweep_width;
+ psa_min_rad = min_rad;
+ psa_shot_dist = shot_dist;
+ psa_altitude = altitude;
+
+ segment_angle = angle;
+ return_angle = angle+180;
+ if (return_angle > 359) return_angle -= 360;
+
+ if (angle <= 45.0 || angle >= 315.0) {
+ //north
+ dir_vec.y = 1.0;
+ dir_vec.x = 1.0*tanf(angle_rad);
+ sweep.x = 1.0;
+ sweep.y = - dir_vec.x / dir_vec.y;
+ }
+ else if (angle <= 135.0) {
+ //east
+ dir_vec.x = 1.0;
+ dir_vec.y = 1.0/tanf(angle_rad);
+ sweep.y = - 1.0;
+ sweep.x = dir_vec.y / dir_vec.x;
+ }
+ else if (angle <= 225.0) {
+ //south
+ dir_vec.y = -1.0;
+ dir_vec.x = -1.0*tanf(angle_rad);
+ sweep.x = -1.0;
+ sweep.y = dir_vec.x / dir_vec.y;
+ }
+ else {
+ //west
+ dir_vec.x = -1.0;
+ dir_vec.y = -1.0/tanf(angle_rad);
+ sweep.y = 1.0;
+ sweep.x = - dir_vec.y / dir_vec.x;
+ }
+
+ //normalize
+ len = sqrt(sweep.x*sweep.x+sweep.y*sweep.y);
+ sweep.x = sweep.x / len;
+ sweep.y = sweep.y / len;
+
+ rad_vec.x = sweep.x * psa_min_rad;
+ rad_vec.y = sweep.y * psa_min_rad;
+ sweep_vec.x = sweep.x * psa_sweep_width;
+ sweep_vec.y = sweep.y * psa_sweep_width;
+
+ //begin at leftmost position (relative to dir_vec)
+ small.x = waypoints[poly_first].x;
+ small.y = waypoints[poly_first].y;
+
+ div = (sweep_vec.y*dir_vec.x) - (sweep_vec.x*dir_vec.y);
+
+ //cacluate the leftmost point if one sees the dir vec as going "up" and the sweep vec as going right
+ if (div < 0.0) {
+ for(i=1;i 0.0) {
+ small.x = waypoints[poly_first+i].x;
+ small.y = waypoints[poly_first+i].y;
+ }
+ }
+ else
+ for(i=1;i 0.0) {
+ small.x = waypoints[poly_first+i].x;
+ small.y = waypoints[poly_first+i].y;
+ }
+
+ //calculate the line the defines the first flyover
+ seg_start.x = small.x + 0.5*sweep_vec.x;
+ seg_start.y = small.y + 0.5*sweep_vec.y;
+ VEC_CALC(seg_end, seg_start, dir_vec, +);
+
+ if (!get_two_intersects(&seg_start, &seg_end, seg_start, seg_end)) {
+ psa_stage = ERR;
+ return FALSE;
+ }
+
+ //center of the entry circle
+ entry_center.x = seg_start.x - rad_vec.x;
+ entry_center.y = seg_start.y - rad_vec.y;
+
+ //fast climbing to desired altitude
+ NavVerticalAutoThrottleMode(100.0);
+ NavVerticalAltitudeMode(psa_altitude, 0.0);
+
+ psa_stage = ENTRY;
+
+ return FALSE;
+}
+
+/**
+ main navigation routine. This is called periodically evaluates the current
+ Position and stage and navigates accordingly.
+ Returns True until the survey is finished
+**/
+bool_t poly_survey_adv(void)
+{
+ //entry circle around entry-center until the desired altitude is reached
+ if (psa_stage == ENTRY) {
+ nav_circle_XY(entry_center.x, entry_center.y, -psa_min_rad);
+ if (NavCourseCloseTo(segment_angle)
+ && nav_approaching_xy(seg_start.x, seg_start.y, last_x, last_y, CARROT)
+ && fabs(estimator_z - psa_altitude) <= 20) {
+ psa_stage = SEG;
+ NavVerticalAutoThrottleMode(0.0);
+ nav_init_stage();
+ //dc_distance(psa_shot_dist, seg_start.x - dir_vec.x*psa_shot_dist*0.5, seg_start.y - dir_vec.y*psa_shot_dist*0.5);
+ }
+ }
+ //fly the segment until seg_end is reached
+ if (psa_stage == SEG) {
+ nav_points(seg_start, seg_end);
+ //calculate all needed points for the next flyover
+ if (nav_approaching_xy(seg_end.x, seg_end.y, seg_start.x, seg_start.y, 0)) {
+ //dc_stop();
+ VEC_CALC(seg_center1, seg_end, rad_vec, -);
+ ret_start.x = seg_end.x - 2*rad_vec.x;
+ ret_start.y = seg_end.y - 2*rad_vec.y;
+
+ //if we get no intersection the survey is finished
+ if (!get_two_intersects(&seg_start, &seg_end, vec_add(seg_start, sweep_vec), vec_add(seg_end, sweep_vec)))
+ return FALSE;
+
+ ret_end.x = seg_start.x - sweep_vec.x - 2*rad_vec.x;
+ ret_end.y = seg_start.y - sweep_vec.y - 2*rad_vec.y;
+
+ seg_center2.x = seg_start.x - 0.5*(2.0*rad_vec.x+sweep_vec.x);
+ seg_center2.y = seg_start.y - 0.5*(2.0*rad_vec.y+sweep_vec.y);
+
+ psa_stage = TURN1;
+ nav_init_stage();
+ }
+ }
+ //turn from stage to return
+ else if (psa_stage == TURN1) {
+ nav_circle_XY(seg_center1.x, seg_center1.y, -psa_min_rad);
+ if (NavCourseCloseTo(return_angle)) {
+ psa_stage = RET;
+ nav_init_stage();
+ }
+ //return
+ } else if (psa_stage == RET) {
+ nav_points(ret_start, ret_end);
+ if (nav_approaching_xy(ret_end.x, ret_end.y, ret_start.x, ret_start.y, 0)) {
+ psa_stage = TURN2;
+ nav_init_stage();
+ }
+ //turn from return to stage
+ } else if (psa_stage == TURN2) {
+ nav_circle_XY(seg_center2.x, seg_center2.y, -(2*psa_min_rad+psa_sweep_width)*0.5);
+ if (NavCourseCloseTo(segment_angle)) {
+ psa_stage = SEG;
+ nav_init_stage();
+ //dc_distance(psa_shot_dist, seg_start.x - dir_vec.x*psa_shot_dist*0.5, seg_start.y - dir_vec.y*psa_shot_dist*0.5);
+ }
+ }
+
+ return TRUE;
+}
diff --git a/sw/airborne/subsystems/navigation/poly_survey_adv.h b/sw/airborne/subsystems/navigation/poly_survey_adv.h
new file mode 100644
index 0000000000..90b0164565
--- /dev/null
+++ b/sw/airborne/subsystems/navigation/poly_survey_adv.h
@@ -0,0 +1,13 @@
+#ifndef POLY_ADV_H
+#define POLY_ADV_H
+
+#include "std.h"
+
+typedef struct {float x; float y;} point2d;
+
+typedef enum {ERR, ENTRY, SEG, TURN1, RET, TURN2} survey_stage;
+
+extern bool_t init_poly_survey_adv(uint8_t first_wp, uint8_t size, float angle, float sweep_width, float shot_dist, float min_rad, float altitude);
+extern bool_t poly_survey_adv(void);
+
+#endif
diff --git a/sw/airborne/subsystems/navigation/spiral.c b/sw/airborne/subsystems/navigation/spiral.c
new file mode 100644
index 0000000000..b25ef937e2
--- /dev/null
+++ b/sw/airborne/subsystems/navigation/spiral.c
@@ -0,0 +1,160 @@
+/************** Spiral Navigation **********************************************/
+
+/** creating a helix:
+ start radius to end radius, increasing after reaching alphamax
+ Alphamax is calculated from given segments
+ IMPORTANT: numer of segments has to be larger than 2!
+*/
+
+#include "spiral.h"
+
+#include "subsystems/nav.h"
+#include "estimator.h"
+#include "autopilot.h"
+#include "generated/flight_plan.h"
+//#include "modules/digital_cam/dc.h"
+
+enum SpiralStatus { Outside, StartCircle, Circle, IncSpiral };
+static enum SpiralStatus CSpiralStatus;
+// static float SpiralTheta;
+// static float Fly2X;
+// static float Fly2Y;
+
+static float FlyFromX;
+static float FlyFromY;
+static float TransCurrentX;
+static float TransCurrentY;
+static float TransCurrentZ;
+static float EdgeCurrentX;
+static float EdgeCurrentY;
+static float LastCircleX;
+static float LastCircleY;
+static float DistanceFromCenter;
+static float Spiralradius;
+static uint8_t Center;
+static uint8_t Edge;
+static float SRad;
+static float IRad;
+static float Alphalimit;
+static float Segmente;
+static float CamAngle;
+static float ZPoint;
+static float nav_radius_min;
+
+#ifndef MIN_CIRCLE_RADIUS
+#define MIN_CIRCLE_RADIUS 120
+#endif
+
+
+bool_t InitializeSpiral(uint8_t CenterWP, uint8_t EdgeWP, float StartRad, float IncRad, float Segments, float ZKoord)
+{
+ Center = CenterWP; // center of the helix
+ Edge = EdgeWP; // edge point on the maximaum radius
+ SRad = StartRad; // start radius of the helix
+ Segmente = Segments;
+ ZPoint = ZKoord;
+ nav_radius_min = MIN_CIRCLE_RADIUS;
+ if (SRad < nav_radius_min) SRad = nav_radius_min;
+ IRad = IncRad; // multiplier for increasing the spiral
+
+ EdgeCurrentX = waypoints[Edge].x - waypoints[Center].x;
+ EdgeCurrentY = waypoints[Edge].y - waypoints[Center].y;
+
+ Spiralradius = sqrt(EdgeCurrentX*EdgeCurrentX+EdgeCurrentY*EdgeCurrentY);
+
+ TransCurrentX = estimator_x - waypoints[Center].x;
+ TransCurrentY = estimator_y - waypoints[Center].y;
+ TransCurrentZ = estimator_z - ZPoint;
+ DistanceFromCenter = sqrt(TransCurrentX*TransCurrentX+TransCurrentY*TransCurrentY);
+
+ // SpiralTheta = atan2(TransCurrentY,TransCurrentX);
+ // Fly2X = Spiralradius*cos(SpiralTheta+3.14)+waypoints[Center].x;
+ // Fly2Y = Spiralradius*sin(SpiralTheta+3.14)+waypoints[Center].y;
+
+ // Alphalimit denotes angle, where the radius will be increased
+ Alphalimit = 2*3.14 / Segments;
+ //current position
+ FlyFromX = estimator_x;
+ FlyFromY = estimator_y;
+
+ if(DistanceFromCenter > Spiralradius)
+ CSpiralStatus = Outside;
+ return FALSE;
+}
+
+bool_t SpiralNav(void)
+{
+ TransCurrentX = estimator_x - waypoints[Center].x;
+ TransCurrentY = estimator_y - waypoints[Center].y;
+ DistanceFromCenter = sqrt(TransCurrentX*TransCurrentX+TransCurrentY*TransCurrentY);
+
+ bool_t InCircle = TRUE;
+
+ if(DistanceFromCenter > Spiralradius)
+ InCircle = FALSE;
+
+ switch(CSpiralStatus)
+ {
+ case Outside:
+ //flys until center of the helix is reached an start helix
+ nav_route_xy(FlyFromX,FlyFromY,waypoints[Center].x, waypoints[Center].y);
+ // center reached?
+ if (nav_approaching_xy(waypoints[Center].x, waypoints[Center].y, FlyFromX, FlyFromY, 0)) {
+ // nadir image
+ //dc_shutter();
+ CSpiralStatus = StartCircle;
+ }
+ break;
+ case StartCircle:
+ // Starts helix
+ // storage of current coordinates
+ // calculation needed, State switch to Circle
+ nav_circle_XY(waypoints[Center].x, waypoints[Center].y, SRad);
+ if(DistanceFromCenter >= SRad){
+ LastCircleX = estimator_x;
+ LastCircleY = estimator_y;
+ CSpiralStatus = Circle;
+ // Start helix
+ //dc_Circle(360/Segmente);
+ }
+ break;
+ case Circle:
+ nav_circle_XY(waypoints[Center].x, waypoints[Center].y, SRad);
+ // Trigonometrische Berechnung des bereits geflogenen Winkels alpha
+ // equation:
+ // alpha = 2 * asin ( |Starting position angular - current positon| / (2* SRad)
+ // if alphamax already reached, increase radius.
+
+ //DistanceStartEstim = |Starting position angular - current positon|
+ float DistanceStartEstim = sqrt (((LastCircleX-estimator_x)*(LastCircleX-estimator_x))
+ + ((LastCircleY-estimator_y)*(LastCircleY-estimator_y)));
+ float CircleAlpha = (2.0 * asin (DistanceStartEstim / (2 * SRad)));
+ if (CircleAlpha >= Alphalimit) {
+ LastCircleX = estimator_x;
+ LastCircleY = estimator_y;
+ CSpiralStatus = IncSpiral;
+ }
+ break;
+ case IncSpiral:
+ // increasing circle radius as long as it is smaller than max helix radius
+ if(SRad + IRad < Spiralradius)
+ {
+ SRad = SRad + IRad;
+ /*if (dc_cam_tracing) {
+ // calculating Camwinkel for camera alignment
+ TransCurrentZ = estimator_z - ZPoint;
+ CamAngle = atan(SRad/TransCurrentZ) * 180 / 3.14;
+ //dc_cam_angle = CamAngle;
+ }*/
+ }
+ else {
+ SRad = Spiralradius;
+ // Stopps DC
+ //dc_stop();
+ }
+ CSpiralStatus = Circle;
+ break;
+
+ }
+ return TRUE;
+}
diff --git a/sw/airborne/subsystems/navigation/spiral.h b/sw/airborne/subsystems/navigation/spiral.h
new file mode 100644
index 0000000000..7eea57cd54
--- /dev/null
+++ b/sw/airborne/subsystems/navigation/spiral.h
@@ -0,0 +1,11 @@
+#ifndef SPIRAL_H
+#define SPIRAL_H
+
+#include "std.h"
+
+extern bool_t SpiralNav(void);
+extern bool_t InitializeSpiral(uint8_t CenterWP, uint8_t EdgeWP, float StartRad, float IncRad,
+ float Segments, float ZKoord );
+
+#endif
+
diff --git a/sw/airborne/subsystems/sensors/infrared.c b/sw/airborne/subsystems/sensors/infrared.c
index c90784dd89..caa00a1b5d 100644
--- a/sw/airborne/subsystems/sensors/infrared.c
+++ b/sw/airborne/subsystems/sensors/infrared.c
@@ -23,105 +23,22 @@
*/
/** \file subsystems/sensors/infrared.c
- * \brief Regroup all functions link to \a ir
+ * \brief common infrared
*/
-
-
-
-#include
-
#include "subsystems/sensors/infrared.h"
-#include "mcu_periph/adc.h"
-
-#include BOARD_CONFIG
#include "generated/airframe.h"
-
-#if defined IR_ESTIMATED_PHI_PI_4 || defined IR_ESTIMATED_PHI_MINUS_PI_4 || defined IR_ESTIMATED_THETA_PI_4
-#error "IR_ESTIMATED_PHI_PI_4 correction has been deprecated. Please remove the definition from your airframe config file"
-#endif
#ifdef INFRARED
#error "The flag INFRARED has been deprecated. Please replace it with USE_INFRARED."
#endif
-#if defined IR_ADC_ROLL_NEUTRAL || defined IR_ADC_PITCH_NEUTRAL
-#error "Neutrals on ROLL and PITCH deprecated. Please define IR_ADC_IR1_NEUTRAL and IR_ADC_IR2_NEUTRAL"
-#endif
-#ifdef IR_360
-#warning "IR_360 flag deprecated. Now default"
-#endif
-#ifdef IR_360_LATERAL_CORRECTION
-#error "IR_360_LATERAL_CORRECTION now IR_LATERAL_CORRECTION"
-#endif
-
-#ifdef IR_360_LONGITUDINAL_CORRECTION
-#error "IR_360_LONGITUDINAL_CORRECTION now IR_LONGITUDINAL_CORRECTION"
-#endif
-
-#ifdef IR_360_VERTICAL_CORRECTION
-#error "IR_360_VERTICAL_CORRECTION now IR_VERTICAL_CORRECTION"
-#endif
-
struct Infrared infrared;
-#if !defined IR_CORRECTION_LEFT
-#define IR_CORRECTION_LEFT 1.
-#endif
-
-#if !defined IR_CORRECTION_RIGHT
-#define IR_CORRECTION_RIGHT 1.
-#endif
-
-#if !defined IR_CORRECTION_UP
-#define IR_CORRECTION_UP 1.
-#endif
-
-#if !defined IR_CORRECTION_DOWN
-#define IR_CORRECTION_DOWN 1.
-#endif
-
-#if ! (defined SITL || defined HITL)
-static struct adc_buf buf_ir1;
-static struct adc_buf buf_ir2;
-
-#ifdef ADC_CHANNEL_IR_TOP
-static struct adc_buf buf_ir_top;
-#endif
-#endif
-
-
-#ifndef ADC_CHANNEL_IR_NB_SAMPLES
-#define ADC_CHANNEL_IR_NB_SAMPLES DEFAULT_AV_NB_SAMPLE
-#endif
-
-#ifndef IR_LATERAL_CORRECTION
-#define IR_LATERAL_CORRECTION 1.
-#endif
-
-#ifndef IR_LONGITUDINAL_CORRECTION
-#define IR_LONGITUDINAL_CORRECTION 1.
-#endif
-
-#ifndef IR_VERTICAL_CORRECTION
-#define IR_VERTICAL_CORRECTION 1.
-#endif
-
-
-/** \brief Initialisation of \a ir */
-/** Initialize \a adc_buf_channel
+/** \brief Initialisation of \a ir structure
*/
-void infrared_init(void) {
-#if ! (defined SITL || defined HITL)
- adc_buf_channel(ADC_CHANNEL_IR1, &buf_ir1, ADC_CHANNEL_IR_NB_SAMPLES);
- adc_buf_channel(ADC_CHANNEL_IR2, &buf_ir2, ADC_CHANNEL_IR_NB_SAMPLES);
-#ifdef ADC_CHANNEL_IR_TOP
- adc_buf_channel(ADC_CHANNEL_IR_TOP, &buf_ir_top, ADC_CHANNEL_IR_NB_SAMPLES);
-#endif
-#endif
-
-
- infrared.roll_neutral = RadOfDeg(IR_ROLL_NEUTRAL_DEFAULT);
+void infrared_struct_init(void) {
+ infrared.roll_neutral = RadOfDeg(IR_ROLL_NEUTRAL_DEFAULT);
infrared.pitch_neutral = RadOfDeg(IR_PITCH_NEUTRAL_DEFAULT);
infrared.correction_left = IR_CORRECTION_LEFT;
@@ -133,57 +50,6 @@ void infrared_init(void) {
infrared.longitudinal_correction = IR_LONGITUDINAL_CORRECTION;
infrared.vertical_correction = IR_VERTICAL_CORRECTION;
-#if ! (defined ADC_CHANNEL_IR_TOP || defined HITL || defined SITL)
- infrared.top = IR_DEFAULT_CONTRAST;
-#endif
}
-#ifndef IR_IR1_SIGN
-#define IR_IR1_SIGN 1
-#endif /* IR_IR1_SIGN */
-
-#ifndef IR_IR2_SIGN
-#define IR_IR2_SIGN 1
-#endif /* IR_IR2_SIGN */
-
-#ifndef IR_TOP_SIGN
-#define IR_TOP_SIGN 1
-#endif /* IR_TOP_SIGN */
-
-/* Sensor installation */
-#if defined IR_HORIZ_SENSOR_ALIGNED
-/* IR1 on the lateral axis, IR2 on the longitudal axis */
-#define IR_RollOfIrs(_ir1, _ir2) (_ir1)
-#define IR_PitchOfIrs(_ir1, _ir2) (_ir2)
-#elif IR_HORIZ_SENSOR_TILTED
-/* IR1 rear-left -- front-right, IR2 rear-right -- front-left
- IR1_SIGN and IR2_SIGN give positive values when it's warm on the right side
-*/
-#define IR_RollOfIrs(_ir1, _ir2) (_ir1 + _ir2)
-#define IR_PitchOfIrs(_ir1, _ir2) (-(_ir1) + _ir2)
-#endif
-
-#ifdef ADC_CHANNEL_IR_TOP
-#ifndef IR_TopOfIr
-#define IR_TopOfIr(_ir) ((IR_TOP_SIGN)*(_ir))
-#endif
-#endif
-
-
-/** \brief Update \a ir_roll and ir_pitch from ADCs or from simulator
- * message in HITL and SITL modes
- */
-void infrared_update(void) {
-#if ! (defined SITL || defined HITL)
- infrared.ir1 = (IR_IR1_SIGN)*((int32_t)(buf_ir1.sum/buf_ir1.av_nb_sample) - IR_ADC_IR1_NEUTRAL);
- infrared.ir2 = (IR_IR2_SIGN)*((int32_t)(buf_ir2.sum/buf_ir2.av_nb_sample) - IR_ADC_IR2_NEUTRAL);
- infrared.roll = infrared.lateral_correction * IR_RollOfIrs(infrared.ir1, infrared.ir2);
- infrared.pitch = infrared.longitudinal_correction * IR_PitchOfIrs(infrared.ir1, infrared.ir2);
-#ifdef ADC_CHANNEL_IR_TOP
- infrared.ir3 = (int32_t)(buf_ir_top.sum/buf_ir_top.av_nb_sample) - IR_ADC_TOP_NEUTRAL;
- infrared.top = infrared.vertical_correction * IR_TopOfIr(infrared.ir3);
-#endif // IR_TOP
-#endif /* !SITL && !HITL */
-/** #else ir_roll set by simulator in sim_ir.c */
-}
diff --git a/sw/airborne/subsystems/sensors/infrared.h b/sw/airborne/subsystems/sensors/infrared.h
index 60a1baf3c8..f49a9b0187 100644
--- a/sw/airborne/subsystems/sensors/infrared.h
+++ b/sw/airborne/subsystems/sensors/infrared.h
@@ -27,19 +27,91 @@
#include "std.h"
#include "generated/airframe.h"
+#include "estimator.h"
-struct Infrared {
+/*
+ * Sensor installation
+ */
+
+#ifndef IR_IR1_SIGN
+#define IR_IR1_SIGN 1
+#endif /* IR_IR1_SIGN */
+
+#ifndef IR_IR2_SIGN
+#define IR_IR2_SIGN 1
+#endif /* IR_IR2_SIGN */
+
+#ifndef IR_TOP_SIGN
+#define IR_TOP_SIGN 1
+#endif /* IR_TOP_SIGN */
+
+#if defined IR_HORIZ_SENSOR_ALIGNED
+/* IR1 on the lateral axis, IR2 on the longitudal axis */
+#define IR_RollOfIrs(_ir1, _ir2) (_ir1)
+#define IR_PitchOfIrs(_ir1, _ir2) (_ir2)
+#elif IR_HORIZ_SENSOR_TILTED
+/* IR1 rear-left -- front-right, IR2 rear-right -- front-left
+ IR1_SIGN and IR2_SIGN give positive values when it's warm on the right side
+*/
+#define IR_RollOfIrs(_ir1, _ir2) (_ir1 + _ir2)
+#define IR_PitchOfIrs(_ir1, _ir2) (-(_ir1) + _ir2)
+#endif
+/* Vertical sensor, TOP_SIGN gives positice values when it's warm on the bottom */
+#ifndef IR_TopOfIr
+#define IR_TopOfIr(_ir) (_ir)
+#endif
+
+/*
+ * Default correction values
+ */
+
+#ifndef IR_LATERAL_CORRECTION
+#define IR_LATERAL_CORRECTION 1.
+#endif
+
+#ifndef IR_LONGITUDINAL_CORRECTION
+#define IR_LONGITUDINAL_CORRECTION 1.
+#endif
+
+#ifndef IR_VERTICAL_CORRECTION
+#define IR_VERTICAL_CORRECTION 1.
+#endif
+
+#ifndef IR_CORRECTION_LEFT
+#define IR_CORRECTION_LEFT 1.
+#endif
+
+#ifndef IR_CORRECTION_RIGHT
+#define IR_CORRECTION_RIGHT 1.
+#endif
+
+#ifndef IR_CORRECTION_UP
+#define IR_CORRECTION_UP 1.
+#endif
+
+#ifndef IR_CORRECTION_DOWN
+#define IR_CORRECTION_DOWN 1.
+#endif
+
+struct Infrared_raw {
/* the 3 channels of the sensor
*/
int16_t ir1;
int16_t ir2;
int16_t ir3;
+};
+
+/** Infrared structure */
+struct Infrared {
+ /* raw infrared values
+ */
+ struct Infrared_raw value;
/* neutrals in radians
*/
float roll_neutral;
float pitch_neutral;
float pitch_vneutral;
- /* roll, pitch, yaw unscaled reading
+ /* roll, pitch, top unscaled reading
*/
int16_t roll;
int16_t pitch;
@@ -61,7 +133,22 @@ struct Infrared {
extern struct Infrared infrared;
+#define UpdateIRValue(_v) { \
+ infrared.value.ir1 = (IR_IR1_SIGN)*_v.ir1; \
+ infrared.value.ir2 = (IR_IR2_SIGN)*_v.ir2; \
+ infrared.value.ir3 = (IR_TOP_SIGN)*_v.ir3; \
+ infrared.roll = infrared.lateral_correction * IR_RollOfIrs(infrared.value.ir1, infrared.value.ir2); \
+ infrared.pitch = infrared.longitudinal_correction * IR_PitchOfIrs(infrared.value.ir1, infrared.value.ir2); \
+ infrared.top = infrared.vertical_correction * IR_TopOfIr(infrared.value.ir3); \
+ estimator_update_state_infrared(); \
+}
+
+// initialization of the infrared structure
+void infrared_struct_init(void);
+
+// implementation dependent functions
void infrared_init(void);
void infrared_update(void);
+void infrared_event(void);
#endif /* SUBSYSTEMS_SENSORS_INFRARED_H */
diff --git a/sw/airborne/subsystems/sensors/infrared_adc.c b/sw/airborne/subsystems/sensors/infrared_adc.c
new file mode 100644
index 0000000000..86533aeb67
--- /dev/null
+++ b/sw/airborne/subsystems/sensors/infrared_adc.c
@@ -0,0 +1,104 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2003-2010 The Paparazzi Team
+ *
+ * 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, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+/** \file subsystems/sensors/infrared_adc.c
+ * \brief Regroup all functions link to ADC \a ir
+ */
+
+
+
+
+#include
+
+#include "subsystems/sensors/infrared_adc.h"
+#include "mcu_periph/adc.h"
+
+#include BOARD_CONFIG
+#include "generated/airframe.h"
+
+// TODO Specific sim implementation
+#if ! (defined SITL || defined HITL)
+static struct adc_buf buf_ir1;
+static struct adc_buf buf_ir2;
+
+#ifdef ADC_CHANNEL_IR_TOP
+static struct adc_buf buf_ir3;
+#endif
+#endif
+
+#ifndef ADC_CHANNEL_IR_NB_SAMPLES
+#define ADC_CHANNEL_IR_NB_SAMPLES DEFAULT_AV_NB_SAMPLE
+#endif
+
+struct Infrared_raw ir_adc;
+
+// Standard infrared implementation
+void infrared_init(void) {
+ infrared_adc_init();
+}
+
+void infrared_update(void) {
+ infrared_adc_update();
+}
+
+/* No event with adc ir */
+void infrared_event(void) {}
+
+/** \brief Initialisation of \a ir */
+/** Initialize \a adc_buf_channel
+ */
+void infrared_adc_init(void) {
+#if ! (defined SITL || defined HITL)
+ adc_buf_channel(ADC_CHANNEL_IR1, &buf_ir1, ADC_CHANNEL_IR_NB_SAMPLES);
+ adc_buf_channel(ADC_CHANNEL_IR2, &buf_ir2, ADC_CHANNEL_IR_NB_SAMPLES);
+#ifdef ADC_CHANNEL_IR_TOP
+ adc_buf_channel(ADC_CHANNEL_IR_TOP, &buf_ir3, ADC_CHANNEL_IR_NB_SAMPLES);
+#endif
+#endif
+
+ infrared_struct_init();
+
+#if ! (defined ADC_CHANNEL_IR_TOP || defined HITL || defined SITL)
+ ir_adc.ir3 = IR_DEFAULT_CONTRAST;
+#endif
+}
+
+
+/** \brief Update \a ir_roll and ir_pitch from ADCs or from simulator
+ * message in HITL and SITL modes
+ */
+void infrared_adc_update(void) {
+#if ! (defined SITL || defined HITL)
+ ir_adc.ir1 = (int32_t)(buf_ir1.sum/buf_ir1.av_nb_sample) - IR_ADC_IR1_NEUTRAL;
+ ir_adc.ir2 = (int32_t)(buf_ir2.sum/buf_ir2.av_nb_sample) - IR_ADC_IR2_NEUTRAL;
+#ifdef ADC_CHANNEL_IR_TOP
+ ir_adc.ir3 = (int32_t)(buf_ir3.sum/buf_ir3.av_nb_sample) - IR_ADC_TOP_NEUTRAL;
+#endif // IR_TOP
+#ifndef IR_ADC_READ_ONLY
+ UpdateIRValue(ir_adc);
+#endif
+#endif /* !SITL && !HITL */
+/** #else ir_roll set by simulator in sim_ir.c */
+}
+
diff --git a/sw/airborne/subsystems/sensors/infrared_adc.h b/sw/airborne/subsystems/sensors/infrared_adc.h
new file mode 100644
index 0000000000..74dd729daa
--- /dev/null
+++ b/sw/airborne/subsystems/sensors/infrared_adc.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 ENAC
+ *
+ * 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, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+/*
+ * Driver for adc infrared sensor
+ */
+
+#ifndef SUBSYSTEMS_SENSORS_INFRARED_ADC_H
+#define SUBSYSTEMS_SENSORS_INFRARED_ADC_H
+
+#include "std.h"
+#include "subsystems/sensors/infrared.h"
+
+extern struct Infrared_raw ir_adc;
+
+extern void infrared_adc_init(void);
+extern void infrared_adc_update(void);
+
+#endif // SUBSYSTEMS_SENSORS_INFRARED_ADC_H
+
diff --git a/sw/airborne/modules/sensors/infrared_i2c.c b/sw/airborne/subsystems/sensors/infrared_i2c.c
similarity index 55%
rename from sw/airborne/modules/sensors/infrared_i2c.c
rename to sw/airborne/subsystems/sensors/infrared_i2c.c
index a6c4520766..40df90406d 100644
--- a/sw/airborne/modules/sensors/infrared_i2c.c
+++ b/sw/airborne/subsystems/sensors/infrared_i2c.c
@@ -34,102 +34,20 @@
#define IR_START_CONV (1 << 7)
-#ifndef IR_IR1_NEUTRAL
-#define IR_IR1_NEUTRAL 0
+#ifndef IR_I2C_IR1_NEUTRAL
+#define IR_I2C_IR1_NEUTRAL 0
#endif
-#ifndef IR_IR2_NEUTRAL
-#define IR_IR2_NEUTRAL 0
+#ifndef IR_I2C_IR2_NEUTRAL
+#define IR_I2C_IR2_NEUTRAL 0
#endif
-#ifndef IR_TOP_NEUTRAL
-#define IR_TOP_NEUTRAL 0
+#ifndef IR_I2C_TOP_NEUTRAL
+#define IR_I2C_TOP_NEUTRAL 0
#endif
-// Standard infrared interface
-int16_t ir_ir1;
-int16_t ir_ir2;
-int16_t ir_roll;
-int16_t ir_pitch;
-int16_t ir_top;
-
-#ifndef IR_IR1_SIGN
-#define IR_IR1_SIGN 1
-#endif // IR_IR1_SIGN
-
-#ifndef IR_IR2_SIGN
-#define IR_IR2_SIGN 1
-#endif // IR_IR2_SIGN
-
-#ifndef IR_TOP_SIGN
-#define IR_TOP_SIGN 1
-#endif // IR_TOP_SIGN
-
-float ir_roll_neutral;
-float ir_pitch_neutral;
-
-float ir_correction_left;
-float ir_correction_right;
-float ir_correction_down;
-float ir_correction_up;
-
-#ifndef IR_CORRECTION_LEFT
-#define IR_CORRECTION_LEFT 1.
-#endif
-
-#ifndef IR_CORRECTION_RIGHT
-#define IR_CORRECTION_RIGHT 1.
-#endif
-
-#ifndef IR_CORRECTION_UP
-#define IR_CORRECTION_UP 1.
-#endif
-
-#ifndef IR_CORRECTION_DOWN
-#define IR_CORRECTION_DOWN 1.
-#endif
-
-float ir_lateral_correction;
-float ir_longitudinal_correction;
-float ir_vertical_correction;
-
-#ifndef IR_LATERAL_CORRECTION
-#define IR_LATERAL_CORRECTION 1.
-#endif
-
-#ifndef IR_LONGITUDINAL_CORRECTION
-#define IR_LONGITUDINAL_CORRECTION 1.
-#endif
-
-#ifndef IR_VERTICAL_CORRECTION
-#define IR_VERTICAL_CORRECTION 1.
-#endif
-
-/* Sensor installation */
-#if defined IR_HORIZ_SENSOR_ALIGNED
-/* IR1 on the lateral axis, IR2 on the longitudal axis */
-#define IR_RollOfIrs(_ir1, _ir2) (_ir1)
-#define IR_PitchOfIrs(_ir1, _ir2) (_ir2)
-#elif IR_HORIZ_SENSOR_TILTED
-/* IR1 rear-left -- front-right, IR2 rear-right -- front-left
- IR1_SIGN and IR2_SIGN give positive values when it's warm on the right side
-*/
-#define IR_RollOfIrs(_ir1, _ir2) (_ir1 + _ir2)
-#define IR_PitchOfIrs(_ir1, _ir2) (-(_ir1) + _ir2)
-#endif
-/* Vertical sensor, TOP_SIGN gives positice values when it's warm on the bottom */
-#define IR_TopOfIr(_ir) ((IR_TOP_SIGN)*(_ir))
-
-
-
-// Global variables
-int16_t ir_i2c_ir1;
-int16_t ir_i2c_ir2;
-int16_t ir_i2c_top;
-
-float ir_i2c_phi, ir_i2c_theta;
-
-bool_t ir_i2c_data_available;
+struct Infrared_raw ir_i2c;
+bool_t ir_i2c_data_hor_available, ir_i2c_data_ver_available;
uint8_t ir_i2c_conf_word;
bool_t ir_i2c_conf_hor_done, ir_i2c_conf_ver_done;
@@ -149,13 +67,24 @@ static uint8_t ir_i2c_hor_status;
// I2C structure
struct i2c_transaction irh_trans, irv_trans;
-//FIXME standard infrared should not ba ADC-dependent
-void ir_init(void) {}
+// Standard infrared implementation
+void infrared_init(void) {
+ infrared_i2c_init();
+}
+
+void infrared_update(void) {
+ infrared_i2c_update();
+}
+
+void infrared_event(void) {
+ infrared_i2cEvent();
+}
/** Initialisation
*/
void infrared_i2c_init( void ) {
- ir_i2c_data_available = FALSE;
+ ir_i2c_data_hor_available = FALSE;
+ ir_i2c_data_ver_available = FALSE;
ir_i2c_hor_status = IR_I2C_IDLE;
ir_i2c_conf_word = IR_I2C_DEFAULT_CONF;
ir_i2c_conf_hor_done = FALSE;
@@ -163,21 +92,9 @@ void infrared_i2c_init( void ) {
irh_trans.status = I2CTransDone;
irv_trans.status = I2CTransDone;
- // Initialisation of standard infrared interface
- ir_roll_neutral = RadOfDeg(IR_ROLL_NEUTRAL_DEFAULT);
- ir_pitch_neutral = RadOfDeg(IR_PITCH_NEUTRAL_DEFAULT);
-
- ir_correction_left = IR_CORRECTION_LEFT;
- ir_correction_right = IR_CORRECTION_RIGHT;
- ir_correction_up = IR_CORRECTION_UP;
- ir_correction_down = IR_CORRECTION_DOWN;
-
- ir_lateral_correction = IR_LATERAL_CORRECTION;
- ir_longitudinal_correction = IR_LONGITUDINAL_CORRECTION;
- ir_vertical_correction = IR_VERTICAL_CORRECTION;
+ infrared_struct_init();
}
-#include "led.h"
void infrared_i2c_update( void ) {
#if ! (defined SITL || defined HITL)
// IR horizontal
@@ -189,7 +106,7 @@ void infrared_i2c_update( void ) {
} else {
// Read next values
I2CReceive(i2c0, irh_trans, IR_HOR_I2C_ADDR, 3);
- ir_i2c_data_available = FALSE;
+ ir_i2c_data_hor_available = FALSE;
ir_i2c_hor_status = IR_I2C_READ_IR1;
}
}
@@ -201,7 +118,7 @@ void infrared_i2c_update( void ) {
} else {
// Read next values
I2CReceive(i2c0, irv_trans, IR_VER_I2C_ADDR, 2);
- ir_i2c_data_available = FALSE;
+ ir_i2c_data_ver_available = FALSE;
}
}
#else /* SITL || HITL */
@@ -225,7 +142,8 @@ void infrared_i2c_hor_event( void ) {
}
// Read IR1 value
int16_t ir1 = (irh_trans.buf[0]<<8) | irh_trans.buf[1];
- ir_i2c_ir1 = FilterIR(ir_i2c_ir1, ir1);
+ ir1 = ir1 - (IR_I2C_IR1_NEUTRAL << ir_i2c_conf_word);
+ ir_i2c.ir1 = FilterIR(ir_i2c.ir1, ir1);
// Select IR2 channel
irh_trans.buf[0] = IR_HOR_I2C_SELECT_IR2 | IR_HOR_OC_BIT | ir_i2c_conf_word | IR_START_CONV;
I2CTransmit(i2c0, irh_trans, IR_HOR_I2C_ADDR, 1);
@@ -243,11 +161,17 @@ void infrared_i2c_hor_event( void ) {
break;
}
int16_t ir2 = (irh_trans.buf[0]<<8) | irh_trans.buf[1];
- ir_i2c_ir2 = FilterIR(ir_i2c_ir2, ir2);
+ ir2 = ir2 - (IR_I2C_IR2_NEUTRAL << ir_i2c_conf_word);
+ ir_i2c.ir2 = FilterIR(ir_i2c.ir2, ir2);
// Update estimator
- ir_i2c_data_available = TRUE;
- ir_update();
- estimator_update_state_infrared();
+ ir_i2c_data_hor_available = TRUE;
+#ifndef IR_I2C_READ_ONLY
+ if (ir_i2c_data_ver_available) {
+ ir_i2c_data_hor_available = FALSE;
+ ir_i2c_data_ver_available = FALSE;
+ UpdateIRValue(ir_i2c);
+ }
+#endif
// Select IR1 channel
irh_trans.buf[0] = IR_HOR_I2C_SELECT_IR1 | IR_HOR_OC_BIT | ir_i2c_conf_word | IR_START_CONV;
I2CTransmit(i2c0, irh_trans, IR_HOR_I2C_ADDR, 1);
@@ -271,11 +195,17 @@ void infrared_i2c_ver_event( void ) {
irv_trans.status = I2CTransDone;
// Read TOP value
if (irv_trans.type == I2CTransRx) {
- int16_t top = (irv_trans.buf[0]<<8) | irv_trans.buf[1];
- ir_i2c_top = FilterIR(ir_i2c_top, top);
- ir_i2c_data_available = TRUE;
- ir_update();
- estimator_update_state_infrared();
+ int16_t ir3 = (irv_trans.buf[0]<<8) | irv_trans.buf[1];
+ ir3 = ir3 - (IR_I2C_TOP_NEUTRAL << ir_i2c_conf_word);
+ ir_i2c.ir3 = FilterIR(ir_i2c.ir3, ir3);
+ ir_i2c_data_ver_available = TRUE;
+#ifndef IR_I2C_READ_ONLY
+ if (ir_i2c_data_hor_available) {
+ ir_i2c_data_hor_available = FALSE;
+ ir_i2c_data_ver_available = FALSE;
+ UpdateIRValue(ir_i2c);
+ }
+#endif
}
if (irv_trans.type == I2CTransTx) {
ir_i2c_conf_ver_done = TRUE;
@@ -283,34 +213,3 @@ void infrared_i2c_ver_event( void ) {
#endif /* !SITL && !HITL */
}
-#include "stdio.h"
-
-void ir_update(void) {
- ir_ir1 = (IR_IR1_SIGN)*(ir_i2c_ir1 - (IR_IR1_NEUTRAL << ir_i2c_conf_word));
- ir_ir2 = (IR_IR2_SIGN)*(ir_i2c_ir2 - (IR_IR2_NEUTRAL << ir_i2c_conf_word));
- ir_roll = ir_lateral_correction * IR_RollOfIrs(ir_ir1, ir_ir2);
- ir_pitch = ir_longitudinal_correction * IR_PitchOfIrs(ir_ir1, ir_ir2);
- ir_top = ir_vertical_correction * IR_TopOfIr(ir_i2c_top - (IR_TOP_NEUTRAL << ir_i2c_conf_word));
-}
-
-void estimator_update_state_infrared(void) {
-
- estimator_phi = atan2(ir_roll, ir_top) - ir_roll_neutral;
- estimator_theta = atan2(ir_pitch, ir_top) - ir_pitch_neutral;
-
- if (estimator_theta < -M_PI_2)
- estimator_theta += M_PI;
- else if (estimator_theta > M_PI_2)
- estimator_theta -= M_PI;
-
- if (estimator_phi >= 0)
- estimator_phi *= ir_correction_right;
- else
- estimator_phi *= ir_correction_left;
-
- if (estimator_theta >= 0)
- estimator_theta *= ir_correction_up;
- else
- estimator_theta *= ir_correction_down;
-
-}
diff --git a/sw/airborne/subsystems/sensors/infrared_i2c.h b/sw/airborne/subsystems/sensors/infrared_i2c.h
new file mode 100644
index 0000000000..855e186424
--- /dev/null
+++ b/sw/airborne/subsystems/sensors/infrared_i2c.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 ENAC
+ *
+ * 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, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+/*
+ * Driver for i2c infrared sensor
+ */
+
+#ifndef SUBSYSTEMS_SENSORS_INFRARED_I2C_H
+#define SUBSYSTEMS_SENSORS_INFRARED_I2C_H
+
+#include "std.h"
+#include "generated/airframe.h"
+#include "subsystems/sensors/infrared.h"
+#include "mcu_periph/i2c.h"
+
+extern struct Infrared_raw ir_i2c;
+extern bool_t ir_i2c_data_hor_available, ir_i2c_data_ver_available;
+extern uint8_t ir_i2c_conf_word;
+extern bool_t ir_i2c_conf_hor_done, ir_i2c_conf_ver_done;
+
+extern struct i2c_transaction irh_trans, irv_trans;
+
+extern void infrared_i2c_init( void );
+extern void infrared_i2c_update( void );
+extern void infrared_i2c_hor_event( void );
+extern void infrared_i2c_ver_event( void );
+
+#define infrared_i2cEvent() { \
+ if (irh_trans.status == I2CTransSuccess) infrared_i2c_hor_event(); \
+ if (irv_trans.status == I2CTransSuccess) infrared_i2c_ver_event(); \
+}
+
+#define infrared_i2cDownlink() DOWNLINK_SEND_DEBUG_IR_I2C(DefaultChannel, &ir_i2c.ir1, &ir_i2c.ir2, &ir_i2c.ir3)
+
+#define infrared_i2c_SetConfWord(_v) { \
+ ir_i2c_conf_hor_done = FALSE; \
+ ir_i2c_conf_ver_done = FALSE; \
+ ir_i2c_conf_word = _v; \
+}
+
+#endif // SUBSYSTEMS_SENSORS_INFRARED_I2C_H
diff --git a/sw/airborne/test/nova_test_imu.c b/sw/airborne/test/nova_test_imu.c
index e3a764b1e2..35f6a89d5e 100644
--- a/sw/airborne/test/nova_test_imu.c
+++ b/sw/airborne/test/nova_test_imu.c
@@ -1,10 +1,10 @@
#include "std.h"
-#include "init_hw.h"
+#include "mcu.h"
#include "interrupt_hw.h"
#include "sys_time.h"
#include "led.h"
-#include "uart.h"
+#include "mcu_periph/uart.h"
#include "messages.h"
#include "downlink.h"
@@ -25,7 +25,7 @@ int main( void ) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
@@ -35,7 +35,7 @@ static inline void main_init( void ) {
ADS8344_init();
- int_enable();
+ mcu_int_enable();
ADS8344_start();
}
diff --git a/sw/airborne/test/test_esc_mkk_simple.c b/sw/airborne/test/test_esc_mkk_simple.c
index bc0f778bca..232890665a 100644
--- a/sw/airborne/test/test_esc_mkk_simple.c
+++ b/sw/airborne/test/test_esc_mkk_simple.c
@@ -22,7 +22,7 @@
*/
-#include "mcuw.h"
+#include "mcu.h"
#include "sys_time.h"
#include "led.h"
diff --git a/sw/airborne/test/test_geodetic.c b/sw/airborne/test/test_geodetic.c
index 4e017bdb30..9d04e24b60 100644
--- a/sw/airborne/test/test_geodetic.c
+++ b/sw/airborne/test/test_geodetic.c
@@ -28,7 +28,7 @@ static void test_ned_to_ecef_to_ned(void);
static void test_enu_to_ecef_to_enu( void );
/*
- * toulouse 43.6052765, 1.4427764, 180.123019274324 -> 4624497.0 116475.0 4376563.0
+ * toulouse lat 43.6052765, lon 1.4427764, alt 180.123019274324 -> x 4624497.0 y 116475.0 z 4376563.0
*/
int main(int argc, char** argv) {
@@ -152,11 +152,11 @@ static void test_enu_of_ecef_int(void) {
M_OF_CM((double)my_enu_point_i.z));
#endif
- FLOAT_T ex = my_enu_point_f.x - M_OF_CM((double)my_enu_point_i.x);
+ float ex = my_enu_point_f.x - M_OF_CM((double)my_enu_point_i.x);
if (fabs(ex) > max_err.x) max_err.x = fabs(ex);
- FLOAT_T ey = my_enu_point_f.y - M_OF_CM((double)my_enu_point_i.y);
+ float ey = my_enu_point_f.y - M_OF_CM((double)my_enu_point_i.y);
if (fabs(ey) > max_err.y) max_err.y = fabs(ey);
- FLOAT_T ez = my_enu_point_f.z - M_OF_CM((double)my_enu_point_i.z);
+ float ez = my_enu_point_f.z - M_OF_CM((double)my_enu_point_i.z);
if (fabs(ez) > max_err.z) max_err.z = fabs(ez);
sum_err += ex*ex + ey*ey + ez*ez;
}
diff --git a/sw/airborne/test/test_telemetry.c b/sw/airborne/test/test_telemetry.c
index 81c1c64e29..bd2760fc7f 100644
--- a/sw/airborne/test/test_telemetry.c
+++ b/sw/airborne/test/test_telemetry.c
@@ -22,7 +22,8 @@
*/
#include BOARD_CONFIG
-#include "init_hw.h"
+#include "mcu.h"
+#include "mcu_periph/uart.h"
#include "interrupt_hw.h"
#include "sys_time.h"
#include "downlink.h"
@@ -41,9 +42,9 @@ int main(void) {
}
static inline void main_init( void ) {
- hw_init();
+ mcu_init();
sys_time_init();
- int_enable();
+ mcu_int_enable();
}
static inline void main_periodic( void ) {
diff --git a/sw/airborne/xbee.h b/sw/airborne/xbee.h
index fa6f3e8870..28b8493047 100644
--- a/sw/airborne/xbee.h
+++ b/sw/airborne/xbee.h
@@ -57,20 +57,15 @@ extern uint8_t xbee_ovrn, xbee_error;
#define XBEE_MY_ADDR AC_ID
void xbee_init( void );
-#define __XBeeLink(dev, _x) dev##_x
-#define _XBeeLink(dev, _x) __XBeeLink(dev, _x)
-#define XBeeLink(_x) _XBeeLink(XBEE_UART, _x)
+#define __Link(dev, _x) dev##_x
+#define _Link(dev, _x) __Link(dev, _x)
+#define Link(_x) _Link(DOWNLINK_DEVICE, _x)
-#define XBeeBuffer() XBeeLink(ChAvailable())
-#define ReadXBeeBuffer() { while (XBeeLink(ChAvailable())&&!xbee_msg_received) parse_xbee(XBeeLink(Getch())); }
-
-#define XBeePrintString(s) XBeeLink(PrintString(s))
-#define XBeePrintHex16(x) XBeeLink(PrintHex16(x))
-#define XBeeTransportPut1Byte(x) XBeeLink(Transmit(x))
-#define XBeeTransportCheckFreeSpace(x) XBeeLink(CheckFreeSpace(x))
+#define XBeeTransportPut1Byte(x) Link(Transmit(x))
+#define XBeeTransportCheckFreeSpace(x) Link(CheckFreeSpace(x))
/* 5 = Start + len_msb + len_lsb + API_id + checksum */
#define XBeeAPISizeOf(_x) (_x+5)
-#define XBeeTransportSendMessage() XBeeLink(SendMessage())
+#define XBeeTransportSendMessage() Link(SendMessage())
#define XBeeTransportPutUint8(_x) { \
xbee_cs += _x; \
@@ -225,4 +220,14 @@ static inline void xbee_parse_payload(void) {
}
}
+#define __XBeeLink(dev, _x) dev##_x
+#define _XBeeLink(dev, _x) __XBeeLink(dev, _x)
+#define XBeeLink(_x) _XBeeLink(XBEE_UART, _x)
+
+#define XBeeBuffer() XBeeLink(ChAvailable())
+#define ReadXBeeBuffer() { while (XBeeLink(ChAvailable())&&!xbee_msg_received) parse_xbee(XBeeLink(Getch())); }
+
+#define XBeePrintString(s) XBeeLink(PrintString(s))
+#define XBeePrintHex16(x) XBeeLink(PrintHex16(x))
+
#endif /* XBEE_H */
diff --git a/sw/ground_segment/cockpit/compass.ml b/sw/ground_segment/cockpit/compass.ml
index 43aeac96bd..2a0b62f7c8 100644
--- a/sw/ground_segment/cockpit/compass.ml
+++ b/sw/ground_segment/cockpit/compass.ml
@@ -113,10 +113,9 @@ let draw = fun (da_object:Gtk_tools.pixmap_in_drawin_area) desired_course course
(*********************** Main ************************************************)
let _ =
- let ivy_bus = ref "127.255.255.255:2010" in
-
+ let ivy_bus = ref Defivybus.default_ivy_bus in
Arg.parse
- [ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.255:2010"]
+ [ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf " Default is %s" !ivy_bus)]
(fun x -> prerr_endline ("WARNING: don't do anything with "^x))
"Usage: ";
diff --git a/sw/ground_segment/cockpit/gcs.ml b/sw/ground_segment/cockpit/gcs.ml
index c2d765dd60..22a147a0f4 100644
--- a/sw/ground_segment/cockpit/gcs.ml
+++ b/sw/ground_segment/cockpit/gcs.ml
@@ -320,7 +320,7 @@ let keys_help = fun () ->
(***************** MAIN ******************************************************)
-let ivy_bus = ref "127.255.255.255:2010"
+let ivy_bus = ref Defivybus.default_ivy_bus
and geo_ref = ref ""
and map_files = ref []
and center = ref ""
@@ -340,7 +340,7 @@ and srtm = ref false
let options =
[
"-auto_ortho", Arg.Set auto_ortho, "IGN tiles path";
- "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.25:2010";
+ "-b", Arg.String (fun x -> ivy_bus := x),(sprintf " Default is %s" !ivy_bus);
"-center", Arg.Set_string center, "Initial map center (e.g. 'WGS84 43.605 1.443')";
"-center_ac", Arg.Set auto_center_new_ac, "Centers the map on any new A/C";
"-edit", Arg.Unit (fun () -> edit := true; layout_file := "editor.xml"), "Flight plan editor";
diff --git a/sw/ground_segment/cockpit/live.ml b/sw/ground_segment/cockpit/live.ml
index 6b357416d1..1f33553984 100644
--- a/sw/ground_segment/cockpit/live.ml
+++ b/sw/ground_segment/cockpit/live.ml
@@ -1039,7 +1039,8 @@ let listen_flight_params = fun geomap auto_center_new_ac alert alt_graph ->
end else if agl > 25. then
ac.ground_prox <- false;
try
- draw_altgraph alt_graph geomap aircrafts
+ if not (alt_graph#drawing_area#misc#parent = None) then
+ draw_altgraph alt_graph geomap aircrafts
with _ -> ()
in
@@ -1157,11 +1158,11 @@ let listen_flight_params = fun geomap auto_center_new_ac alert alt_graph ->
let label = Pprz.string_assoc "ap_mode" vs in
ac.strip#set_label "AP" (if label="MANUAL" then "MANU" else label);
let color =
- match ap_mode with
- "AUTO2" -> ok_color
- | "AUTO1" -> "#10F0E0"
- | "MANUAL" -> warning_color
- | _ -> alert_color in
+ match ap_mode with
+ "AUTO2" | "NAV" -> ok_color
+ | "AUTO1" | "R_RCC" | "A_RCC" | "ATT_C" | "R_ZH" | "A_ZH" | "HOVER" | "HOV_C" | "H_ZH" -> "#10F0E0"
+ | "MANUAL" | "RATE" | "ATT" -> warning_color
+ | _ -> alert_color in
ac.strip#set_color "AP" color;
end;
let gps_mode = Pprz.string_assoc "gps_mode" vs in
diff --git a/sw/ground_segment/joystick/Makefile b/sw/ground_segment/joystick/Makefile
index a82d224c96..7c56f9f226 100644
--- a/sw/ground_segment/joystick/Makefile
+++ b/sw/ground_segment/joystick/Makefile
@@ -26,7 +26,7 @@ Q=@
OCAMLC = ocamlc
OCAMLLIB = ../../lib/ocaml
TOOLSDIR = ../../tools
-OCAMLINCLUDES= -I $(OCAMLLIB) -I +lablgtk2 -I +xml-light -I $(TOOLSDIR)
+OCAMLINCLUDES= -I $(OCAMLLIB) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) -I $(TOOLSDIR)
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
all: test_stick input2ivy
diff --git a/sw/ground_segment/joystick/input2ivy.ml b/sw/ground_segment/joystick/input2ivy.ml
index 65b2ebeb36..df2a3b8fcb 100644
--- a/sw/ground_segment/joystick/input2ivy.ml
+++ b/sw/ground_segment/joystick/input2ivy.ml
@@ -2,7 +2,7 @@
* $Id$
*
* Forwarding events from an USB input device to the ivy bus
- *
+ *
* Copyright (C) 2009 ENAC, Pascal Brisset
*
* This file is part of paparazzi.
@@ -20,7 +20,7 @@
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Boston, MA 02111-1307, USA.
*
*)
@@ -117,7 +117,7 @@ let hash_index_of_blocks = fun ac_name ->
List.iter (fun block ->
Hashtbl.add
index_of_blocks
- (Xml.attrib block "name")
+ (Xml.attrib block "name")
(ExtXml.int_attrib block "no"))
(Xml.children blocks)
@@ -135,15 +135,15 @@ let eval_settings_and_blocks = fun field_descr expr ->
let rec loop = function
Syntax.Call ("IndexOfEnum", [Syntax.Ident enum]) -> begin
try Syntax.Int (rank enum field_descr.Pprz.enum) with
- Not_found -> failwith (sprintf "IndexOfEnum: unknown value '%s'" enum)
+ Not_found -> failwith (sprintf "IndexOfEnum: unknown value '%s'" enum)
end
| Syntax.Call ("IndexOfSetting", [Syntax.Ident var]) -> begin
try Syntax.Int (Hashtbl.find index_of_settings var) with
- Not_found -> failwith (sprintf "IndexOfSetting: unknown var '%s'" var)
+ Not_found -> failwith (sprintf "IndexOfSetting: unknown var '%s'" var)
end
| Syntax.Call ("IndexOfBlock", [Syntax.Ident name]) -> begin
try Syntax.Int (Hashtbl.find index_of_blocks name) with
- Not_found -> failwith (sprintf "IndexOfBlock: unknown block '%s'" name)
+ Not_found -> failwith (sprintf "IndexOfBlock: unknown block '%s'" name)
end
| Syntax.Call (ident, exprs) | Syntax.CallOperator (ident, exprs) ->
Syntax.Call (ident, List.map loop exprs)
@@ -157,12 +157,12 @@ let parse_input = fun input ->
let name = Xml.attrib x "name"
and index = ExtXml.int_attrib x "index" in
let value =
- match Xml.tag x with
- "axis" ->
+ match Xml.tag x with
+ "axis" ->
let deadband = try ExtXml.int_attrib x "deadband" with _ -> 0 in
Axis (index, deadband)
- | "button" -> Button index
- | _ -> failwith "parse_input: unexepcted tag" in
+ | "button" -> Button index
+ | _ -> failwith "parse_input: unexepcted tag" in
(name, value))
(Xml.children input)
@@ -240,17 +240,17 @@ let eval_call = fun f args ->
let eval_expr = fun buttons axis inputs expr ->
let rec eval = function
Syntax.Ident ident ->
- let input = my_assoc ident inputs in
- eval_input buttons axis input
+ let input = my_assoc ident inputs in
+ eval_input buttons axis input
| Syntax.Int int -> int
| Syntax.Float float -> failwith "eval_expr: float"
| Syntax.Call (ident, exprs) | Syntax.CallOperator (ident, exprs) ->
- eval_call ident (List.map eval exprs)
+ eval_call ident (List.map eval exprs)
| Syntax.Index _ -> failwith "eval_expr: index"
| Syntax.Field _ -> failwith "eval_expr: Field" in
eval expr
-
+
(** Store for the last sent values: msg_name->values *)
let last_values = Hashtbl.create 5
@@ -269,7 +269,7 @@ let execute_action = fun ac_id inputs buttons axis message ->
(fun (name, expr) -> (name, Pprz.Int (eval_expr buttons axis inputs expr)))
message.fields
- and on_event =
+ and on_event =
match message.on_event with
None -> true
| Some expr -> eval_expr buttons axis inputs expr <> 0 in
@@ -296,7 +296,7 @@ let print_inputs = fun nb_buttons buttons axis ->
fprintf stderr "%d:%d " i (eval_input buttons axis (Axis (i, 0)))
done;
fprintf stderr "\n%!"
-
+
(** Get the values from the input values and send messages *)
let execute_actions = fun actions ac_id ->
@@ -305,7 +305,7 @@ let execute_actions = fun actions ac_id ->
if !verbose then
print_inputs nb_buttons buttons axis;
-
+
List.iter (execute_action ac_id actions.inputs buttons axis) actions.messages
with
exc -> prerr_endline (Printexc.to_string exc)
@@ -314,14 +314,14 @@ let execute_actions = fun actions ac_id ->
(************************************* MAIN **********************************)
let () =
- let ivy_bus = ref "127.255.255.255:2010" in
+let ivy_bus = ref Defivybus.default_ivy_bus in
let device_name = ref ""
and ac_name = ref "MYAC"
and xml_descr = ref "" in
let anon_fun = (fun x -> xml_descr := x) in
- let speclist =
- [ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.255:2010";
+ let speclist =
+ [ "-b", Arg.String (fun x -> ivy_bus := x),(sprintf " Default is %s" !ivy_bus);
"-ac", Arg.Set_string ac_name, "";
"-d", Arg.Set_string device_name, "";
"-v", Arg.Set verbose, "Verbose mode (useful to identify the channels of an input device)";
@@ -351,8 +351,7 @@ let () =
Ivy.start !ivy_bus;
ignore (Glib.Timeout.add actions.period_ms (fun () -> execute_actions actions ac_id; true));
-
+
(** Start the main loop *)
let loop = Glib.Main.create true in
while Glib.Main.is_running loop do ignore (Glib.Main.iteration true) done
-
diff --git a/sw/ground_segment/tmtc/150m.ml b/sw/ground_segment/tmtc/150m.ml
index c340af1e9c..db16831947 100644
--- a/sw/ground_segment/tmtc/150m.ml
+++ b/sw/ground_segment/tmtc/150m.ml
@@ -61,7 +61,7 @@ let get_gps_message = fun label _sender vs ->
(********************************* Main *********************************************)
let () =
- let ivy_bus = ref "127.255.255.255:2010" in
+ let ivy_bus = Defivybus.default_ivy_bus in
(** Connect to the Ivy bus *)
Ivy.init "Paparazzi 150m" "READY" (fun _ _ -> ());
diff --git a/sw/ground_segment/tmtc/Makefile b/sw/ground_segment/tmtc/Makefile
index 9eb2547cec..72824e30df 100644
--- a/sw/ground_segment/tmtc/Makefile
+++ b/sw/ground_segment/tmtc/Makefile
@@ -48,7 +48,7 @@ OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring)
INCLUDES= -I $(OCAMLLIB) -I ../multimon $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) $(OCAMLNETINCLUDES)
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
-SERVERCMO = server_globals.cmo aircraft.cmo wind.cmo airprox.cmo kml.cmo fw_server.ml booz_server.ml server.cmo
+SERVERCMO = server_globals.cmo aircraft.cmo wind.cmo airprox.cmo kml.cmo fw_server.ml rotorcraft_server.ml server.cmo
SERVERCMX = $(SERVERCMO:.cmo=.cmx)
$(VAR)/boa.conf :$(CONF)/boa.conf
@@ -112,10 +112,6 @@ diadec : diadec.cmo ../multimon/multimon.cma
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $^
-booz_translator : booz_translator.cmo ../../lib/ocaml/lib-pprz.cma
- @echo OL $@
- $(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma booz_translator.cmo
-
150m : 150m.cmo
@echo OL $@
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma gtkInit.cmo $^
diff --git a/sw/ground_segment/tmtc/aircraft.ml b/sw/ground_segment/tmtc/aircraft.ml
index dbc3118ca9..2d1c320df1 100644
--- a/sw/ground_segment/tmtc/aircraft.ml
+++ b/sw/ground_segment/tmtc/aircraft.ml
@@ -70,6 +70,11 @@ type nav_ref =
| Utm of Latlong.utm
| Ltp of Latlong.ecef
+type vehicle_type =
+ FixedWing
+ | Rotorcraft
+ | UnknownVehicleType
+
let add_pos_to_nav_ref = fun nav_ref ?(z = 0.) (x, y) ->
let rec lat_of_xy = fun lat last geo (_x, _y) n e ->
if n > 0 && abs_float (lat -. last) > e then
@@ -92,6 +97,7 @@ let add_pos_to_nav_ref = fun nav_ref ?(z = 0.) (x, y) ->
type waypoint = { altitude : float; wp_geo : Latlong.geographic }
type aircraft = {
+ mutable vehicle_type : vehicle_type;
id : string;
name : string;
flight_plan : Xml.xml;
@@ -150,7 +156,7 @@ let max_nb_dl_setting_values = 256 (** indexed iwth an uint8 (messages.xml) *)
let new_aircraft = fun id name fp airframe ->
let svsinfo_init = Array.init gps_nb_channels (fun _ -> svinfo_init ()) in
- { id = id ; name = name; flight_plan = fp; airframe = airframe;
+ { vehicle_type = UnknownVehicleType; id = id; name = name; flight_plan = fp; airframe = airframe;
pos = { Latlong.posn_lat = 0.; posn_long = 0. };
unix_time = 0.; itow = Int32.of_int 0;
roll = 0.; pitch = 0.;
diff --git a/sw/ground_segment/tmtc/aircraft.mli b/sw/ground_segment/tmtc/aircraft.mli
index f043e7f0c5..c4df220c03 100644
--- a/sw/ground_segment/tmtc/aircraft.mli
+++ b/sw/ground_segment/tmtc/aircraft.mli
@@ -54,11 +54,17 @@ type nav_ref =
| Utm of Latlong.utm
| Ltp of Latlong.ecef
+type vehicle_type =
+ FixedWing
+ | Rotorcraft
+ | UnknownVehicleType
+
val add_pos_to_nav_ref : nav_ref -> ?z:float -> (float * float) -> Latlong.geographic
type waypoint = { altitude : float; wp_geo : Latlong.geographic }
type aircraft = {
+ mutable vehicle_type : vehicle_type;
id : string;
name : string;
flight_plan : Xml.xml;
diff --git a/sw/ground_segment/tmtc/broadcaster.ml b/sw/ground_segment/tmtc/broadcaster.ml
index 42a0520062..720c1f636c 100644
--- a/sw/ground_segment/tmtc/broadcaster.ml
+++ b/sw/ground_segment/tmtc/broadcaster.ml
@@ -1,8 +1,8 @@
open Printf
let () =
- let ivy_bus = ref "127.255.255.255:2010" in
-
+ let ivy_bus = ref Defivybus.default_ivy_bus in
+
let port = ref 4242
and ivy_from = ref "DL"
and ivy_to = ref "TM" in
diff --git a/sw/ground_segment/tmtc/dia.ml b/sw/ground_segment/tmtc/dia.ml
index 9cfe6501b4..691e7dd189 100644
--- a/sw/ground_segment/tmtc/dia.ml
+++ b/sw/ground_segment/tmtc/dia.ml
@@ -89,7 +89,7 @@ let fp_msg = fun _sender vs ->
let _ =
- let ivy_bus = ref "127.255.255.255:2010"
+ let ivy_bus = ref Defivybus.default_ivy_bus
and port = ref "/dev/dsp" in
let options = [
"-b", Arg.Set_string ivy_bus, (sprintf " Default is %s" !ivy_bus);
diff --git a/sw/ground_segment/tmtc/fw_server.ml b/sw/ground_segment/tmtc/fw_server.ml
index ce4a4fe2ba..4c1a4f7467 100644
--- a/sw/ground_segment/tmtc/fw_server.ml
+++ b/sw/ground_segment/tmtc/fw_server.ml
@@ -187,7 +187,8 @@ let log_and_parse = fun ac_name (a:Aircraft.aircraft) msg values ->
a.bat <- fvalue "vsupply" /. 10.;
a.fbw.rc_rate <- ivalue "frame_rate"
| "PPRZ_MODE" ->
- a.ap_mode <- check_index (ivalue "ap_mode") ap_modes "AP_MODE";
+ a.vehicle_type <- FixedWing;
+ a.ap_mode <- check_index (ivalue "ap_mode") fixedwing_ap_modes "AP_MODE";
a.gaz_mode <- check_index (ivalue "ap_gaz") gaz_modes "AP_GAZ";
a.lateral_mode <- check_index (ivalue "ap_lateral") lat_modes "AP_LAT";
a.horizontal_mode <- check_index (ivalue "ap_horizontal") horiz_modes "AP_HORIZ";
diff --git a/sw/ground_segment/tmtc/ihm.ml b/sw/ground_segment/tmtc/ihm.ml
index 65ace6c35d..2b3a9c10f2 100644
--- a/sw/ground_segment/tmtc/ihm.ml
+++ b/sw/ground_segment/tmtc/ihm.ml
@@ -271,7 +271,9 @@ let listen = fun () ->
(*** Options ***)
-let ivy_bus = ref "127.255.255.255:2010"
+
+let ivy_bus = Defivybus.default_ivy_bus
+
let options =
[ "-b", Arg.String (fun x -> ivy_bus := x), (Printf.sprintf "Bus\tDefault is %s" !ivy_bus)]
diff --git a/sw/ground_segment/tmtc/ivy2udp.ml b/sw/ground_segment/tmtc/ivy2udp.ml
index 1501d37ee8..e54b41a663 100644
--- a/sw/ground_segment/tmtc/ivy2udp.ml
+++ b/sw/ground_segment/tmtc/ivy2udp.ml
@@ -33,7 +33,7 @@ module PprzTransport = Serial.Transport(Pprz.Transport)
open Printf
let () =
- let ivy_bus = ref "127.255.255.255:2010" in
+ let ivy_bus = ref Defivybus.default_ivy_bus in
let host = ref "85.214.48.162"
and port = ref 4242
and datalink_port = ref 4243
diff --git a/sw/ground_segment/tmtc/ivy_tcp_aircraft.ml b/sw/ground_segment/tmtc/ivy_tcp_aircraft.ml
index f18689efd7..083902273b 100644
--- a/sw/ground_segment/tmtc/ivy_tcp_aircraft.ml
+++ b/sw/ground_segment/tmtc/ivy_tcp_aircraft.ml
@@ -5,7 +5,7 @@ module PprzTransport = Serial.Transport(Pprz.Transport)
open Printf
let () =
- let ivy_bus = ref "127.255.255.255:2010" in
+ let ivy_bus = ref Defivybus.default_ivy_bus in
let host = ref "10.31.1.98"
and port = ref 4242
and id = ref "6" in
diff --git a/sw/ground_segment/tmtc/ivy_tcp_controller.ml b/sw/ground_segment/tmtc/ivy_tcp_controller.ml
index 87358de8b8..9b346beaea 100644
--- a/sw/ground_segment/tmtc/ivy_tcp_controller.ml
+++ b/sw/ground_segment/tmtc/ivy_tcp_controller.ml
@@ -6,7 +6,7 @@ module PprzTransport = Serial.Transport(Pprz.Transport)
let () =
let host = ref "10.31.1.98"
- and ivy_bus = ref "127.255.255.255:2010" in
+ and ivy_bus = ref Defivybus.default_ivy_bus in
let port = ref 4243 in
let options = [
diff --git a/sw/ground_segment/tmtc/kml.ml b/sw/ground_segment/tmtc/kml.ml
index e3b36ac49b..8b0fc9aeef 100644
--- a/sw/ground_segment/tmtc/kml.ml
+++ b/sw/ground_segment/tmtc/kml.ml
@@ -259,10 +259,15 @@ let update_ac = fun ac ->
else
sprintf "http://%s:%d/var/%s/flight_plan.kml" !hostname !port ac.name
in
+ let ap_mode = match ac.vehicle_type with
+ Rotorcraft -> rotorcraft_ap_modes.(ac.ap_mode)
+ | FixedWing -> fixedwing_ap_modes.(ac.ap_mode)
+ | UnknownVehicleType -> "UNK"
+ in
let blocks = ExtXml.child ac.flight_plan "blocks" in
let block = ExtXml.child blocks (string_of_int ac.cur_block) in
let block_name = ExtXml.attrib block "name" in
- let description = sprintf "%s : %s\nBat: %.1fV \nAGL: %.0fm\nSpeed: %.1fm/s" ap_modes.(ac.ap_mode) block_name ac.bat ac.agl ac.gspeed in
+ let description = sprintf "%s : %s\nBat: %.1fV \nAGL: %.0fm\nSpeed: %.1fm/s" ap_mode block_name ac.bat ac.agl ac.gspeed in
let change = change_placemark ~description ac.name ac.pos ac.alt in
let kml_changes = link_update url_flight_plan [change] in
print_xml ac.name "ac_changes.kml" kml_changes
diff --git a/sw/ground_segment/tmtc/link.ml b/sw/ground_segment/tmtc/link.ml
index 426da505c3..e6689f1740 100644
--- a/sw/ground_segment/tmtc/link.ml
+++ b/sw/ground_segment/tmtc/link.ml
@@ -423,7 +423,7 @@ let send_ping_msg = fun device ->
(** Main *********************************************************************)
let () =
- let ivy_bus = ref "127.255.255.255:2010"
+ let ivy_bus = ref Defivybus.default_ivy_bus
and port = ref "/dev/ttyUSB0"
and baudrate = ref "9600"
and transport = ref "pprz"
diff --git a/sw/ground_segment/tmtc/messages.ml b/sw/ground_segment/tmtc/messages.ml
index 476347aa68..8d657693db 100644
--- a/sw/ground_segment/tmtc/messages.ml
+++ b/sw/ground_segment/tmtc/messages.ml
@@ -183,12 +183,14 @@ let rec one_class = fun (notebook:GPack.notebook) (ident, xml_class, sender) ->
List.iter (fun m -> ignore (one_page sender_name class_name class_notebook bind m)) messages
+
+
(*********************** Main ************************************************)
let _ =
- let ivy_bus = ref "127.255.255.255:2010" in
+ let ivy_bus = ref Defivybus.default_ivy_bus in
let classes = ref ["telemetry:*"] in
Arg.parse
- [ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.255:2010";
+ [ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf " Default is %s" !ivy_bus);
"-c", Arg.String (fun x -> classes := x :: !classes), "class name"]
(fun x -> prerr_endline ("WARNING: don't do anything with "^x))
"Usage: ";
diff --git a/sw/ground_segment/tmtc/booz_server.ml b/sw/ground_segment/tmtc/rotorcraft_server.ml
similarity index 95%
rename from sw/ground_segment/tmtc/booz_server.ml
rename to sw/ground_segment/tmtc/rotorcraft_server.ml
index a076cb9d27..7217143aac 100644
--- a/sw/ground_segment/tmtc/booz_server.ml
+++ b/sw/ground_segment/tmtc/rotorcraft_server.ml
@@ -1,7 +1,5 @@
(*
- * $Id: fw_server.ml,v 1.1 2009/03/22 17:53:48 hecto Exp $
- *
- * Server part specific to booz vehicles
+ * Server part specific to rotorcraft vehicles
*
* Copyright (C) ENAC
*
@@ -97,12 +95,13 @@ let update_waypoint = fun ac wp_id p alt ->
Not_found ->
Hashtbl.add ac.waypoints wp_id new_wp
-let get_pprz_mode = fun ap_mode ->
+(*let get_pprz_mode = fun ap_mode ->
let mode = ref 0 in
if ap_mode = 0 || ap_mode = 1 || ap_mode = 2 || ap_mode = 4 || ap_mode = 7 then mode := 0 (* MANUAL *)
else if ap_mode = 3 || ap_mode = 5 || ap_mode = 6 || ap_mode = 8 then mode := 1 (* AUTO1 *)
else if ap_mode = 9 || ap_mode = 10 || ap_mode = 11 || ap_mode = 12 then mode := 2; (* AUTO2 *)
!mode
+*)
let get_rc_status = fun rc_status ->
let status = ref "" in
@@ -178,13 +177,14 @@ let log_and_parse = fun ac_name (a:Aircraft.aircraft) msg values ->
(*a.unix_time <- LL.unix_time_of_tow (truncate (fvalue "itow" /. 1000.));
a.itow <- Int32.of_float (fvalue "itow");*)
a.flight_time <- ivalue "flight_time";
- if a.gspeed > 3. && a.ap_mode = _AUTO2 then
- Wind.update ac_name a.gspeed a.course
+ (*if a.gspeed > 3. && a.ap_mode = _AUTO2 then
+ Wind.update ac_name a.gspeed a.course*)
| "ROTORCRAFT_STATUS" ->
+ a.vehicle_type <- Rotorcraft;
a.fbw.rc_status <- get_rc_status (ivalue "rc_status");
a.fbw.rc_rate <- ivalue "frame_rate";
a.gps_mode <- check_index (ivalue "gps_status") gps_modes "GPS_MODE";
- a.ap_mode <- check_index (get_pprz_mode (ivalue "ap_mode")) ap_modes "BOOZ_AP_MODE";
+ a.ap_mode <- check_index (ivalue "ap_mode") rotorcraft_ap_modes "ROTORCRAFT_AP_MODE";
a.kill_mode <- ivalue "ap_motors_on" == 0;
a.bat <- fvalue "vsupply" /. 10.;
| "INS_REF" ->
diff --git a/sw/ground_segment/tmtc/booz_server.mli b/sw/ground_segment/tmtc/rotorcraft_server.mli
similarity index 89%
rename from sw/ground_segment/tmtc/booz_server.mli
rename to sw/ground_segment/tmtc/rotorcraft_server.mli
index 14fc8f6fc8..9cbf3fdc0f 100644
--- a/sw/ground_segment/tmtc/booz_server.mli
+++ b/sw/ground_segment/tmtc/rotorcraft_server.mli
@@ -1,7 +1,5 @@
(*
- * $Id: fw_server.mli,v 1.1 2009/03/22 17:53:48 hecto Exp $
- *
- * Server part specific to booz vehicles
+ * Server part specific to rotorcraft vehicles
*
* Copyright (C) ENAC
*
diff --git a/sw/ground_segment/tmtc/server.ml b/sw/ground_segment/tmtc/server.ml
index a66e209bad..747b63dccb 100644
--- a/sw/ground_segment/tmtc/server.ml
+++ b/sw/ground_segment/tmtc/server.ml
@@ -52,6 +52,12 @@ let srtm_path = Env.paparazzi_home // "data" // "srtm"
let get_indexed_value = fun t i ->
if i >= 0 then t.(i) else "UNK"
+let modes_of_type = fun vt ->
+ match vt with
+ FixedWing -> fixedwing_ap_modes
+ | Rotorcraft -> rotorcraft_ap_modes
+ | UnknownVehicleType -> [| |]
+
(** The aircrafts store *)
let aircrafts = Hashtbl.create 3
@@ -64,12 +70,25 @@ let send_aircrafts_msg = fun _asker _values ->
let names = String.concat "," (Hashtbl.fold (fun k _v r -> k::r) aircrafts []) ^ "," in
["ac_list", Pprz.String names]
+
+let expand_aicraft x =
+ let ac_name = ExtXml.attrib x "name" in
+ try
+ Env.expand_ac_xml x
+ with Failure msg ->
+ begin
+ prerr_endline ("A failure occurred while processing aircraft '"^ac_name^"'");
+ prerr_endline "Please remove it from 'conf.xml' or fix its parameter(s)";
+ flush stderr;
+ failwith msg
+ end
+
let make_element = fun t a c -> Xml.Element (t,a,c)
let log_xml = fun timeofday data_file ->
let conf_children =
List.map
- (fun x -> if Xml.tag x = "aircraft" then Env.expand_ac_xml x else x)
+ (fun x -> if Xml.tag x = "aircraft" then expand_aicraft x else x)
(Xml.children conf_xml) in
let expanded_conf = make_element (Xml.tag conf_xml) (Xml.attribs conf_xml) conf_children in
make_element
@@ -122,7 +141,7 @@ let ac_msg = fun messages_xml logging ac_name ac ->
let msg = Tele_Pprz.message_of_id msg_id in
log ?timestamp logging ac_name msg.Pprz.name values;
Fw_server.log_and_parse ac_name ac msg values;
- Booz_server.log_and_parse ac_name ac msg values
+ Rotorcraft_server.log_and_parse ac_name ac msg values
with
Telemetry_error (ac_name, msg) ->
Ground_Pprz.message_send my_id "TELEMETRY_ERROR" ["ac_id", Pprz.String ac_name;"message", Pprz.String msg];
@@ -342,7 +361,7 @@ let send_aircraft_msg = fun ac ->
"energy", Pprz.Int a.energy] in
Ground_Pprz.message_send my_id "ENGINE_STATUS" values;
- let ap_mode = get_indexed_value ap_modes a.ap_mode in
+ let ap_mode = get_indexed_value (modes_of_type a.vehicle_type) a.ap_mode in
let gaz_mode = get_indexed_value gaz_modes a.gaz_mode in
let lat_mode = get_indexed_value lat_modes a.lateral_mode in
let horiz_mode = get_indexed_value horiz_modes a.horizontal_mode in
@@ -652,7 +671,7 @@ let ground_to_uplink = fun logging ->
(* main loop *)
let () =
- let ivy_bus = ref "127.255.255.255:2010"
+ let ivy_bus = ref Defivybus.default_ivy_bus
and logging = ref true
and http = ref false in
diff --git a/sw/ground_segment/tmtc/server_globals.ml b/sw/ground_segment/tmtc/server_globals.ml
index 0255bca0b1..029a66bb68 100644
--- a/sw/ground_segment/tmtc/server_globals.ml
+++ b/sw/ground_segment/tmtc/server_globals.ml
@@ -3,7 +3,8 @@ exception Telemetry_error of string * string
let hostname = ref "localhost"
(** FIXME: Should be read from messages.xml *)
-let ap_modes = [|"MANUAL";"AUTO1";"AUTO2";"HOME";"NOGPS"|]
+let fixedwing_ap_modes = [|"MANUAL";"AUTO1";"AUTO2";"HOME";"NOGPS"|]
+let rotorcraft_ap_modes = [|"SAFE";"KILL";"RATE";"ATT";"R_RCC";"A_RCC";"ATT_C";"R_ZH";"A_ZH";"HOVER";"HOV_C";"H_ZH";"NAV"|]
let _AUTO2 = 2
let gaz_modes = [|"MANUAL";"GAZ";"CLIMB";"ALT"|]
let lat_modes = [|"MANUAL";"ROLL_RATE";"ROLL";"COURSE"|]
diff --git a/sw/ground_segment/tmtc/settings.ml b/sw/ground_segment/tmtc/settings.ml
index 73642add5b..f7725daa01 100644
--- a/sw/ground_segment/tmtc/settings.ml
+++ b/sw/ground_segment/tmtc/settings.ml
@@ -23,6 +23,7 @@
* Boston, MA 02111-1307, USA.
*
*)
+open Printf
module Ground_Pprz = Pprz.Messages(struct let name = "ground" end)
module Tele_Pprz = Pprz.Messages(struct let name = "telemetry" end)
@@ -78,10 +79,11 @@ let one_ac = fun (notebook:GPack.notebook) ac_name ->
let _ =
- let ivy_bus = ref "127.255.255.255:2010" in
+
+ let ivy_bus = ref Defivybus.default_ivy_bus in
let acs = ref [] in
Arg.parse
- [ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.255:2010";
+ [ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf " Default is %s" !ivy_bus);
"-ac", Arg.String (fun x -> acs := x :: !acs), "A/C name"]
(fun x -> prerr_endline ("WARNING: don't do anything with "^x))
"Usage: ";
diff --git a/sw/ground_segment/tmtc/stereo_demod.ml b/sw/ground_segment/tmtc/stereo_demod.ml
index be2d05deb5..740fc66bd7 100644
--- a/sw/ground_segment/tmtc/stereo_demod.ml
+++ b/sw/ground_segment/tmtc/stereo_demod.ml
@@ -112,7 +112,7 @@ let send_modem_msg = fun status ->
(* main loop *)
let _ =
- let ivy_bus = ref "127.255.255.255:2010" in
+ let ivy_bus = Defivybus.default_ivy_bus in
let port = ref "/dev/dsp" in
let options =
[ "-b", Arg.Set_string ivy_bus, (sprintf "Ivy bus (%s)" !ivy_bus);
diff --git a/sw/ground_segment/visu3d/Makefile b/sw/ground_segment/visu3d/Makefile
index 4bf6b5a338..707d9f2684 100644
--- a/sw/ground_segment/visu3d/Makefile
+++ b/sw/ground_segment/visu3d/Makefile
@@ -1,7 +1,7 @@
OCAMLOPT0 = ocamlopt
-OCAMLC = ocamlc -I +xml-light
+OCAMLC = ocamlc $(shell ocamlfind query -r -i-format xml-light)
-MLFLAGS = -I +lablgtk2 -I +lablGL -I +camlimages -I ../../lib/ocaml
+MLFLAGS = $(shell ocamlfind query -r -i-format lablGL) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format camlimages) -I ../../lib/ocaml
OCAMLOPT = $(OCAMLOPT0) $(OCAMLOPT_OPTIONS)
diff --git a/sw/ground_segment/visu3d/mapGL.ml b/sw/ground_segment/visu3d/mapGL.ml
index f93e3b68c6..4ecfd04286 100644
--- a/sw/ground_segment/visu3d/mapGL.ml
+++ b/sw/ground_segment/visu3d/mapGL.ml
@@ -511,11 +511,11 @@ let build_interface = fun map_file mission_file ->
(* = Programme principal = *)
(* ========================================================================= *)
let _ =
- let ivy_bus = ref "127.255.255.255:2010" and
+ let ivy_bus = Defivybus.default_ivy_bus and
map_file = ref "" and
mission_file = ref "" in
let options =
- [ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.25:2010";
+ [ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf " Default is %s" !ivy_bus);
"-m", Arg.String (fun x -> map_file := x), "Map description file";
"-f", Arg.String (fun x -> mission_file := x), "Mission description file"] in
Arg.parse (options)
diff --git a/sw/in_progress/button/Makefile b/sw/in_progress/button/Makefile
index ab2a4195aa..73b93e66ae 100644
--- a/sw/in_progress/button/Makefile
+++ b/sw/in_progress/button/Makefile
@@ -25,7 +25,7 @@ Q=@
OCAMLC = ocamlc
OCAMLOPT = ocamlopt
-INCLUDES= -I +xml-light -I +lablgtk2 -I ../../lib/ocaml
+INCLUDES= $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format lablgtk2) -I ../../lib/ocaml
all: panic
diff --git a/sw/in_progress/pow/InstallCert.java b/sw/in_progress/pow/InstallCert.java
deleted file mode 100644
index f979cc7868..0000000000
--- a/sw/in_progress/pow/InstallCert.java
+++ /dev/null
@@ -1,188 +0,0 @@
-
-/*
- * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * - Neither the name of Sun Microsystems nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @see http://blogs.sun.com/gc/entry/unable_to_find_valid_certification
- */
-import java.io.*;
-
-import java.security.*;
-import java.security.cert.*;
-
-import javax.net.ssl.*;
-
-public class InstallCert {
-
- public static void main(String[] args) throws Exception {
- String host;
- int port;
- char[] passphrase;
- if ((args.length == 1) || (args.length == 2)) {
- String[] c = args[0].split(":");
- host = c[0];
- port = (c.length == 1) ? 443 : Integer.parseInt(c[1]);
- String p = (args.length == 1) ? "changeit" : args[1];
- passphrase = p.toCharArray();
- } else {
- System.out.println("Usage: java InstallCert [:port] [passphrase]");
- return;
- }
-
- File file = new File("jssecacerts");
- if (file.isFile() == false) {
- char SEP = File.separatorChar;
- File dir = new File(System.getProperty("java.home") + SEP
- + "lib" + SEP + "security");
- file = new File(dir, "jssecacerts");
- if (file.isFile() == false) {
- file = new File(dir, "cacerts");
- }
- }
- System.out.println("Loading KeyStore " + file + "...");
- InputStream in = new FileInputStream(file);
- KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
- ks.load(in, passphrase);
- in.close();
-
- SSLContext context = SSLContext.getInstance("TLS");
- TrustManagerFactory tmf =
- TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
- tmf.init(ks);
- X509TrustManager defaultTrustManager = (X509TrustManager)tmf.getTrustManagers()[0];
- SavingTrustManager tm = new SavingTrustManager(defaultTrustManager);
- context.init(null, new TrustManager[] {tm}, null);
- SSLSocketFactory factory = context.getSocketFactory();
-
- System.out.println("Opening connection to " + host + ":" + port + "...");
- SSLSocket socket = (SSLSocket)factory.createSocket(host, port);
- socket.setSoTimeout(10000);
- try {
- System.out.println("Starting SSL handshake...");
- socket.startHandshake();
- socket.close();
- System.out.println();
- System.out.println("No errors, certificate is already trusted");
- } catch (SSLException e) {
- System.out.println();
- e.printStackTrace(System.out);
- }
-
- X509Certificate[] chain = tm.chain;
- if (chain == null) {
- System.out.println("Could not obtain server certificate chain");
- return;
- }
-
- BufferedReader reader =
- new BufferedReader(new InputStreamReader(System.in));
-
- System.out.println();
- System.out.println("Server sent " + chain.length + " certificate(s):");
- System.out.println();
- MessageDigest sha1 = MessageDigest.getInstance("SHA1");
- MessageDigest md5 = MessageDigest.getInstance("MD5");
- for (int i = 0; i < chain.length; i++) {
- X509Certificate cert = chain[i];
- System.out.println
- (" " + (i + 1) + " Subject " + cert.getSubjectDN());
- System.out.println(" Issuer " + cert.getIssuerDN());
- sha1.update(cert.getEncoded());
- System.out.println(" sha1 " + toHexString(sha1.digest()));
- md5.update(cert.getEncoded());
- System.out.println(" md5 " + toHexString(md5.digest()));
- System.out.println();
- }
-
- System.out.println("Enter certificate to add to trusted keystore or 'q' to quit: [1]");
- String line = reader.readLine().trim();
- int k;
- try {
- k = (line.length() == 0) ? 0 : Integer.parseInt(line) - 1;
- } catch (NumberFormatException e) {
- System.out.println("KeyStore not changed");
- return;
- }
-
- X509Certificate cert = chain[k];
- String alias = host + "-" + (k + 1);
- ks.setCertificateEntry(alias, cert);
-
- OutputStream out = new FileOutputStream("jssecacerts");
- ks.store(out, passphrase);
- out.close();
-
- System.out.println();
- System.out.println(cert);
- System.out.println();
- System.out.println
- ("Added certificate to keystore 'jssecacerts' using alias '"
- + alias + "'");
- }
-
- private static final char[] HEXDIGITS = "0123456789abcdef".toCharArray();
-
- private static String toHexString(byte[] bytes) {
- StringBuilder sb = new StringBuilder(bytes.length * 3);
- for (int b : bytes) {
- b &= 0xff;
- sb.append(HEXDIGITS[b >> 4]);
- sb.append(HEXDIGITS[b & 15]);
- sb.append(' ');
- }
- return sb.toString();
- }
-
- private static class SavingTrustManager implements X509TrustManager {
-
- private final X509TrustManager tm;
- private X509Certificate[] chain;
-
- SavingTrustManager(X509TrustManager tm) {
- this.tm = tm;
- }
-
- public X509Certificate[] getAcceptedIssuers() {
- throw new UnsupportedOperationException();
- }
-
- public void checkClientTrusted(X509Certificate[] chain, String authType)
- throws CertificateException {
- throw new UnsupportedOperationException();
- }
-
- public void checkServerTrusted(X509Certificate[] chain, String authType)
- throws CertificateException {
- this.chain = chain;
- tm.checkServerTrusted(chain, authType);
- }
- }
-
-}
diff --git a/sw/in_progress/pow/ServletPow/InstallCert.java b/sw/in_progress/pow/ServletPow/InstallCert.java
deleted file mode 100644
index f979cc7868..0000000000
--- a/sw/in_progress/pow/ServletPow/InstallCert.java
+++ /dev/null
@@ -1,188 +0,0 @@
-
-/*
- * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * - Neither the name of Sun Microsystems nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @see http://blogs.sun.com/gc/entry/unable_to_find_valid_certification
- */
-import java.io.*;
-
-import java.security.*;
-import java.security.cert.*;
-
-import javax.net.ssl.*;
-
-public class InstallCert {
-
- public static void main(String[] args) throws Exception {
- String host;
- int port;
- char[] passphrase;
- if ((args.length == 1) || (args.length == 2)) {
- String[] c = args[0].split(":");
- host = c[0];
- port = (c.length == 1) ? 443 : Integer.parseInt(c[1]);
- String p = (args.length == 1) ? "changeit" : args[1];
- passphrase = p.toCharArray();
- } else {
- System.out.println("Usage: java InstallCert [:port] [passphrase]");
- return;
- }
-
- File file = new File("jssecacerts");
- if (file.isFile() == false) {
- char SEP = File.separatorChar;
- File dir = new File(System.getProperty("java.home") + SEP
- + "lib" + SEP + "security");
- file = new File(dir, "jssecacerts");
- if (file.isFile() == false) {
- file = new File(dir, "cacerts");
- }
- }
- System.out.println("Loading KeyStore " + file + "...");
- InputStream in = new FileInputStream(file);
- KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
- ks.load(in, passphrase);
- in.close();
-
- SSLContext context = SSLContext.getInstance("TLS");
- TrustManagerFactory tmf =
- TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
- tmf.init(ks);
- X509TrustManager defaultTrustManager = (X509TrustManager)tmf.getTrustManagers()[0];
- SavingTrustManager tm = new SavingTrustManager(defaultTrustManager);
- context.init(null, new TrustManager[] {tm}, null);
- SSLSocketFactory factory = context.getSocketFactory();
-
- System.out.println("Opening connection to " + host + ":" + port + "...");
- SSLSocket socket = (SSLSocket)factory.createSocket(host, port);
- socket.setSoTimeout(10000);
- try {
- System.out.println("Starting SSL handshake...");
- socket.startHandshake();
- socket.close();
- System.out.println();
- System.out.println("No errors, certificate is already trusted");
- } catch (SSLException e) {
- System.out.println();
- e.printStackTrace(System.out);
- }
-
- X509Certificate[] chain = tm.chain;
- if (chain == null) {
- System.out.println("Could not obtain server certificate chain");
- return;
- }
-
- BufferedReader reader =
- new BufferedReader(new InputStreamReader(System.in));
-
- System.out.println();
- System.out.println("Server sent " + chain.length + " certificate(s):");
- System.out.println();
- MessageDigest sha1 = MessageDigest.getInstance("SHA1");
- MessageDigest md5 = MessageDigest.getInstance("MD5");
- for (int i = 0; i < chain.length; i++) {
- X509Certificate cert = chain[i];
- System.out.println
- (" " + (i + 1) + " Subject " + cert.getSubjectDN());
- System.out.println(" Issuer " + cert.getIssuerDN());
- sha1.update(cert.getEncoded());
- System.out.println(" sha1 " + toHexString(sha1.digest()));
- md5.update(cert.getEncoded());
- System.out.println(" md5 " + toHexString(md5.digest()));
- System.out.println();
- }
-
- System.out.println("Enter certificate to add to trusted keystore or 'q' to quit: [1]");
- String line = reader.readLine().trim();
- int k;
- try {
- k = (line.length() == 0) ? 0 : Integer.parseInt(line) - 1;
- } catch (NumberFormatException e) {
- System.out.println("KeyStore not changed");
- return;
- }
-
- X509Certificate cert = chain[k];
- String alias = host + "-" + (k + 1);
- ks.setCertificateEntry(alias, cert);
-
- OutputStream out = new FileOutputStream("jssecacerts");
- ks.store(out, passphrase);
- out.close();
-
- System.out.println();
- System.out.println(cert);
- System.out.println();
- System.out.println
- ("Added certificate to keystore 'jssecacerts' using alias '"
- + alias + "'");
- }
-
- private static final char[] HEXDIGITS = "0123456789abcdef".toCharArray();
-
- private static String toHexString(byte[] bytes) {
- StringBuilder sb = new StringBuilder(bytes.length * 3);
- for (int b : bytes) {
- b &= 0xff;
- sb.append(HEXDIGITS[b >> 4]);
- sb.append(HEXDIGITS[b & 15]);
- sb.append(' ');
- }
- return sb.toString();
- }
-
- private static class SavingTrustManager implements X509TrustManager {
-
- private final X509TrustManager tm;
- private X509Certificate[] chain;
-
- SavingTrustManager(X509TrustManager tm) {
- this.tm = tm;
- }
-
- public X509Certificate[] getAcceptedIssuers() {
- throw new UnsupportedOperationException();
- }
-
- public void checkClientTrusted(X509Certificate[] chain, String authType)
- throws CertificateException {
- throw new UnsupportedOperationException();
- }
-
- public void checkServerTrusted(X509Certificate[] chain, String authType)
- throws CertificateException {
- this.chain = chain;
- tm.checkServerTrusted(chain, authType);
- }
- }
-
-}
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/commons-codec-1.4.jar b/sw/in_progress/pow/ServletPow/JARLIB/commons-codec-1.4.jar
deleted file mode 100755
index 458d432da8..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/commons-codec-1.4.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/commons-fileupload-1.2.1.jar b/sw/in_progress/pow/ServletPow/JARLIB/commons-fileupload-1.2.1.jar
deleted file mode 100755
index aa209b3887..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/commons-fileupload-1.2.1.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/commons-httpclient-3.1.jar b/sw/in_progress/pow/ServletPow/JARLIB/commons-httpclient-3.1.jar
deleted file mode 100755
index 7c59774aed..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/commons-httpclient-3.1.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/commons-io-1.4.jar b/sw/in_progress/pow/ServletPow/JARLIB/commons-io-1.4.jar
deleted file mode 100755
index 133dc6cb35..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/commons-io-1.4.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/commons-logging-1.1.1.jar b/sw/in_progress/pow/ServletPow/JARLIB/commons-logging-1.1.1.jar
deleted file mode 100755
index 8758a96b70..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/commons-logging-1.1.1.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/ivy-1.2.13.jar b/sw/in_progress/pow/ServletPow/JARLIB/ivy-1.2.13.jar
deleted file mode 100755
index be51c0e1f0..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/ivy-1.2.13.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/jakarta-regexp-1.5.jar b/sw/in_progress/pow/ServletPow/JARLIB/jakarta-regexp-1.5.jar
deleted file mode 100755
index 652bc822c9..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/jakarta-regexp-1.5.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/jdom.jar b/sw/in_progress/pow/ServletPow/JARLIB/jdom.jar
deleted file mode 100755
index 65a1b3f737..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/jdom.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/log4j-1.2.16.jar b/sw/in_progress/pow/ServletPow/JARLIB/log4j-1.2.16.jar
deleted file mode 100755
index 3f9d847618..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/log4j-1.2.16.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/mysql-connector-java-5.1.12-bin.jar b/sw/in_progress/pow/ServletPow/JARLIB/mysql-connector-java-5.1.12-bin.jar
deleted file mode 100755
index af5847eed4..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/mysql-connector-java-5.1.12-bin.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/pushlet.jar b/sw/in_progress/pow/ServletPow/JARLIB/pushlet.jar
deleted file mode 100755
index 6dc1c22e21..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/pushlet.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/pushletclient.jar b/sw/in_progress/pow/ServletPow/JARLIB/pushletclient.jar
deleted file mode 100755
index c699b8b25f..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/pushletclient.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/rome-1.0.jar b/sw/in_progress/pow/ServletPow/JARLIB/rome-1.0.jar
deleted file mode 100755
index 7138baaca1..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/rome-1.0.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/serializer.jar b/sw/in_progress/pow/ServletPow/JARLIB/serializer.jar
deleted file mode 100755
index de9b007b4c..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/serializer.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/servlet-api.jar b/sw/in_progress/pow/ServletPow/JARLIB/servlet-api.jar
deleted file mode 100755
index a71c371333..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/servlet-api.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/JARLIB/xerces.jar b/sw/in_progress/pow/ServletPow/JARLIB/xerces.jar
deleted file mode 100755
index e9fe08ad45..0000000000
Binary files a/sw/in_progress/pow/ServletPow/JARLIB/xerces.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/ServletPow.war b/sw/in_progress/pow/ServletPow/ServletPow.war
deleted file mode 100755
index 0888047d40..0000000000
Binary files a/sw/in_progress/pow/ServletPow/ServletPow.war and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/jk.load b/sw/in_progress/pow/ServletPow/conf apache2/mods_available/jk.load
deleted file mode 100755
index 841cf3d0c2..0000000000
--- a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/jk.load
+++ /dev/null
@@ -1,6 +0,0 @@
-LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
-
-JkWorkersFile /etc/apache2/workers.properties
-JkLogFile /var/log/apache2/mod_jk.log
-JkLogLevel debug
-JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
diff --git a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/php5.conf b/sw/in_progress/pow/ServletPow/conf apache2/mods_available/php5.conf
deleted file mode 100755
index 9152fe14f6..0000000000
--- a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/php5.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-
-AddType application/x-httpd-php .php .phtml .php3
-AddType application/x-httpd-php-source .phps
-
-
-
- SetHandler application/x-httpd-php
-
-
- SetHandler application/x-httpd-php-source
-
- # To re-enable php in user directories comment the following lines
- # (from to .) Do NOT set it to On as it
- # prevents .htaccess files from disabling it.
-
-
- php_admin_value engine Off
-
-
-
diff --git a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/php5.load b/sw/in_progress/pow/ServletPow/conf apache2/mods_available/php5.load
deleted file mode 100755
index 0d6a55eb43..0000000000
--- a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/php5.load
+++ /dev/null
@@ -1 +0,0 @@
-LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/ssl.conf b/sw/in_progress/pow/ServletPow/conf apache2/mods_available/ssl.conf
deleted file mode 100755
index 1e4ce40c44..0000000000
--- a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/ssl.conf
+++ /dev/null
@@ -1,64 +0,0 @@
-
-#
-# Pseudo Random Number Generator (PRNG):
-# Configure one or more sources to seed the PRNG of the SSL library.
-# The seed data should be of good random quality.
-# WARNING! On some platforms /dev/random blocks if not enough entropy
-# is available. This means you then cannot use the /dev/random device
-# because it would lead to very long connection times (as long as
-# it requires to make more entropy available). But usually those
-# platforms additionally provide a /dev/urandom device which doesn't
-# block. So, if available, use this one instead. Read the mod_ssl User
-# Manual for more details.
-#
-SSLRandomSeed startup builtin
-SSLRandomSeed startup file:/dev/urandom 512
-SSLRandomSeed connect builtin
-SSLRandomSeed connect file:/dev/urandom 512
-
-##
-## SSL Global Context
-##
-## All SSL configuration in this context applies both to
-## the main server and all SSL-enabled virtual hosts.
-##
-
-#
-# Some MIME-types for downloading Certificates and CRLs
-#
-AddType application/x-x509-ca-cert .crt
-AddType application/x-pkcs7-crl .crl
-
-# Pass Phrase Dialog:
-# Configure the pass phrase gathering process.
-# The filtering dialog program (`builtin' is a internal
-# terminal dialog) has to provide the pass phrase on stdout.
-SSLPassPhraseDialog builtin
-
-# Inter-Process Session Cache:
-# Configure the SSL Session Cache: First the mechanism
-# to use and second the expiring timeout (in seconds).
-#SSLSessionCache dbm:/var/run/apache2/ssl_scache
-SSLSessionCache shmcb:/var/run/apache2/ssl_scache(512000)
-SSLSessionCacheTimeout 300
-
-# Semaphore:
-# Configure the path to the mutual exclusion semaphore the
-# SSL engine uses internally for inter-process synchronization.
-SSLMutex file:/var/run/apache2/ssl_mutex
-
-# SSL Cipher Suite:
-# List the ciphers that the client is permitted to negotiate.
-# See the mod_ssl documentation for a complete list.
-# enable only secure ciphers:
-SSLCipherSuite HIGH:MEDIUM:!ADH
-# Use this instead if you want to allow cipher upgrades via SGC facility.
-# In this case you also have to use something like
-# SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128
-# see http://httpd.apache.org/docs/2.2/ssl/ssl_howto.html.en#upgradeenc
-#SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
-
-# enable only secure protocols: SSLv3 and TLSv1, but not SSLv2
-SSLProtocol all -SSLv2
-
-
diff --git a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/ssl.load b/sw/in_progress/pow/ServletPow/conf apache2/mods_available/ssl.load
deleted file mode 100755
index ff861daab5..0000000000
--- a/sw/in_progress/pow/ServletPow/conf apache2/mods_available/ssl.load
+++ /dev/null
@@ -1 +0,0 @@
-LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
diff --git a/sw/in_progress/pow/ServletPow/conf apache2/ports.conf b/sw/in_progress/pow/ServletPow/conf apache2/ports.conf
deleted file mode 100755
index 7830895dc0..0000000000
--- a/sw/in_progress/pow/ServletPow/conf apache2/ports.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-# If you just change the port or add more ports here, you will likely also
-# have to change the VirtualHost statement in
-# /etc/apache2/sites-enabled/000-default
-# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
-# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
-# README.Debian.gz
-
-#NameVirtualHost *:80
-Listen 80
-
-
- # If you add NameVirtualHost *:443 here, you will also have to change
- # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
- # to
- # Server Name Indication for SSL named virtual hosts is currently not
- # supported by MSIE on Windows XP.
- Listen 443
-
-
-
- Listen 443
-
-
diff --git a/sw/in_progress/pow/ServletPow/conf apache2/sites-available/default b/sw/in_progress/pow/ServletPow/conf apache2/sites-available/default
deleted file mode 100755
index 0559ce148e..0000000000
--- a/sw/in_progress/pow/ServletPow/conf apache2/sites-available/default
+++ /dev/null
@@ -1,42 +0,0 @@
-NameVirtualHost *:80
-
- ServerAdmin webmaster@localhost
-
- DocumentRoot /var/www
-
- Options FollowSymLinks
- AllowOverride None
-
-
- Options Indexes FollowSymLinks MultiViews
- AllowOverride None
- Order allow,deny
- allow from all
-
-
- ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
-
- AllowOverride None
- Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
- Order allow,deny
- Allow from all
-
-
- ErrorLog /var/log/apache2/error.log
-
- # Possible values include: debug, info, notice, warn, error, crit,
- # alert, emerg.
- LogLevel warn
-
- CustomLog /var/log/apache2/access.log combined
-
- Alias /doc/ "/usr/share/doc/"
-
- Options Indexes MultiViews FollowSymLinks
- AllowOverride None
- Order deny,allow
- Deny from all
- Allow from 127.0.0.0/255.0.0.0 ::1/128
-
-
-
diff --git a/sw/in_progress/pow/ServletPow/conf apache2/sites-available/powV2_ssl b/sw/in_progress/pow/ServletPow/conf apache2/sites-available/powV2_ssl
deleted file mode 100755
index 7a4efcaca3..0000000000
--- a/sw/in_progress/pow/ServletPow/conf apache2/sites-available/powV2_ssl
+++ /dev/null
@@ -1,42 +0,0 @@
-
-NameVirtualHost *:443
-
-
- ServerAdmin admin@pow.fr
- ServerName blanc
-
- LogLevel warn
-
- CustomLog /var/log/apache2/access.log combined
- ServerSignature On
-
- SSLEngine on
- SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
- #SSLCertificateFile /etc/ssl/private/serveur.cert
- #SSLCertificateKeyFile /etc/ssl/private/serveur.key
- #SSLCACertificateFile /etc/ssl/private/ca-root.cert
- SSLCertificateFile /etc/ssl/server.crt
- SSLCertificateKeyFile /etc/ssl/server.key
- SSLCACertificatePath /etc/ssl
-
-#SSLVerifyClient optional_no_ca
-#SSLOptions +ExportCertData +StdEnvVars
- SetEnvIf User-Agent ".*MSIE.*" \
- nokeepalive ssl-unclean-shutdown \
- downgrade-1.0 force-response-1.0
-
- JkExtractSSL On
- JkOptions +FlushPackets
- JkOptions +FlushHeader
- JkMount /ServletPow worker1
- JkMount /ServletPow/* worker1
- JkMount /examples/* worker1
- JkMount /examples worker1
-
-#Redirect https://www.recherche.enac.fr/TestServletPow https://www.recherche.enac.fr/evaluation/TestServletPow
-
-
-
-
-
-
diff --git a/sw/in_progress/pow/ServletPow/conf apache2/workers.properties b/sw/in_progress/pow/ServletPow/conf apache2/workers.properties
deleted file mode 100755
index 996a10559b..0000000000
--- a/sw/in_progress/pow/ServletPow/conf apache2/workers.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-workers.tomcat_home=/users/genin/apache-tomcat-6.0.26
-
-workers.java_home=/usr/lib/jvm/java-6-sun
-ps=/
-worker.list=worker1
-worker.worker1.port=8009
-worker.worker1.host=localhost
-worker.worker1.type=ajp13
-worker.worker1.lbfactor=1
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.classpath b/sw/in_progress/pow/ServletPow/eclipse ServletPow/.classpath
deleted file mode 100755
index fd0f78ce42..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.classpath
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.project b/sw/in_progress/pow/ServletPow/eclipse ServletPow/.project
deleted file mode 100755
index 3470d17f2e..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
- ServletPow
-
-
-
-
-
- org.eclipse.wst.jsdt.core.javascriptValidator
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.wst.common.project.facet.core.builder
-
-
-
-
- org.eclipse.wst.validation.validationbuilder
-
-
-
-
-
- org.eclipse.jem.workbench.JavaEMFNature
- org.eclipse.wst.common.modulecore.ModuleCoreNature
- org.eclipse.wst.common.project.facet.core.nature
- org.eclipse.jdt.core.javanature
- org.eclipse.wst.jsdt.core.jsNature
-
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/.jsdtscope b/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/.jsdtscope
deleted file mode 100755
index bbb8e68be8..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/.jsdtscope
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.jdt.core.prefs b/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100755
index 420b6fb9b2..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Tue Apr 20 15:09:25 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.common.component b/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.common.component
deleted file mode 100755
index 72dafadb28..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.common.project.facet.core.xml b/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100755
index 53d628c892..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.jsdt.ui.superType.container b/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100755
index 3bd5d0a480..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.jsdt.ui.superType.name b/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100755
index 05bd71b6ec..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/design.css b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/design.css
deleted file mode 100755
index c982ac6974..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/design.css
+++ /dev/null
@@ -1,220 +0,0 @@
-body
-{
- background-color: #CCFFCC;
- margin: 0%;
- padding: 0%;
- outline: 0%;
- height: 100%;
- overflow:hidden;
- max-width:2048px;
- font-size : 11;
-}
-
-select{
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
- vertical-align: middle;
- background-color: #F5F5DC;
-}
-input {
- background-color:#F5F5DC;
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 10px;
-}
-
-label {
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-#welcome
-{
- position:absolute;
- top:0;
- left:0;
- height:3%;
- width: 100%;
- background-color: #EEEEEE;
- text-align: center;
- font-weight:bold;
- font-size : 12;
-}
-#usr
-{
- position:absolute;
- top:0;
- right:6%;
- height:3%;
- width:25%;
- background-color: #EEEEEE;
- text-align: right;
- white-space:nowrap;
-}
-#page
-{
-position:absolute;
-top:3%;
-left:0;
-height:97%;
-width: 100%;
-}
-
-
-#choicePanel{
- position:absolute;
- top:0%;
- left:0%;
- height: 13%;
- width : 15%;
- background-color: #EEEEEE;
- border: 1px solid black;
-}
-
-#aircraftSelector
-{
- text-align: center;
- background-color: #EEEEEE;
-}
-
-#trackdiv
-{
- text-align: center;
- background-color: #EEEEEE;
- -moz-border-radius: 7px 7px 7px 7px;
- -webkit-border-radius: 7px 7px 7px 7px;
- border-radius: 7px 7px 7px 7px;
- -webkit-border-top-left-radius: 7px; /* pour Chrome */
- -webkit-border-top-right-radius: 7px; /* pour Chrome */
- -webkit-border-bottom-left-radius: 7px; /* pour Chrome */
- -webkit-border-bottom-right-radius: 7px; /* pour Chrome */
- width: 140px;
- color: white;
- vertical-align:middle;
-}
-
-#active_block
-{
- font-size:11;
- text-align: center;
-}
-
-#FlightPlan
-{
- overflow:auto;
- position:absolute;
- top:0%;
- left:15%;
- height: 40%;
- width : 14.9%;
- background-color: #EEEEEE;
- border: 1px solid black;
-}
-
-#FlightParams
-{
- position:absolute;
- top:13%;
- left :0%
- text-align: center;
- height: 27%;
- width : 14.9%;
- border: 1px solid black;
- background-color: #EEEEEE;
-}
-
-#map_canvas
-{
- position:absolute;
- top:0;
- left:30%;
- width:70%;
- height: 95%;
- border:1px solid black;
-}
-
-
-#Settings
-{
- overflow:auto;
- position:absolute;
- left:0%;
- top:40%;
- text-align: left;
- height: 55%;
- width: 29.9%;
- background-color: #EEEEEE;
- border: 1px solid black;
-}
-
-#page_setting {
-
-}
-
-#setting {
- width: 400px;
- height: 250px;
- padding: 0.5em;
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 8;
-}
-#param
-{
- overflow:auto;
-}
-
-#NewsDiv
-{
- position:absolute;
- overflow:auto;
- left:0%;
- top:95%;
- height: 5%;
- width: 100%;
- text-align: left;
- vertical-align:top;
- background-color: #EEEEEE;
- border: 1px solid black;
-}
-
-#info
-{
- text-align: left;
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-#Debug
-{
- overflow:auto;
- position:absolute;
- left:65%;
- top:50%;
- text-align: center;
- height: 50%;
- width: 35%;
- background-color: #EEEEEE;
- border: 1px solid black;
- padding-top:20px;
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-#title{
- font-weight:bold;
- font-size:18;
- text-align:center;
-}
-
-table.param {
-border:3px solid #6495ed;
-border-collapse:collapse;
-width:90%;
-margin:auto;
-}
-td.param {
-font-family:sans-serif;
-font-size:11px;
-border:1px solid #6495ed;
-padding:5px;
-text-align:left;
-}
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designHelp.css b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designHelp.css
deleted file mode 100755
index e8fcfd7a3d..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designHelp.css
+++ /dev/null
@@ -1,21 +0,0 @@
-body
-{
- width: 90%;
- margin-top: 5px;
- margin-bottom: 5px;
- margin-left:5%;
- margin-reight:5%;
- background-color: #CCFFCC;
- text-align:justify;
-}
-
-h3,h2
-{
- color : navy;
- text-align:center;
- text-decoration:underline;
-}
-#problem
-{
- color:red;
-}
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designLogOut.css b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designLogOut.css
deleted file mode 100755
index c6ce91f1e9..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designLogOut.css
+++ /dev/null
@@ -1,12 +0,0 @@
-body
-{
- background-color: #CCFFCC;
- margin-top: 2%;
- padding: 0%;
- outline: 0%;
- height: 100%;
- overflow:hidden;
- max-width:2048px;
- text-align:center;
- font-size:24px;
-}
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designWelcome.css b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designWelcome.css
deleted file mode 100755
index fe096f7074..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designWelcome.css
+++ /dev/null
@@ -1,30 +0,0 @@
-body
-{
- width: 960px;
- margin-top: 100px;
- margin-bottom: 5px;
- background-image: url("Icons/logo.png");
- background-repeat:no-repeat;
- background-color: #CCFFCC;
-
-}
-
-#signIn
-{
- margin: auto;
- width: 300px;
- height: 140px;
- border: 1px solid black;
-}
-
-#log
-{
- margin-left: 30px;
-}
-
-a
-{
- position:absolute;
- right:1%;
- top:80%;
-}
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/design_admin.css b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/design_admin.css
deleted file mode 100755
index 867056a7a6..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/design_admin.css
+++ /dev/null
@@ -1,99 +0,0 @@
-body {
- background-color: #EEEEEE;
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-select{
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
- vertical-align: middle;
- background-color: #F5F5DC;
-}
-input {
- border:1px solid black;
- background-color:#F5F5DC;
- font-size: 11px;
-}
-
-label {
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-span {
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-td {
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-#title {
- position : absolute;
- top : 0%;
- left : 0%;
- height : 5%;
- width : 100%;
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- text-align : right;
- font-size : 11px;
- background-color: #BC8F8F;
- border: 1px solid black;
-}
-
-#page {
- position : absolute;
- top : 15%;
- left : 15%;
- width : 70%;
- height : 65%;
- border: 1px solid black;
- background-color: #EEEEEE;
-}
-
-
-#modifImmat {
- position : absolute;
- top : 15%;
-}
-
-
-#modifPwd {
- position : absolute;
- top : 15%;
-}
-
-
-#modifRight {
- position : absolute;
- top : 15%;
-}
-
-#modifyUser {
- position : absolute;
- top : 15%;
-}
-
-#createUser {
- position : absolute;
- top : 15%;
-}
-
-#mainForm {
- position : absolute;
- top : 15%;
-}
-
-
-#createIvyUser {
- position : absolute;
- top : 15%;
-}
-
-#listIvyUser {
- position : absolute;
- top : 15%;
-}
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designbackup.css b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designbackup.css
deleted file mode 100755
index b00585c71d..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/designbackup.css
+++ /dev/null
@@ -1,87 +0,0 @@
-body
-{
- background-color: #CCFFCC;
- margin: 0%;
- padding: 0%;
- outline: 0%;
- height: 95%;
-}
-#page
-{
- width: 100%;
- height: 95%;
-}
-
-#logo
-{
- width: 960px;
- height: 100px;
- background-image: url("banniere.jpg");
- background-repeat: repeat-x;
- margin-bottom: 10px;
-}
-
-#leftmenu
-{
- /* float: left; /* Le menu flottera à gauche */
- /* width: 120px; *//* Très important : donner une taille au menu */
-}
-#welcome
-{
- text-align: center;
- background-color: #EEEEEE;
- border: 2px solid black;
- margin-bottom: 10px; /* Pour éviter que les éléments du menu ne soient trop collés */
-}
-#choice
-{
-float: left;
- text-align: center;
- background-color: #EEEEEE;
- border: 2px solid black;
- height: 190px;
- width: 20px;
-}
-#map_canvas
-{
- width: 690px;
- height: 350px;
- margin-left: 125px;
-}
-
-#FlightPlan
-{
- float: right;
- width: 135px; /* Très important : donner une taille au menu */
- height: 345px;
- border: 2px solid black;
- background-color: #EEEEEE;
-}
-
-
-
-#ControlPanel
-{
- float: left;
- text-align: center;
- height: 150px;
- width: 600px;
- border: 2px solid black;
- background-color: #EEEEEE;
-}
-#FlightParams
-{
- text-align: center;
- float: right;
- height: 150px;
- width: 350px;
- border: 2px solid black;
- background-color: #EEEEEE;
-}
-table
-{
- margin-left: 20px;
- margin-bottom: 20px;
-}
-
-
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/dtree.css b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/dtree.css
deleted file mode 100755
index b201c2fd60..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/dtree.css
+++ /dev/null
@@ -1,34 +0,0 @@
-/*--------------------------------------------------|
-| dTree 2.05 | www.destroydrop.com/javascript/tree/ |
-|---------------------------------------------------|
-| Copyright (c) 2002-2003 Geir Landrö |
-|--------------------------------------------------*/
-
-.dtree {
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
- color: #666;
- white-space: nowrap;
-}
-.dtree img {
- border: 0px;
- vertical-align: middle;
-}
-.dtree a {
- color: #333;
- text-decoration: none;
-}
-.dtree a.node, .dtree a.nodeSel {
- white-space: nowrap;
- padding: 1px 2px 1px 2px;
-}
-.dtree a.node:hover, .dtree a.nodeSel:hover {
- color: #333;
- text-decoration: underline;
-}
-.dtree a.nodeSel {
- background-color: #c0d2ec;
-}
-.dtree .clip {
- overflow: hidden;
-}
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/tab.css b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/tab.css
deleted file mode 100755
index 2e9043ed76..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/tab.css
+++ /dev/null
@@ -1,110 +0,0 @@
-/* $Id: example.css,v 1.5 2006/03/27 02:44:36 pat Exp $ */
-
-/*--------------------------------------------------
- REQUIRED to hide the non-active tab content.
- But do not hide them in the print stylesheet!
- --------------------------------------------------*/
-.tabberlive .tabbertabhide {
- display:none;
-}
-
-/*--------------------------------------------------
- .tabber = before the tabber interface is set up
- .tabberlive = after the tabber interface is set up
- --------------------------------------------------*/
-.tabber {
-}
-.tabberlive {
- margin-top:1em;
-}
-
-/*--------------------------------------------------
- ul.tabbernav = the tab navigation list
- li.tabberactive = the active tab
- --------------------------------------------------*/
-ul.tabbernav
-{
- margin:0;
- padding: 3px 0;
- border-bottom: 1px solid #778;
- font: bold 12px Verdana, sans-serif;
-}
-
-ul.tabbernav li
-{
- list-style: none;
- margin: 0;
- display: inline;
-}
-
-ul.tabbernav li a
-{
- padding: 3px 0.5em;
- margin-left: 3px;
- border: 1px solid #778;
- border-bottom: none;
- background: #DDE;
- text-decoration: none;
-}
-
-ul.tabbernav li a:link { color: #448; }
-ul.tabbernav li a:visited { color: #667; }
-
-ul.tabbernav li a:hover
-{
- color: #000;
- background: #AAE;
- border-color: #227;
-}
-
-ul.tabbernav li.tabberactive a
-{
- background-color: #fff;
- border-bottom: 1px solid #fff;
-}
-
-ul.tabbernav li.tabberactive a:hover
-{
- color: #000;
- background: white;
- border-bottom: 1px solid white;
-}
-
-/*--------------------------------------------------
- .tabbertab = the tab content
- Add style only after the tabber interface is set up (.tabberlive)
- --------------------------------------------------*/
-.tabberlive .tabbertab {
- padding:5px;
- border:1px solid #aaa;
- border-top:0;
-
- /* If you don't want the tab size changing whenever a tab is changed
- you can set a fixed height */
-
- /* height:200px; */
-
- /* If you set a fix height set overflow to auto and you will get a
- scrollbar when necessary */
-
- /* overflow:auto; */
-}
-
-/* If desired, hide the heading since a heading is provided by the tab */
-.tabberlive .tabbertab h2 {
- display:none;
-}
-.tabberlive .tabbertab h3 {
- display:none;
-}
-
-/* Example of using an ID to set different styles for the tabs on the page */
-.tabberlive#tab1 {
-}
-.tabberlive#tab2 {
-}
-.tabberlive#tab2 .tabbertab {
- height:200px;
- overflow:auto;
-}
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-anim_basic_16x16.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-anim_basic_16x16.gif
deleted file mode 100755
index 085ccaecaf..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-anim_basic_16x16.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
deleted file mode 100755
index 954e22dbd9..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
deleted file mode 100755
index 64ece5707d..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
deleted file mode 100755
index abdc01082b..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_flat_10_000000_40x100.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
deleted file mode 100755
index 9b383f4d2e..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
deleted file mode 100755
index a23baad25b..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
deleted file mode 100755
index 42ccba269b..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
deleted file mode 100755
index 39d5824d6a..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
deleted file mode 100755
index f1273672d2..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
deleted file mode 100755
index 359397acff..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_222222_256x240.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_222222_256x240.png
deleted file mode 100755
index b273ff111d..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_222222_256x240.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_228ef1_256x240.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_228ef1_256x240.png
deleted file mode 100755
index c357355aa7..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_228ef1_256x240.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_ef8c08_256x240.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_ef8c08_256x240.png
deleted file mode 100755
index 85e63e9f60..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_ef8c08_256x240.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_ffd27a_256x240.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_ffd27a_256x240.png
deleted file mode 100755
index e117effa3d..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_ffd27a_256x240.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_ffffff_256x240.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_ffffff_256x240.png
deleted file mode 100755
index 42f8f992c7..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/images/ui-icons_ffffff_256x240.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/jquery-ui-1.8.2.custom.css b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/jquery-ui-1.8.2.custom.css
deleted file mode 100755
index 312dd8043e..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/CSS/ui-lightness/jquery-ui-1.8.2.custom.css
+++ /dev/null
@@ -1,489 +0,0 @@
-/*
-* jQuery UI CSS Framework
-* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
-* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
-*/
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
-
-
-/*
-* jQuery UI CSS Framework
-* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
-* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
-* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
-*/
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
-.ui-widget-content a { color: #333333; }
-.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
-.ui-widget-header a { color: #ffffff; }
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; }
-.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
-.ui-widget :active { outline: none; }
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
-
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
-.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
-
-/* Overlays */
-.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
-.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* Resizable
-----------------------------------*/
-.ui-resizable { position: relative;}
-.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
-.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
-.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
-.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
-.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
-.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
-.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
-.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
-.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
-.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Selectable
-----------------------------------*/
-.ui-selectable-helper { border:1px dotted black }
-/* Accordion
-----------------------------------*/
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
-.ui-accordion .ui-accordion-li-fix { display: inline; }
-.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
-/* IE7-/Win - Fix extra vertical space in lists */
-.ui-accordion a { zoom: 1; }
-.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
-.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
-.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
-.ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete
-----------------------------------*/
-.ui-autocomplete { position: absolute; cursor: default; }
-.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
-
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-
-/* Menu
-----------------------------------*/
-.ui-menu {
- list-style:none;
- padding: 2px;
- margin: 0;
- display:block;
-}
-.ui-menu .ui-menu {
- margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
- margin:0;
- padding: 0;
- zoom: 1;
- float: left;
- clear: left;
- width: 100%;
-}
-.ui-menu .ui-menu-item a {
- text-decoration:none;
- display:block;
- padding:.2em .4em;
- line-height:1.5;
- zoom:1;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
- font-weight: normal;
- margin: -1px;
-}
-/* Button
-----------------------------------*/
-
-.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
-.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
-button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
-.ui-button-icons-only { width: 3.4em; }
-button.ui-button-icons-only { width: 3.7em; }
-
-/*button text element */
-.ui-button .ui-button-text { display: block; line-height: 1.4; }
-.ui-button-text-only .ui-button-text { padding: .4em 1em; }
-.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
-.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
-.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
-/* no icon support for input elements, provide padding by default */
-input.ui-button { padding: .4em 1em; }
-
-/*button icon element(s) */
-.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
-.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
-.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
-.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-
-/*button sets*/
-.ui-buttonset { margin-right: 7px; }
-.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
-
-/* workarounds */
-button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
-
-
-
-
-
-/* Dialog
-----------------------------------*/
-.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
-.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
-.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
-.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
-.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
-.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
-.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
-.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
-.ui-draggable .ui-dialog-titlebar { cursor: move; }
-/* Slider
-----------------------------------*/
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 0.8em; height: 0.8em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
-----------------------------------*/
-.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
-.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
-.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
-.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
-.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
-.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
-.ui-tabs .ui-tabs-hide { display: none !important; }
-/* Datepicker
-----------------------------------*/
-.ui-datepicker { width: 17em; padding: .2em .2em 0; }
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
-.ui-datepicker .ui-datepicker-next-hover { right:1px; }
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
-.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month,
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; }
-
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
- display: none; /*sorry for IE5*/
- display/**/: block; /*sorry for IE5*/
- position: absolute; /*must have*/
- z-index: -1; /*must have*/
- filter: mask(); /*must have*/
- top: -4px; /*must have*/
- left: -4px; /*must have*/
- width: 200px; /*must have*/
- height: 200px; /*must have*/
-}/* Progressbar
-----------------------------------*/
-.ui-progressbar { height:2em; text-align: left; }
-.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/E.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/E.png
deleted file mode 100755
index c54150820a..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/E.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/N.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/N.png
deleted file mode 100755
index b7a747cd39..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/N.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/NE.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/NE.png
deleted file mode 100755
index 14d39ae0f0..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/NE.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/NW.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/NW.png
deleted file mode 100755
index e57382d0d4..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/NW.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/S.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/S.png
deleted file mode 100755
index edeabb494d..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/S.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/SE.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/SE.png
deleted file mode 100755
index e2e35ba552..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/SE.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/SW.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/SW.png
deleted file mode 100755
index 71f3be47ae..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/SW.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/W.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/W.png
deleted file mode 100755
index baa74b59ad..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/W.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/arrow.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/arrow.png
deleted file mode 100755
index 3a004f60b5..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/arrow.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/arrow2.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/arrow2.png
deleted file mode 100755
index d2cae73712..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/arrow2.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/blue-dot.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/blue-dot.png
deleted file mode 100755
index 98b280d301..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/blue-dot.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/favicon.ico b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/favicon.ico
deleted file mode 100755
index 7cd42a2755..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/favicon.ico and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/logo.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/logo.png
deleted file mode 100755
index 032f6d16e7..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/logo.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/losange.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/losange.gif
deleted file mode 100755
index dfadf2d823..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/losange.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/losange.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/losange.png
deleted file mode 100755
index 0786209c39..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/losange.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/red-dot.png b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/red-dot.png
deleted file mode 100755
index b0f3f0e928..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Icons/red-dot.png and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Interface.jsp b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Interface.jsp
deleted file mode 100755
index 3ef63cc678..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/Interface.jsp
+++ /dev/null
@@ -1,1943 +0,0 @@
-<%@page import="pow.webserver.Conf,java.util.StringTokenizer,java.util.NoSuchElementException" %>
-
-<%
- if (session.getAttribute("login")==null) {
- out.println("");
- }
-%>
-
-
-
-
-
-
-
- POW
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ");
- }
- else {
- String login = ((String) (session.getAttribute("login"))).toString();
- String right = ((String) (session.getAttribute("rights"))).toString();
- if (right.equals("visitor"))
- { out.println("var usr_right=\"visitor\";");
- out.println("var usr_login=\"nologged\";");
- }
- else if (right.equals("admin"))
- {
- out.println("var usr_right=\"admin\";");
- out.println("var usr_login=\""+login+"\";");
- }
- else if (right.equals("user")){ // gestion de la liste des drones controlables
- out.println("var usr_right=\"user\";");
- out.println("var usr_login=\""+login+"\";");
- out.println("var drone_ctl=new Array();");
- String droneCtl = ((String) (session.getAttribute("dronectl"))).toString();
- StringTokenizer st = new StringTokenizer(droneCtl,";");
- String d;
- for(int i = 0 ; i< st.countTokens() ;i++){
- d=st.nextToken();
- out.println("drone_ctl[\""+ d +"\"]=1;");
- }
- try{
- while (st.hasMoreTokens()) {
- d=st.nextToken();
- }
- }
- catch (NoSuchElementException ex){}
-
- }
- }
- String default_folder = this.getServletConfig().getServletContext().getRealPath("");
- Conf myconf =new Conf(default_folder,"pow_conf.xml");
- out.println("//10sec after plane_die event remove drone");
- out.println("var dieEventTimeoutTime = "+myconf.getDieEventTimeoutTime()+";");
- out.println("//5sec without any position data about a drone remove drone");
- out.println("var dataEventTimeoutTime = "+myconf.getDataEventTimeoutTime()+";");
- out.println("// time to wait before order was cancelled");
- out.println("var order_response_timeout = "+myconf.getOrderResponseTimeout()+";");
- %>
- var noPlaneBefore=true; // pour initialiser au premier push flight param
- var ajax_url = "ajaxRqst.srv";
-/* ********** drone state timeout ******** */
- var droneStateDieEvent = new Array(); // timeout en cas d'event die
- var droneStateDataEvent = new Array(); // timeout en cas de non evenement data
- var waypoint_modif = new Array(); //
- var block_jump_timeout=-1;
- var setting_change_timeout=-1;
- var setting_to_change_id=-1;
-/* *************************************************************************** Global variables *************************************************************************************** */
- var map;
-
- var planes = new Array();
- var nb_planes =0;
- var markers = new Array();
- var markers_color = new Array(); // stock les balises de couleurs de chaque drone
- var diametre_drone_balise = 50; //50m de base
- var selected_plane = "";
- var selected_plane_id = 0;
- var selected_index=0;
- var tracking = false;
-
-/* *******************Flight Plan variables :******************** */
- var waypoints = new Array();
- var waypoint_tmp = null;
- var index_wpt = 0;
- var blocks= new Array();
- var index_block = 0;
- var active_block_id=0;
- var active_block_name="";
- var fpl_name="";
- var lat0=0;
- var lon0=0;
- var fpl_alt=0;
- var security_height=0;
- var fpl_ground_alt=0;
- var max_dist=0;
-
-
-/* ********************Planes and waypoints icons******************** */
- var plane_icons = new Array();
- for (var i=0;i<8;i++){
- plane_icons[i] = new GIcon();
- plane_icons[i].shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
- plane_icons[i].iconSize = new GSize(60,60);
- plane_icons[i].shadowSize = new GSize(22, 20);
- plane_icons[i].infoWindowAnchor = new GPoint(50, 1);
- plane_icons[i].iconAnchor = new GPoint(30, 30);
- }
- plane_icons[0].image="Icons/N.png";
- plane_icons[1].image="Icons/NE.png";
- plane_icons[2].image="Icons/E.png";
- plane_icons[3].image="Icons/SE.png";
- plane_icons[4].image="Icons/S.png";
- plane_icons[5].image="Icons/SW.png";
- plane_icons[6].image="Icons/W.png";
- plane_icons[7].image="Icons/NW.png";
-
- var wpt_icon=new GIcon();
- wpt_icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
- wpt_icon.iconSize = new GSize(20,20);
- wpt_icon.shadowSize = new GSize(22, 20);
- wpt_icon.infoWindowAnchor = new GPoint(8, 1);
- wpt_icon.iconAnchor = new GPoint(6, 20);
- //wpt_icon.image="Icons/losange.png";
- wpt_icon.image="Icons/blue-dot.png";
-
- var iconMarkerTemp=new GIcon();
- iconMarkerTemp.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
- iconMarkerTemp.iconSize = new GSize(20,20);
- iconMarkerTemp.shadowSize = new GSize(22, 20);
- iconMarkerTemp.infoWindowAnchor = new GPoint(8, 1);
- iconMarkerTemp.iconAnchor = new GPoint(6, 20);
- iconMarkerTemp.image="Icons/red-dot.png";
-/* *************************************************************************** Functions **************************************************************************************************** */
-
-/* ************ prevent user from going back to this page by browser's forward button****************************** */
-
-function backButtonOverride()
-{
- // Work around a Safari bug
- // that sometimes produces a blank page
- setTimeout("backButtonOverrideBody()", 1);
-
-}
-
-function backButtonOverrideBody()
-{
- // Works if we backed up to get here
- try {
- history.forward();
- } catch (e) {
- // OK to ignore
- }
- // Every quarter-second, try again. The only
- // guaranteed method for Opera, Firefox,
- // and Safari, which don't always call
- // onLoad but *do* resume any timers when
- // returning to a page
- setTimeout("backButtonOverrideBody()", 500);
-}
-/* ******************* Useful functions ******************** */
-// Gets an element of the html document by its class name
- function getElementsByClass(tag, className){
- var elements = document.getElementsByTagName(tag);
- var results = new Array();
- for(var i=0; i< elements.length; i++){
- if(elements[i].className == className){
- results[results.length] = elements[i];
- }
- }
- return results;
- }
-
-
- function pause(time){
- d=new Date();
- diff=0;
- while(diff < time){
- n=new Date();
- diff=n-d;
- }
- }
-
-
- //Creates a GoogleMaps marker
-
-
-
-
- function createMarker(point, legend, icon){
- var marker = new GMarker(point, icon);
- GEvent.addListener(marker, 'click', function() {
- marker.openInfoWindowHtml(legend);
- });
- return marker;
- }
-
- var old_lat;
- var old_lon;
- //Creates a draggable marker with an EventListener
- function createDraggableMarker(point,namewpt,wpt_icon,index_wpt, bool){
- var fpl_file_name="upload/"+planes[selected_index]["id"]+"/flight_plan.xml";
- var marker = new GMarker(point,{legend: namewpt,icon: wpt_icon,draggable: bool,bouncy:true});
- //var marker = new GMarker(point,{title: name,draggable: bool});
- //var marker = new GMarker(point,{draggable: bool});
- GEvent.addListener(marker, 'click', function() {
- marker.openInfoWindowHtml(namewpt);
- });
- if (bool){
- GEvent.addListener(marker, 'dragend', function(latlng) {
- if (latlng){
- //alert("id wpt="+index_wpt+" name=" +namewpt+" lat="+latlng.lat()+" lon="+latlng.lng());
- var lat = latlng.lat();
- var lon = latlng.lng();
- moveWpt(selected_plane_id,namewpt,lat,lon,false,true,index_wpt);
- }
- });
-
- GEvent.addListener(marker, 'dragstart', function(latlng) {
- if (latlng){
- old_lat=latlng.lat();
- old_lon=latlng.lng();
- }
- });
- }
-
- return marker;
- }
-
-
-
-
-
-//Converts ditances from (lat0,lon0) given in meters into latitudes or longitudes, and vice versa
- function xMetersToDegrees(x,lat0){
- return (x/1852/60+parseFloat(lat0));
- }
- function yMetersToDegrees(y,lat,lon0){
- return (y/1852/60*Math.cos(lat)+parseFloat(lon0));
- }
-
- function xDegreesToMeters(lat,lat0){
- return((lat-lat0)*1852*60);
- }
- function yDegreesToMeters(lat,lon,lon0){
- return(lat!=0?(lon-lon0)/Math.cos(lat)*1852*60:0);
- }
-
-
- function name_from_id(id){
- var match=false;
- for (var i=0;i< planes.length;i++){
- if(planes[i]["id"]==id){match=true;break;}
- }
- if (match){
- return (planes[i]["name"]);
- }else{
- return (null);
- }
- }
- /* *************** JQUERY stuffs ***************************** */
- $(function(){
- //init();
- //$("#Settings").draggable();$("#Settings").resizable();
- //$("#map_canvas").draggable();$("#map_canvas").resizable();
- //$("#Debug").draggable();$("#Debug").resizable();
- //$("#choicePanel").draggable();$("#choicePanel").resizable();
- //$("#FlightPlan").draggable();$("#FlightPlan").resizable();
- //$("#FlightParams").draggable();$("#FlightParams").resizable();
- });
-/* ********************* Fonctions de Push ******************** */
-
- function initialize_push() {
- // alert('go');
- p_join_listen(null, 'stream');
- // TODO il faudra gerer le cas ou cela bloque !!!! et passer en pull
- // p_join_listen(null, 'pull');
- p_subscribe('/data/drone/iskill', 'msg from serveur');
- p_subscribe('/data/drones_maj', 'msg from serveur');
- p_subscribe('/data/order/waypoint_moved', 'msg from serveur');
- p_subscribe('/data/order/change_setting', 'msg from serveur');
- p_subscribe('/data/order/plane_die', 'msg from serveur');
- p_subscribe('/data/order/plane_resurect', 'msg from serveur');
- p_subscribe('/data/order/new_plane', 'msg from serveur');
- p_subscribe('/data/order/block_changed', 'msg from serveur');
- p_subscribe('/data/order/other', 'msg from serveur');
- p_subscribe('/data/order/settings', 'msg from serveur');
-
- p_subscribe('/chat','msg from web client');
- p_subscribe('/client_action','action from web client');
- }
-
- function initialize_push_pullmode() {
-
- p_join_listen(null, 'pull');
- p_subscribe('/data/drone/iskill', 'msg from serveur');
- p_subscribe('/data/drones_maj', 'msg from serveur');
- p_subscribe('/data/order/waypoint_moved', 'msg from serveur');
- p_subscribe('/data/order/change_setting', 'msg from serveur');
- p_subscribe('/data/order/plane_die', 'msg from serveur');
- p_subscribe('/data/order/plane_resurect', 'msg from serveur');
- p_subscribe('/data/order/new_plane', 'msg from serveur');
- p_subscribe('/data/order/block_changed', 'msg from serveur');
- p_subscribe('/data/order/other', 'msg from serveur');
- p_subscribe('/data/order/settings', 'msg from serveur');
-
- p_subscribe('/chat','msg from web client');
- p_subscribe('/client_action','action from web client');
- }
-
- function displayControl(aString) {
- document.debugEventDisplay.event.value = aString;
- }
- // callback on data Events
- // call apropirate function according to the received event
-
- function onData(event) {
- var subject = event.get('p_subject');
-
- // displayControl(""+ event.toString());
-
- if (subject=="/data/drones_maj") { handleDronePositionUpsate(event);}
- else if (subject =="/data/order/waypoint_moved") {orderprocessing_waypoint(event);}
- else if (subject =="/data/order/block_changed") {orderprocessing_jump2block(event);}
- else if (subject =="/data/order/change_setting") {orderprocessing_setting(event);}
- else if (subject =="/data/order/plane_die") {orderprocessing_planedie(event);}
- else if (subject =="/data/order/plane_resurect"){orderprocessing_planeressurect(event);}
- else if (subject =="/data/order/new_plane") {orderprocessing_newplane(event);}
- else if (subject =="/data/drone/iskill") {orderprocessing_planekilled(event);}
- else if (subject =="/data/order/settings") {orderprocessing_csv_settings(event);}
- else if (subject =="/chat") {orderprocessing_chat(event);}
- else if (subject =="/client_action") {orderprocessing_client_action(event);}
- }
-
- // callback on all other kind of Events
-
- <%--function onEvent(event) {
- var subject = event.get('p_subject');
- displayControl("EVENT CALLBACK "+subject+"\n" + event.toString());
-
-
- }
- --%>
-/* ********************* initilization de l'interface ******************* */
- function initialize_display(){
- var aircraftList = document.getElementById("aircraftForm").aircraftList;
- if (nb_planes ==0)//If there is no active aircraft, the list only has one option : No aircraft
- {aircraftList.options[0]=new Option("No aircraft");}
-}
-
-/* *********************functions to check airplanes ******************* */
-
-/* *********************Processing events ******************* */
- // recherche si l'id de l'avion est deja present dans le tableau des drones deja
- function handleDronePositionUpsate(event){
- if (planes.length==0) {noPlaneBefore=true;}
- var id = parseInt(event.get('aircraftId'));
- var match=false;
- var insert=false;
- var aircraftList = document.getElementById("aircraftForm").aircraftList;
- nb_planes=planes.length;
- for (var i=0;i< nb_planes;i++){
- if(planes[i]["id"]> id){insert=true;break;} // on garde le tableau trié
- if (planes[i]["id"]==id){match=true;break;} // on recupere en i le drone correspondant à id
- }
- if(!match){
- var k=0;
- if(insert){ // on insert au milieu
- k=i;
- planes.splice(i,0,new Array());
- markers.splice(i,0,null);
- markers_color.splice(i,0,null);
- // on insere l'aircraft dan sla liste deroulante
- //see http://www.mredkj.com/tutorials/tutorial005.html
- var elOptNew = document.createElement('option');
- elOptNew.text = event.get('dbName')
- var elOptOld = aircraftList.options[i];
- try {
- aircraftList.add(elOptNew, elOptOld); // standards compliant; doesn't work in IE
- }
- catch(ex) {
- aircraftList.add(elOptNew, i); // IE only
- }
- }else{ // on met à la fin du tableau
- k=planes.length;
- planes[k] = new Array();
- markers[k]= null; // inutile
- markers_color[k]=null;
- aircraftList.options[k]=new Option(event.get('dbName'));
- }
- droneStateDieEvent[k] = -1; // init un timeout vide
- //
- planes[k]["id"]=id;
- planes[k]["name"] =event.get('dbName');
- planes[k]["lat"] = event.get('dbLatitude');
- planes[k]["lon"] = event.get('dbLongitude');
- planes[k]["heading"]= event.get('dbCourse');
- // maj des param pour selected acrf
- planes[k]["speed"]= event.get('dbSpeed');
- planes[k]["altitude"]= event.get('dbAmsl');
- planes[k]["vspeed"]= event.get('dbVert_speed');
- planes[k]["height"]= event.get('dbAgl');
- planes[k]["battery"]= event.get('dbStat_battery');
- planes[k]["GPS"]= event.get('dbStat_gps');
- planes[k]["activeBlock"]= event.get('dbActive_block');
- planes[k]["engine"]= event.get('dbEngine_status');
- planes[k]["setting_id"]= event.get('dbId_Setting');
- planes[k]["setting_value"]= event.get('dbSetting_Value');
- planes[k]["drone_color"]= event.get('drone_color');
- // gere si le drone peut etre controlé ou non
- if ((usr_right=="admin")||((usr_right=="user")&&(drone_ctl[event.get('dbName')]!=null))){
- planes[k]["rights"]= 1;
- }
- else
- {planes[k]["rights"]=0;}
-
- var icon;
- if (planes[k]["heading"]>=338 || planes[i]["heading"]< 23){
- icon = plane_icons[0];
- }else if (planes[k]["heading"]>=23 && planes[i]["heading"]<68){
- icon = plane_icons[1];
- }else if (planes[k]["heading"]>=68 && planes[i]["heading"]<113){
- icon = plane_icons[2];
- }else if (planes[k]["heading"]>=113 && planes[i]["heading"]<158){
- icon = plane_icons[3];
- }else if (planes[k]["heading"]>=158 && planes[i]["heading"]<203){
- icon = plane_icons[4];
- }else if (planes[k]["heading"]>=203 && planes[i]["heading"]<248){
- icon = plane_icons[5];
- }else if (planes[k]["heading"]>=248 && planes[i]["heading"]<293){
- icon = plane_icons[6];
- }else if (planes[k]["heading"]>=293 && planes[i]["heading"]<337){
- icon = plane_icons[7];
- }
- //A marker is created and added on the map
- var pos = new GLatLng(planes[k]["lat"],planes[k]["lon"]);
- markers[k]=createMarker(pos,planes[k]["name"],icon);
- markers_color[k] = GPolygon.Circle(pos,diametre_drone_balise,"#000000",1,1,planes[i]["drone_color"],0.5)
- map.addOverlay(markers[k]);
- map.addOverlay(markers_color[k]);
- droneStateDataEvent[k] = setTimeout("nodataEventCallBack("+id+")",dataEventTimeoutTime);
- }
- else // l event envoyé correspond à un drone deja dans le tableau
- {
- if (droneStateDataEvent[i]!=-1) {clearTimeout(droneStateDataEvent[i]);}
- var heading_changed;
- //Update of the planes array
- planes[i]["lat"] = event.get('dbLatitude');
- planes[i]["lon"] = event.get('dbLongitude');
- // maj des param pour selected acrf
- planes[i]["speed"]= event.get('dbSpeed');
- planes[i]["altitude"]= event.get('dbAmsl');
- planes[i]["vspeed"]= event.get('dbVert_speed');
- planes[i]["height"]= event.get('dbAgl');
- planes[i]["battery"]= event.get('dbStat_battery');
- planes[i]["GPS"]= event.get('dbStat_gps');
- planes[i]["activeBlock"]= event.get('dbActive_block');
- planes[i]["engine"]= event.get('dbEngine_status');
- planes[i]["setting_id"]= event.get('dbId_Setting');
- planes[i]["setting_value"]= event.get('dbSetting_Value');
- planes[i]["drone_color"]= event.get('drone_color');
- //
- var new_heading = event.get('dbCourse');
- var old_heading = planes[i]["heading"];
- //Update of the icons if the heading has changed
- if (Math.abs(new_heading-old_heading)>2){
- var image;
- if (new_heading>=338 || new_heading< 23){
- image = plane_icons[0].image;
- }else if (new_heading>=23 && new_heading<68){
- image = plane_icons[1].image;
- }else if (new_heading>=68 && new_heading<113){
- image = plane_icons[2].image;
- }else if (new_heading>=113 && new_heading<158){
- image = plane_icons[3].image;
- }else if (new_heading>=158 && new_heading<203){
- image = plane_icons[4].image;
- }else if (new_heading>=203 && new_heading<248){
- image = plane_icons[5].image;
- }else if (new_heading>=248 && new_heading<293){
- image = plane_icons[6].image;
- }else if (new_heading>=293 && new_heading<337){
- image = plane_icons[7].image;
- }
- markers[i].setImage(image);
- }
- planes[i]["heading"] = new_heading;
- //Setting the marker to its new position
- var new_pos = new GLatLng(planes[i]["lat"],planes[i]["lon"]);
- markers[i].setLatLng(new_pos);
- //see http://econym.org.uk/gmap/eshapes.htm
- map.removeOverlay(markers_color[i]);
- markers_color[i] = GPolygon.Circle(new_pos,diametre_drone_balise,"#000000",1,1,planes[i]["drone_color"],0.5);
- map.addOverlay(markers_color[i]);
- droneStateDataEvent[i] = setTimeout("nodataEventCallBack("+id+")",dataEventTimeoutTime);
- }
- nb_planes=planes.length;
-
- document.getElementById("aircraftList").options.length=planes.length;
- if (tracking&&nb_planes!=0){//If tracking is activated, the map is centered on the aircraft
- var zoom = map.getZoom();
- var plane_number = aircraftList.selectedIndex;
- map.setCenter(new GLatLng(planes[plane_number]["lat"],planes[plane_number]["lon"]),zoom);
- }
-
- if (noPlaneBefore==true){
- noPlaneBefore=false;// !!! interruption possible
- active_block_id=planes[0]["activeBlock"];
- aircraftList.options[0].selected=true;
- selected_plane = planes[0]["name"];
- selected_plane_id = planes[0]["id"];
- DOMImplementation("upload/"+planes[0]["id"]+"/flight_plan.xml",fplDisplay);
- DOMImplementation("upload/"+planes[0]["id"]+"/settings.xml",settingsDisplay);
- }
- selected_plane_update(selected_plane_id);
- }
-
-
-/* ******************** affichage log ******************* */
-
-var coloryellow = true;
-function addMsgLog(msg)
-{
- var element = document.getElementById("info");
- var newinfodiv = document.createElement("div");
- var newinfotxt = document.createTextNode(msg);
- if (coloryellow) {newinfodiv.style.background = '#FFE4B5';coloryellow=false;}
- else {newinfodiv.style.background = '#D2B48C';coloryellow=true;}
- newinfodiv.appendChild(newinfotxt);
- element.appendChild(newinfodiv);
-}
-/* ******************** Initialization of the page ******************* */
-
-/* Initialization of the page : map, markers, aircraft list... */
-
-
- function initialize() {
-
- if (GBrowserIsCompatible()) {
- // initialize_planes_data();
- initialize_display();
- initialize_push();
- map = new GMap2(document.getElementById("map_canvas"));//Map creation
- map.setMapType(G_HYBRID_MAP);
- var point= new GLatLng(43.46223, 1.27289);
- map.setCenter(point,15);//Center the map on a temporary point
- map.setUIToDefault();
- //
- GEvent.addListener(map, "zoomend", function(oldlevel,newlevel) {
- var d = newlevel-oldlevel;
- if (d<0) {
- diametre_drone_balise=diametre_drone_balise*(-2*d);
- }
- else
- {
- diametre_drone_balise=diametre_drone_balise/(2*d);
- }
- });
- }else{
- alert("Your browser is not compatible with Google Maps !");
- }
- }
-
-
-
-/* Updating of the selected aircraft flight parameters */
-// recherche la place de l'avion dans le tableau
- function seekIndex(plane_id)
- {
- var i = 0;
- var trouve = false;
- var res=-1;
- while ((ilat y->lon !');
- x = parseFloat(childXML.getAttribute("x"));
- y = parseFloat(childXML.getAttribute("y"));
- lat=xMetersToDegrees(x,lat0);
- lon=yMetersToDegrees(y,lat,lon0);
- }
- else
- {
- lat=parseFloat(childXML.getAttribute("lat"));
- lon=parseFloat(childXML.getAttribute("long"));
- }
- var right=planes[selected_index]["rights"];
- waypoints[index_wpt]["marker"]=null;
-
- if (right==1){
- waypoints[index_wpt]["marker"]=createDraggableMarker(new GLatLng(lat,lon),nameWpt,wpt_icon,index_wpt, true);
- }else {
- waypoints[index_wpt]["marker"]=createDraggableMarker(new GLatLng(lat,lon),nameWpt,wpt_icon,index_wpt, false);
- }
- map.addOverlay(waypoints[index_wpt]["marker"]);
-
- var alt=false;
- if (childXML.getAttribute("alt")!=null){
- alt=childXML.getAttribute("alt");
- waypoints[index_wpt]["alt"]=parseFloat(childXML.getAttribute("alt"));
- }
- var node_url="";
- if (right==1){
- node_url = "javascript:moveWpt("+selected_index+",'"+nameWpt+"',"+lat+","+lon+","+alt+",false,"+(index_wpt)+")";
- }
- /////
- index_wpt++;
- var newindex = index++;
- fpl_tree.add(newindex,index_pere,nameWpt,node_url);
- for(var k =0;k< nbr_attrib;k++){
- var newindex_attrib_name = index++;
- var newindex_attrib_value = index++;
- fpl_tree.add(newindex_attrib_name,newindex,childXML.attributes[k].nodeName);
- fpl_tree.add(newindex_attrib_value,newindex_attrib_name,childXML.attributes[k].nodeValue);
- //txt = txt + childXML.attributes[k].nodeName + "=" + childXML.attributes[k].nodeValue +" ";
- }
- }
- }
- else if (childXML.nodeName=="block")
- { var node_url="";var txt_block_name="";
- if(childXML.attributes!=null){
- var block_name=childXML.getAttribute("name");//.replace(/ /g, '_');
- blocks[index_block]=new Array();
- blocks[index_block]["name"]=block_name;
- if (active_block_id==index_block){
- active_block_name=block_name;
- txt_block_name = ""+block_name+" ";
- }
- else
- {
- txt_block_name = block_name;
- }
- var right=planes[selected_index]["rights"];
-
- if (right==1){
- node_url="javascript:activateBlock("+selected_index+",'"+block_name+"',"+index_block+")";
- }
- index_block++;
- var txt = txt_block_name+ " : ";
- var nbr_attrib = childXML.attributes.length;
- for(var k =0;k< nbr_attrib;k++){
- if (childXML.attributes[k].nodeName!="name"){
- var newindex_attrib_name = index++;
- var newindex_attrib_value = index++;
- txt = txt + childXML.attributes[k].nodeName + "=" + childXML.attributes[k].nodeValue +" ";
- }
- }
- }
- var newindex = index++;
- fpl_tree.add(newindex,index_pere,txt,node_url);
- }
- // recursion
- if(childXML.hasChildNodes()) {
- var nodes=childXML.childNodes.length;
- for(var i=0; i90.0)||(l<-90.0)||isNaN(new_lat)) {
- alert('wrong format for a latitude... should be within [-90:+90]');
- return;
- }
- new_lon=prompt("longitude=",mylon);
- if ((new_lon==null)){
- return;
- }
- l = parseFloat(new_lon);
- if ((l>180.0)||(l<-180.0)||isNaN(new_lon)) {
- alert('wrong format for a longitude... should be within [-180:+180]');
- return;
- }
- if (alt){
- new_alt=prompt("altitude=",alt);
- if ((new_alt==null)){
- return;
- }
- l = parseFloat(new_alt);
- if ((l<=0.0)||isNaN(new_alt)) {
- alert('wrong format for an altitude... should be positive');
- return;
- }
- }
- //
- old_lat = waypoints[idwpt]["lat"];
- old_lon = waypoints[idwpt]["lon"];
- }else{
- new_lat=mylat;
- new_lon=mylon;
- }
-
-
- //Ajax request to edit the flight plan xml file
- var xhr = getXMLHttpRequest();
- xhr.onreadystatechange = function() {
- if (xhr.readyState == 4 && xhr.status == 200) {
- // maj de l'affichage fpl
- var xmlResponse = xhr.responseXML.documentElement;
- var rep = xmlResponse.getElementsByTagName("waypoint_to_move")[0];
- var idwpt_requested = parseInt(rep.getAttribute("idwpt"))-1;// cf waypoint fictif ivy
- var acid_requested = parseInt(rep.getAttribute("acid"));
- var lat_requested = parseFloat(rep.getAttribute("newlat"));
- var lon_requested = parseFloat(rep.getAttribute("newlon"));
- var was_dragged = rep.getAttribute("dragged");
- var name_drone = planes[seekIndex(acid_requested)]["name"];
- // on ne met à jour visuellement que si le focus est sur le drone selecté
- if (acid_requested==selected_plane_id){
- // mettre le waypoint dans un etat intermediaire
- // en attendant l'accuse de reception
- var right=planes[selected_index]["rights"];
- var marker_tmp;
- if (right==1){
- marker_tmp=createDraggableMarker(new GLatLng(old_lat,old_lon),waypoints[idwpt_requested]["name"],wpt_icon,idwpt_requested, true);
- }else {
- marker_tmp=createDraggableMarker(new GLatLng(old_lat,old_lon),waypoints[idwpt_requested]["name"],wpt_icon,idwpt_requested, false);
- }
- var name_wpt = waypoints[idwpt_requested]["name"];
- var timer=setTimeout("callback_waypoint("+acid_requested+","+idwpt_requested+")",order_response_timeout);
- waypoint_modif[idwpt_requested] = new createWaypoint(acid_requested,idwpt_requested,name_wpt,marker_tmp,timer);
- // on efface le marker courant
- // meme si elle a ete deplacé par drag & drop
- // on cree un marker non draggable avec une icone temporaire
- map.removeOverlay(waypoints[idwpt_requested]["marker"]);
- waypoints[idwpt_requested]["marker"] = createMarker(new GLatLng(lat_requested,lon_requested),name_wpt,iconMarkerTemp);
- if (waypoints[idwpt_requested]["marker"]!=null) map.addOverlay(waypoints[idwpt_requested]["marker"]);
- else alert('echec creation wpt tmp');
- addMsgLog("waypoint "+ name_wpt +" for drone " + name_drone +" will be moved");
- }
- else
- {
- addMsgLog("waypoint "+ idwpt_requested +" for drone " + name_drone +" will be moved");
- }
-
- }
- };
- xhr.open("POST",ajax_url,true);
- xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- // on informe les autres clients de ne pas modifier le waypoint en cours (via pushlet)
- p_publish('/client_action', 'login',usr_login,'action', 'lock', 'type_obj', 'waypoint', 'id_obj',idwpt,'webiddrone',selected_plane_id);
- // on passe en parametre le index_wpt+1 car dans paparazzi il y a un wpt predefini a zero
-
- if(alt!=false){
- xhr.send("order=fpl_update&wpt_name="+name+"&aircraft_id=" +selected_plane_id+"&wpt_id="+(idwpt+1)+"&new_lat="+new_lat+"&new_lon="+new_lon+"&new_alt="+new_alt+"&dragged="+dragged+"&new_alt_for_fpl=1");
- //alert("wptid="+i+" lat="+new_lat+"lon="+new_lon+"alt="+new_alt);
- }else{
- var alti=document.getElementById("altitude");var h=parseFloat(alti.innerHTML);
- xhr.send("order=fpl_update&wpt_name="+name+"&aircraft_id=" +selected_plane_id+"&wpt_id="+(idwpt+1)+"&new_lat="+new_lat+"&new_lon="+new_lon+"&new_alt="+parseFloat(alti.innerHTML)+"&dragged="+dragged+"&new_alt_for_fpl=0");
- //alert("wptid="+i+" lat="+new_lat+"lon="+new_lon+"alt="+h);
- }
-}
-
-
-/* ******** Activate a flight plan block ******** */
-
-
-
- function activateBlock(ac_webid,blockname,block_id){
- // verifie qu'il n'y pas pas un verrou sur le block posé par un autre client
- var k=0;
- var trouve = false;
- while ((!trouve)&&(k= parseFloat(min)) ){
- correct=true;
- var xhr = getXMLHttpRequest();
- xhr.onreadystatechange = function() {
- if (xhr.readyState == 4 && xhr.status == 200) {
- var xmlResponse = xhr.responseXML.documentElement;
- var rep = xmlResponse.getElementsByTagName("setting_to_change")[0];
- var idsetting_requested = parseInt(rep.getAttribute("setting_id"));
- var acid_requested = parseInt(rep.getAttribute("acid"));
- var name_drone = planes[seekIndex(acid_requested)]["name"];
- addMsgLog("request change setting "+ idsetting_requested +" for drone " + name_drone +" has been sent");
- // mise en place d'un timer d'accusé reception
- if(acid_requested==planes[selected_index]["id"]){
- setting_change_timeout=setTimeout("callback_setting("+acid_requested+","+idsetting_requested+")",order_response_timeout);
- setting_to_change_id = idsetting_requested;
- }
- }
- };
- xhr.open("POST",ajax_url,true);
- xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- //Send the parameters to the php page :
- xhr.send("order=modif_setting&aircraft_id=" +selected_plane_id+"&setting_id="+idsetting+"&value="+new_value);
-
- }else{
- new_value=prompt("Wrong value, please enter a value between "+min+" and "+max+" with a step of "+step+" :");
- if (new_value==null){return;}
- }
- }
- }
-
- function changeSetting2(idsetting,new_value){
-
- var xhr = getXMLHttpRequest();
- xhr.onreadystatechange = function() {
- if (xhr.readyState == 4 && xhr.status == 200) {
- var xmlResponse = xhr.responseXML.documentElement;
- var rep = xmlResponse.getElementsByTagName("setting_to_change")[0];
- var idsetting_requested = parseInt(rep.getAttribute("setting_id"));
- var acid_requested = parseInt(rep.getAttribute("acid"));
- var name_drone = planes[seekIndex(acid_requested)]["name"];
- addMsgLog("request change setting "+ idsetting_requested +" for drone " + name_drone +" has been sent");
- // mise en place d'un timer d'accusé reception
- if(acid_requested==planes[selected_index]["id"]){
- setting_change_timeout=setTimeout("callback_setting("+acid_requested+","+idsetting_requested+")",order_response_timeout);
- setting_to_change_id = idsetting_requested;
- }
- }
- };
- // on informe les autres clients de ne pas modifier le setting en cours (via pushlet)
- p_publish('/client_action', 'login',usr_login,'action', 'lock', 'type_obj', 'setting', 'id_obj',idsetting,'webiddrone',selected_plane_id);
- //
- xhr.open("POST",ajax_url,true);
- xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- //Send the parameters to the servlet :
- xhr.send("order=modif_setting&aircraft_id=" +selected_plane_id+"&setting_id="+idsetting+"&value="+new_value);
-
- }
-
-/* ************************* handle event orders from server ********************************************* */
-
- function orderprocessing_waypoint(event){
-
- var acft_id = parseInt(event.get('aircraftId'));
- var wpt_id = parseInt(event.get('waypointId'))-1; // cf indentation des waypoint sous ivy
- var lat = event.get('latitude');
- var lon = event.get('longitude');
- var alt = event.get('altitude');
- var name=name_from_id(acft_id);
- if ((wpt_id>=0)&&(acft_id==selected_plane_id)) {
- if (waypoint_modif[wpt_id]!=null)
- {
- addMsgLog('waypoint ' + wpt_id+' for drone '+name+ ' has been moved to '+lat+"//"+lon+' !');
- clearTimeout(waypoint_modif[wpt_id].timer)
- waypoint_modif[wpt_id] = null;
- DOMImplementation("upload/"+planes[selected_index]["id"]+"/flight_plan.xml",fplDisplay);
- // inform other web client that waypoint can be changed
- p_publish('/client_action', 'login',usr_login,'action', 'unlock', 'type_obj', 'waypoint', 'id_obj',wpt_id,'webiddrone',acft_id);
- }
- }
- //document.getElementById("info").innerHTML='waypoint' + wpt_id+' for drone '+name+ ' has been moved !';
- //addMsgLog('waypoint' + wpt_id+' for drone '+name+ ' has been moved !');
- //alert(' waypoint' + wpt_id+' for drone '+name+ ' has been moved !');
- }
-
- function orderprocessing_jump2block(event) {
- var acft_id = event.get('aircraftId');
- var current_block_id = event.get('currentBlockId');
- if (acft_id==selected_plane_id){
- /// maj de l'affichage fpl
- var name_block=blocks[current_block_id]["name"];
- var name_drone=name_from_id(acft_id);
- clearTimeout(block_jump_timeout);
- active_block_id = current_block_id;
- active_block_name =name_block;
- // inform other web client that block can be changed
- p_publish('/client_action', 'login',usr_login,'action', 'unlock', 'type_obj', 'block', 'id_obj',current_block_id,'webiddrone',acft_id);
- addMsgLog('drone '+ name_drone + ' has jump to block '+ name_block +' !');
- DOMImplementation("upload/"+planes[selected_index]["id"]+"/flight_plan.xml",fplDisplay);
- }
- }
-
- function orderprocessing_setting(event) {
- var acft_id = event.get('aircraftId');
- var setting_id = parseInt(event.get('settingId'));
- var value = event.get('settingValue');
- if ((acft_id==selected_plane_id)&&(setting_to_change_id==setting_id)){
- clearTimeout(setting_change_timeout);
- setting_to_change_id = -1; // reset
- var name=name_from_id(acft_id);
- //DOMImplementation("upload/"+planes[selected_index]["id"]+"/settings.xml",settingsDisplay);
- selected_plane_update(acft_id);
- addMsgLog('setting ' + setting_id +' for drone '+ name + ' has been changed to value '+ value +' !');
- // inform other web client that block can be changed
- p_publish('/client_action', 'login',usr_login,'action', 'unlock', 'type_obj', 'setting', 'id_obj',setting_id,'webiddrone',acft_id);
- }
- }
-
-
- function orderprocessing_planedie(event){
- var acft_id = event.get('aircraftId');
- var order_string = event.get('order');
- var name=name_from_id(acft_id);
- //document.getElementById('info').innerHTML='drone ' + name+' is not alive !';
- addMsgLog('drone ' + name+' is not alive !');
- var drone_index = seekIndex(acft_id);
- if(drone_index!=-1)
- {
- addMsgLog('drone ' + name+' will be removed in 10 seconds !');
- droneStateDieEvent[drone_index] = setTimeout("droneDieCallback("+acft_id+")", dieEventTimeoutTime);
- // on grise l'aircraft sur l'interface
- }
- }
-
- function orderprocessing_planeressurect(event){
- var acft_id = event.get('aircraftId');
- var order_string = event.get('order');
- //document.getElementById('info').innerHTML='drone ' +name+' has been resurrected !';
- addMsgLog('drone ' +acft_id+' has been resurrected !');
- var drone_index = seekIndex(acft_id);
- if(drone_index!=-1)
- {
- clearTimeout ( droneStateDieEvent[drone_index] );
- // on remet l'aircraft en couleur
- }
- }
-
- function orderprocessing_newplane(event){
- var acft_id = event.get('aircraftId');
- var order_string = event.get('order');
- var name= event.get('aircraftName');
- //document.getElementById('info').innerHTML='drone ' +name+' has been connected !';
- addMsgLog('drone ' +name+' has been connected !');
- }
-
-
- function orderprocessing_planekilled(event){
- var acft_id = event.get('aircraftId');
- var name=name_from_id(acft_id);
- addMsgLog("drone " + name + " deconnection caused by death of ivy bus...");
- //document.getElementById('info').innerHTML="drone " + name + " deconnection caused by death of ivy bus...";
- // remove drone...markers....
- removeDroneDisplay(acft_id);
- }
-
- function orderprocessing_csv_settings(event){
- var acft_id = event.get('aircraftId');
- var csv = event.get('csv');
- var index_drone = seekIndex(acft_id);
- var name=name_from_id(acft_id);
- if (index_drone!=-1) {
- planes[index_drone]["csv"]= csv;
- //addMsgLog("settings updated for drone " + name);
- if(index_drone==selected_index)
- {
- DOMImplementation("upload/"+planes[selected_index]["id"]+"/settings.xml",settingsDisplay);
- }
- }
- }
-
- function orderprocessing_chat(event){
- }
-
- function createLock(id_drone,typ_obj,id_obj,login){
- this.id_drone = id_drone;
- this.type_object = typ_obj;
- this.id_object = id_obj;
- this.request_login = login;
- this.lockmsg = function()
- {return ("user "+this.request_login+ " has locked "+this.type_object +" " +this.id_object);}
- this.unlockmsg = function()
- {return ("user "+this.request_login+ " has unlocked "+this.type_object +" " +this.id_object);}
- }
-
- var external_waypoint_lock = new Array();
- var external_block_lock = new Array();
- var external_setting_lock = new Array();
- // set or remove a lock to prevent user to change sthg taht is to be changed by another user
- function orderprocessing_client_action(event){
- var rqst_login = event.get('login');
- var rqst_action = event.get('action');
- var rqst_obj_type = event.get('type_obj');
- var rqst_obj_id = event.get('id_obj');
- var rqst_id_drone = event.get('webiddrone');
- if (rqst_action=='lock'){
- var lock_obj = new createLock(rqst_id_drone,rqst_obj_type,rqst_obj_id,rqst_login);
- if (rqst_obj_type=='waypoint') {external_waypoint_lock.push(lock_obj);}
- else if (rqst_obj_type=='block') {external_block_lock.push(lock_obj);}
- else if (rqst_obj_type=='setting') {external_setting_lock.push(lock_obj);}
- addMsgLog(lock_obj.lockmsg());
- }
- else if (rqst_action =='unlock'){
- var trouve = false;
- var cur_id_obj=-1;
- var i=0;
- if (rqst_obj_type=='waypoint')
- {
- while((!trouve)&&(i
-
-
-
-
-
-
-
-
--------- Paparazzi On the Web ! --------
-
-Welcome,
-<%
- String log = (String) session.getAttribute("login");
- if(log != null) {
- out.print(log + "!");
- String rights = (String) session.getAttribute("rights");
- if (rights.equals("admin")){
- out.println(" |
admin page ");
- }
- out.println(" |
\"pull\" mode ");
- out.println(" |
log out ");
- }
- else
- {
- out.println("");
- }
-
-%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-loading...
-
-
-
-
-loading...
-
-
-
-
-
-
Flight Parameters
-
-
-
-
-
- altitude (m)
- 0
-
-
- height
- 0 m
-
-
- battery level
- 0V
-
-
- speed
- 0 km/h
-
-
- GPS status
- OFF
-
-
- vertical speed
- 0 m/s
-
-
- engine power
- 0%
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<%
- out.println("");
-%>
-
-
-<%-- --%>
-
-
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/META-INF/MANIFEST.MF b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/META-INF/MANIFEST.MF
deleted file mode 100755
index 254272e1c0..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path:
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/classes/pushlet.properties b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/classes/pushlet.properties
deleted file mode 100755
index ba656e138f..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/classes/pushlet.properties
+++ /dev/null
@@ -1,128 +0,0 @@
-#
-# Pushlet configuration.
-# Place this file in the CLASSPATH (e.g. WEB-INF/classes) or directly under WEB-INF.
-#
-# $Id: pushlet.properties,v 1.13 2007/12/07 12:57:40 justb Exp $
-#
-
-#
-#
-#
-config.version=1.0.2
-
-#
-# CLASS FACTORY SPECIFICATION
-#
-# Change these if you want to override any of the core classes
-# within the Pushlet framework with your own custom classes.
-#
-# Examples:
-# - custom SessionManager for authorisation
-# - maintain lists of active subjects (topics)
-# - send events on subscription
-# - plug in custom logging like log4j
-# Note that you must maintain the semantics of each class !
-# Below are the default properties for the core classes.
-controller.class=nl.justobjects.pushlet.core.Controller
-dispatcher.class=nl.justobjects.pushlet.core.Dispatcher
-logger.class=nl.justobjects.pushlet.util.Log4jLogger
-# logger.class=nl.justobjects.pushlet.util.DefaultLogger
-sessionmanager.class=nl.justobjects.pushlet.core.SessionManager
-session.class=nl.justobjects.pushlet.core.Session
-subscriber.class=nl.justobjects.pushlet.core.Subscriber
-subscription.class=nl.justobjects.pushlet.core.Subscription
-
-# sessionmanager.maxsessions=200
-
-#
-# DISPATCHER
-#
-
-
-# TODO: allow properties to be maintained in
-# a user dir
-# config.redirect=/etc/pushlet.properties
-
-#
-# LOGGING
-#
-
-# log level (trace(6) debug(5) info (4), warn(3), error(2), fatal(1))
-# default is info(4)
-log.level=4
-
-#
-# LOCAL EVENT SOURCES
-#
-
-# should local sources be loaded ?
-sources.activate=true
-
-#
-# SESSION
-#
-
-
-# algoritm to generate session key:
-# values: "randomstring" (default) or "uuid".
-# session.id.generation=uuid
-session.id.generation=randomstring
-
-# length of generated session key when using "randomstring" generation
-session.id.size=10
-
-# Overall session lease time in minutes
-# Mainly used for clients that do not perform
-# listening, e.g. when publishing only.
-session.timeout.mins=5
-
-#
-# EVENT QUEUE
-#
-# Properties for per-client data event queue
-
-# Size for
-queue.size=24
-queue.read.timeout.millis=20000
-queue.write.timeout.millis=20
-
-#
-# LISTENING MODE
-#
-
-# You may force all clients to use pull mode
-# for scalability
-listen.force.pull.all=false
-
-#
-# Comma-separated list of User Agent substrings.
-# Force these browsers to use pull mode, since they
-# don't support JS streaming, matching is done using
-# String.indexOf() with lowercased agent strings
-# use multiple criteria with &.
-#
-listen.force.pull.agents=safari
-
-#
-# PULL MODE
-#
-
-# time server should wait on refresing pull client
-pull.refresh.timeout.millis=45000
-
-# minimum/maximum wait time client should wait before refreshing
-# server provides a random time between these values
-pull.refresh.wait.min.millis=2000
-pull.refresh.wait.max.millis=6000
-
-#
-# POLL MODE
-#
-
-# time server should wait on refresing poll client
-poll.refresh.timeout.millis=60000
-
-# minimum/maximum wait time client should wait before refreshing
-# server provides a random time between these values
-poll.refresh.wait.min.millis=6000
-poll.refresh.wait.max.millis=10000
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/classes/sources.properties b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/classes/sources.properties
deleted file mode 100755
index e8aeb36a43..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/classes/sources.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Properties file for EventSource objects to be instantiated.
-#
-# Place this file in the CLASSPATH (e.g. WEB-INF/classes) or directly under WEB-INF.
-#
-# $Id: sources.properties,v 1.2 2007/11/10 14:12:16 justb Exp $
-#
-# Each EventSource is defined as =
-# 1. should be unique within this file but may be any name
-# 2. is the full class name
-#
-#
-# Define Pull Sources here. These classes must be derived from
-# nl.justobjects.pushlet.core.EventPullSource
-# Inner classes are separated with a $ sign from the outer class.
-#source1=nl.justobjects.pushlet.test.TestEventPullSources$TemperatureEventPullSource
-#source2=nl.justobjects.pushlet.test.TestEventPullSources$SystemStatusEventPullSource
-#source3=nl.justobjects.pushlet.test.TestEventPullSources$PushletStatusEventPullSource
-#source4=nl.justobjects.pushlet.test.TestEventPullSources$AEXStocksEventPullSource
-#source5=nl.justobjects.pushlet.test.TestEventPullSources$WebPresentationEventPullSource
-#source6=nl.justobjects.pushlet.test.TestEventPullSources$PingEventPullSource
-
-source1=pow.webserver.Serveur$IvyEventSource
-
-# TO BE DONE IN NEXT VERSION
-# define Push Sources here. These must implement the interface
-# nl.justobjects.pushlet.core.EventSource
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-codec-1.4.jar b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-codec-1.4.jar
deleted file mode 100755
index 458d432da8..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-codec-1.4.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar
deleted file mode 100755
index aa209b3887..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-httpclient-3.1.jar b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-httpclient-3.1.jar
deleted file mode 100755
index 7c59774aed..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-httpclient-3.1.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-io-1.4.jar b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-io-1.4.jar
deleted file mode 100755
index 133dc6cb35..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-io-1.4.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar
deleted file mode 100755
index 8758a96b70..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/jdom.jar b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/jdom.jar
deleted file mode 100755
index 65a1b3f737..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/jdom.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/log4j-1.2.16.jar b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/log4j-1.2.16.jar
deleted file mode 100755
index 3f9d847618..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/log4j-1.2.16.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/mysql-connector-java-5.1.12-bin.jar b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/mysql-connector-java-5.1.12-bin.jar
deleted file mode 100755
index af5847eed4..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/mysql-connector-java-5.1.12-bin.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/pushlet.jar b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/pushlet.jar
deleted file mode 100755
index 6dc1c22e21..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/lib/pushlet.jar and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/web.xml b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/web.xml
deleted file mode 100755
index 16b18bbc06..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/WEB-INF/web.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- ServletPow
-
- index.html
- index.htm
- index.jsp
- default.html
- default.htm
- default.jsp
-
-
-
- Greeting
- Greeting
- pow.webserver.Greeting
-
-
- Greeting
- /Greeting.srv
-
-
-
- Pushlet
- Pushlet
- nl.justobjects.pushlet.servlet.Pushlet
- 1
-
-
- Pushlet
- /pushlet.srv
-
-
-
- Ivy2TomcatHttpServer
- Ivy2TomcatHttpServer
- pow.webserver.Ivy2TomcatHttpServer
- 1
-
-
- Ivy2TomcatHttpServer
- /Ivy2TomcatHttpServer.srv
-
-
-
- ajaxRqst
- ajaxRqst
- pow.webserver.AjaxRqst
-
-
- ajaxRqst
- /ajaxRqst.srv
-
-
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/admin.jsp b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/admin.jsp
deleted file mode 100755
index 77c8c2fa9c..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/admin.jsp
+++ /dev/null
@@ -1,790 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@page import="java.util.*,pow.webserver.UserTab,pow.webserver.User,javax.xml.parsers.*, org.w3c.dom.*,org.xml.sax.*,java.io.*" %>
-<%
-// recuperation des données sur le serveur
- String default_folder = this.getServletContext().getRealPath("");
- UserTab logTab = UserTab.unserialize(default_folder + "/conf/"+"userTable.tbl");
- Iterator itr=logTab.getLoginIterator();
- //
- UserTab logIvyTab = UserTab.unserialize(default_folder + "/conf/"+"userIvyTable.tbl");
- Iterator itrIvy=logIvyTab.getLoginIterator();
- // lecture liste des noms de drones ds immat.xml
- DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();
- // création d'un constructeur de documents
- DocumentBuilder constructeur = fabrique.newDocumentBuilder();
- // lecture du contenu d'un fichier XML avec DOM
- File xml = new File(default_folder + "/conf/"+"immat.xml");
- Document document = constructeur.parse(xml);
-
-
-%>
-
-
-
-
-
-
-
-Administration page
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/conf/immat.xml b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/conf/immat.xml
deleted file mode 100755
index 42965d30c1..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/conf/immat.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/conf/pow_conf.xml b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/conf/pow_conf.xml
deleted file mode 100755
index 947a6b35b7..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/conf/pow_conf.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- 8535
- 8536
- 1024
- 10000
- pow_sql
- true silent pow_user
- pwdpow_user
- admin
- admin@pow.fr
-
- 1200000
-
- 60000
-
-
-10000
-
-5000
-
-30000
- 30000
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/help.jsp b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/help.jsp
deleted file mode 100755
index cc8eedffa0..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/help.jsp
+++ /dev/null
@@ -1,58 +0,0 @@
-<%@page import="pow.webserver.Conf" %>
-
-
-
-
-
- Welcome to Paparazzi On the Web
-
-
-
-
-
-
-
-
-
-Welcome on Paparazzi On the Web help page.
- This page is here to help you to use the Paparazzi On the Web (POW) application. POW is a part of Paparazzi which is a open-project of civil UAV control. With Paparazzi On the Web, you are able to observe and eventually control the UAVs of the system Paparazzi thanks to a browser with your internet connexion. To learn more about Paparazzi project, click here .
-Paparazzi On the Web is optimised for Firefox browser. If you want to have a better performance, you can dowload Firefox here .
-Start page
-If you have a login and a password on Paparazzi On the Web, you can use them to enter the application. Else, click on enter as a guest.
-
-Main page
-You are now on Paparazzi On the Web main page. You can see several boxes. We will describe all those boxes and show you the interactions you can have with them.
-
-Choose an aircraft
-Here you can select the aircraft you want to observe or control. Click on the arrow to see the list of the aircrafts that are available. Click on the aircraft you want to interacte with.
-You can also choose to activate or desactivate tracking. When tracking is activated, the map is always centered on the selected aircraft.
-
-
-
-The map
-On the map, you can see all the aircrafts that are available. If tracking is activated, the map will be centered on the selected aircraft. There are also red lozenges which are the waypoints of the selected UAV. If you are autentified on Paparazzi On the Web and if your profile gives you the authorization, you can move those waypoints with drag and drop.
-
-The flight plan
-Through this box, you can obtain some informations on the flight plan that is followed by the selected plane. If you move your cursor on the informations tab, you obtain informations on the flightplan. If you put your cursor on the "active block" tab, you can see the list of the flight plan blocks that the plane can follow. The active block is in red. If you are authentified and if you have the authorization, you can change the active block by clicking on its name. The waypoints tab gives you informations on the different waypoints. If you are authentified and if you have the authorization, you can move those waypoints by clicking on "move waypoint". In this case, a new windows is openned where you indicate where you want to move the waypoint.
-You can also move a waypoint by dragging the icon on the map to its new position.
-
-The flight parameters
-This box displays the flight parameters of the selected aircraft. When a value is out of its normal range, it becomes red.
-
-The settings
-In this box you can, if you are allowed to control the selected aircraft, you change some settings of this aircraft by clicking on the name of the setting.
-
-Any problem ?
-If you have any display problem, such as a ghost aircraft icon, or an aircraft that is not displayed in the aircrafts list, you might resolve it by reloading the page by pressing F5 key.
-For any other problem, please inform
-<%
-out.print("the administrator "); %>.
-Click here to return to the homepage.
-
-
-
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/idError.html b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/idError.html
deleted file mode 100755
index a15edb3f6d..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/idError.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- Welcome to Paparazzi On the Web
-
-
-
-
-
-Sorry, an error occured during your identification. Click here to return on the homepage.
-
-
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/base.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/base.gif
deleted file mode 100755
index 9ac0b117b0..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/base.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/cd.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/cd.gif
deleted file mode 100755
index 7503819404..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/cd.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/empty.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/empty.gif
deleted file mode 100755
index b5cf52378f..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/empty.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/folder.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/folder.gif
deleted file mode 100755
index eb129763dc..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/folder.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/folderopen.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/folderopen.gif
deleted file mode 100755
index c5c31102d5..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/folderopen.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/globe.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/globe.gif
deleted file mode 100755
index 57123d0e69..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/globe.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/imgfolder.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/imgfolder.gif
deleted file mode 100755
index e6d880347f..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/imgfolder.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/join.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/join.gif
deleted file mode 100755
index 34dd47610a..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/join.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/joinbottom.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/joinbottom.gif
deleted file mode 100755
index 48b81c80a9..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/joinbottom.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/line.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/line.gif
deleted file mode 100755
index 1a259eea00..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/line.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/minus.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/minus.gif
deleted file mode 100755
index 3d212a97ae..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/minus.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/minusbottom.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/minusbottom.gif
deleted file mode 100755
index dc3198be27..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/minusbottom.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/musicfolder.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/musicfolder.gif
deleted file mode 100755
index f620789feb..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/musicfolder.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/nolines_minus.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/nolines_minus.gif
deleted file mode 100755
index 2592ac20f3..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/nolines_minus.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/nolines_plus.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/nolines_plus.gif
deleted file mode 100755
index f258ce211a..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/nolines_plus.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/page.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/page.gif
deleted file mode 100755
index 42d7318c5d..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/page.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/plus.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/plus.gif
deleted file mode 100755
index b2c997233b..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/plus.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/plusbottom.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/plusbottom.gif
deleted file mode 100755
index b5671d891a..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/plusbottom.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/question.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/question.gif
deleted file mode 100755
index dd4e685078..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/question.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/trash.gif b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/trash.gif
deleted file mode 100755
index cfa0f000e1..0000000000
Binary files a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/img/trash.gif and /dev/null differ
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/index.jsp b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/index.jsp
deleted file mode 100755
index aad5c605b5..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/index.jsp
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
- Welcome to Paparazzi On the Web
-
-
-
-
-
-
-
-
-
-
-
-Welcome to Paparazzi On The Web !
-
-
-
-
-
-
-
-or
-
-
-
-
-help ?
-
-
\ No newline at end of file
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/DOMImplementation.js b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/DOMImplementation.js
deleted file mode 100755
index 75c17e11d6..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/DOMImplementation.js
+++ /dev/null
@@ -1,24 +0,0 @@
-function DOMImplementation(sUrl, fCallback) {
- var dom;
- if(window.ActiveXObject) {
- dom = new ActiveXObject("Microsoft.XMLDOM");
- dom.onreadystatechange = function() {
- if(dom.readyState == 4) {
- //alert("win "+sUrl+" loaded");
- fCallback(dom);
- }
- };
- }
- else if(document.implementation && document.implementation.createDocument) {
- dom = document.implementation.createDocument("", "", null);
- dom.onload = function() {
- //alert("other "+sUrl+" loaded");
- fCallback(dom);
- }
- }
- else {
- alert("Votre navigateur ne gère pas l'importation de fichiers XML");
- return;
- }
- dom.load(sUrl);
-}
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/XHR_object.js b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/XHR_object.js
deleted file mode 100755
index 8f3f022733..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/XHR_object.js
+++ /dev/null
@@ -1,20 +0,0 @@
-function getXMLHttpRequest() {
- var xhr = null;
-
- if (window.XMLHttpRequest || window.ActiveXObject) {
- if (window.ActiveXObject) {
- try {
- xhr = new ActiveXObject("Msxml2.XMLHTTP");
- } catch(e) {
- xhr = new ActiveXObject("Microsoft.XMLHTTP");
- }
- } else {
- xhr = new XMLHttpRequest();
- }
- } else {
- alert("Votre navigateur ne supporte pas l'objet XMLHTTPRequest...");
- return null;
- }
-
- return xhr;
-}
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/browserdetect.js b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/browserdetect.js
deleted file mode 100755
index a8674db57f..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/browserdetect.js
+++ /dev/null
@@ -1,97 +0,0 @@
-// Browser Detect Lite v2.1.4
-// http://www.dithered.com/javascript/browser_detect/index.html
-// modified by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM)
-
-
-function BrowserDetectLite() {
- var ua = navigator.userAgent.toLowerCase();
-
- // browser name
- this.isGecko = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
- this.isMozilla = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
- this.isNS = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
- this.isIE = ( (ua.indexOf('msie') != -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) );
- this.isSafari = (ua.indexOf('safari') != - 1);
- this.isOpera = (ua.indexOf('opera') != -1);
- this.isKonqueror = (ua.indexOf('konqueror') != -1 && !this.isSafari);
- this.isIcab = (ua.indexOf('icab') != -1);
- this.isAol = (ua.indexOf('aol') != -1);
-
- // spoofing and compatible browsers
- this.isIECompatible = ( (ua.indexOf('msie') != -1) && !this.isIE);
- this.isNSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.isNS && !this.isMozilla);
-
- // browser version
- this.versionMinor = parseFloat(navigator.appVersion);
-
- // correct version number
- if (this.isNS && this.isGecko) {
- this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
- }
- else if (this.isIE && this.versionMinor >= 4) {
- this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
- }
- else if (this.isMozilla) {
- this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
- }
- else if (this.isSafari) {
- this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
- }
- else if (this.isOpera) {
- if (ua.indexOf('opera/') != -1) {
- this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera/') + 6 ) );
- }
- else {
- this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera ') + 6 ) );
- }
- }
- else if (this.isKonqueror) {
- this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
- }
- else if (this.isIcab) {
- if (ua.indexOf('icab/') != -1) {
- this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab/') + 6 ) );
- }
- else {
- this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab ') + 6 ) );
- }
- }
-
- this.versionMajor = parseInt(this.versionMinor);
- this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
-
- // dom support
- this.isDOM1 = (document.getElementById);
- this.isDOM2Event = (document.addEventListener && document.removeEventListener);
-
- // css compatibility mode
- this.mode = document.compatMode ? document.compatMode : 'BackCompat';
-
- // platform
- this.isWin = (ua.indexOf('win') != -1);
- this.isWin32 = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
- this.isMac = (ua.indexOf('mac') != -1);
- this.isUnix = (ua.indexOf('unix') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
- this.isLinux = (ua.indexOf('linux') != -1);
-
- // specific browser shortcuts
- this.isNS4x = (this.isNS && this.versionMajor == 4);
- this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
- this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
- this.isNS4up = (this.isNS && this.versionMinor >= 4);
- this.isNS6x = (this.isNS && this.versionMajor == 6);
- this.isNS6up = (this.isNS && this.versionMajor >= 6);
- this.isNS7x = (this.isNS && this.versionMajor == 7);
- this.isNS7up = (this.isNS && this.versionMajor >= 7);
-
- this.isIE4x = (this.isIE && this.versionMajor == 4);
- this.isIE4up = (this.isIE && this.versionMajor >= 4);
- this.isIE5x = (this.isIE && this.versionMajor == 5);
- this.isIE55 = (this.isIE && this.versionMinor == 5.5);
- this.isIE5up = (this.isIE && this.versionMajor >= 5);
- this.isIE6x = (this.isIE && this.versionMajor == 6);
- this.isIE6up = (this.isIE && this.versionMajor >= 6);
-
- this.isIE4xMac = (this.isIE4x && this.isMac);
-}
-var browser = new BrowserDetectLite();
diff --git a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/curvycorners.js b/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/curvycorners.js
deleted file mode 100755
index 511c78dd9d..0000000000
--- a/sw/in_progress/pow/ServletPow/eclipse ServletPow/WebContent/js/curvycorners.js
+++ /dev/null
@@ -1 +0,0 @@
-function browserdetect(){var A=navigator.userAgent.toLowerCase();this.isIE=A.indexOf("msie")>-1;this.ieVer=this.isIE?/msie\s(\d\.\d)/.exec(A)[1]:0;this.isMoz=A.indexOf("firefox")!=-1;this.isSafari=A.indexOf("safari")!=-1;this.quirksMode=this.isIE&&(!document.compatMode||document.compatMode.indexOf("BackCompat")>-1);this.isOp="opera" in window;this.isWebKit=A.indexOf("webkit")!=-1;if(this.isIE){this.get_style=function(D,F){if(!(F in D.currentStyle)){return""}var C=/^([\d.]+)(\w*)/.exec(D.currentStyle[F]);if(!C){return D.currentStyle[F]}if(C[1]==0){return"0"}if(C[2]&&C[2]!=="px"){var B=D.style.left;var E=D.runtimeStyle.left;D.runtimeStyle.left=D.currentStyle.left;D.style.left=C[1]+C[2];C[0]=D.style.pixelLeft;D.style.left=B;D.runtimeStyle.left=E}return C[0]}}else{this.get_style=function(B,C){C=C.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return document.defaultView.getComputedStyle(B,"").getPropertyValue(C)}}}var curvyBrowser=new browserdetect;if(curvyBrowser.isIE){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}function curvyCnrSpec(A){this.selectorText=A;this.tlR=this.trR=this.blR=this.brR=0;this.tlu=this.tru=this.blu=this.bru="";this.antiAlias=true}curvyCnrSpec.prototype.setcorner=function(B,C,A,D){if(!B){this.tlR=this.trR=this.blR=this.brR=parseInt(A);this.tlu=this.tru=this.blu=this.bru=D}else{propname=B.charAt(0)+C.charAt(0);this[propname+"R"]=parseInt(A);this[propname+"u"]=D}};curvyCnrSpec.prototype.get=function(D){if(/^(t|b)(l|r)(R|u)$/.test(D)){return this[D]}if(/^(t|b)(l|r)Ru$/.test(D)){var C=D.charAt(0)+D.charAt(1);return this[C+"R"]+this[C+"u"]}if(/^(t|b)Ru?$/.test(D)){var B=D.charAt(0);B+=this[B+"lR"]>this[B+"rR"]?"l":"r";var A=this[B+"R"];if(D.length===3&&D.charAt(2)==="u"){A+=this[B="u"]}return A}throw new Error("Don't recognize property "+D)};curvyCnrSpec.prototype.radiusdiff=function(A){if(A!=="t"&&A!=="b"){throw new Error("Param must be 't' or 'b'")}return Math.abs(this[A+"lR"]-this[A+"rR"])};curvyCnrSpec.prototype.setfrom=function(A){this.tlu=this.tru=this.blu=this.bru="px";if("tl" in A){this.tlR=A.tl.radius}if("tr" in A){this.trR=A.tr.radius}if("bl" in A){this.blR=A.bl.radius}if("br" in A){this.brR=A.br.radius}if("antiAlias" in A){this.antiAlias=A.antiAlias}};curvyCnrSpec.prototype.cloneOn=function(G){var E=["tl","tr","bl","br"];var H=0;var C,A;for(C in E){if(!isNaN(C)){A=this[E[C]+"u"];if(A!==""&&A!=="px"){H=new curvyCnrSpec;break}}}if(!H){H=this}else{var B,D,F=curvyBrowser.get_style(G,"left");for(C in E){if(!isNaN(C)){B=E[C];A=this[B+"u"];D=this[B+"R"];if(A!=="px"){var F=G.style.left;G.style.left=D+A;D=G.style.pixelLeft;G.style.left=F}H[B+"R"]=D;H[B+"u"]="px"}}G.style.left=F}return H};curvyCnrSpec.prototype.radiusSum=function(A){if(A!=="t"&&A!=="b"){throw new Error("Param must be 't' or 'b'")}return this[A+"lR"]+this[A+"rR"]};curvyCnrSpec.prototype.radiusCount=function(A){var B=0;if(this[A+"lR"]){++B}if(this[A+"rR"]){++B}return B};curvyCnrSpec.prototype.cornerNames=function(){var A=[];if(this.tlR){A.push("tl")}if(this.trR){A.push("tr")}if(this.blR){A.push("bl")}if(this.brR){A.push("br")}return A};function operasheet(C){var A=document.styleSheets.item(C).ownerNode.text;A=A.replace(/\/\*(\n|\r|.)*?\*\//g,"");var D=new RegExp("^s*([\\w.#][-\\w.#, ]+)[\\n\\s]*\\{([^}]+border-((top|bottom)-(left|right)-)?radius[^}]*)\\}","mg");var G;this.rules=[];while((G=D.exec(A))!==null){var F=new RegExp("(..)border-((top|bottom)-(left|right)-)?radius:\\s*([\\d.]+)(in|em|px|ex|pt)","g");var E,B=new curvyCnrSpec(G[1]);while((E=F.exec(G[2]))!==null){if(E[1]!=="z-"){B.setcorner(E[3],E[4],E[5],E[6])}}this.rules.push(B)}}operasheet.contains_border_radius=function(A){return/border-((top|bottom)-(left|right)-)?radius/.test(document.styleSheets.item(A).ownerNode.text)};function curvyCorners(){var G,D,E,B,J;if(typeof arguments[0]!=="object"){throw curvyCorners.newError("First parameter of curvyCorners() must be an object.")}if(arguments[0] instanceof curvyCnrSpec){B=arguments[0];if(!B.selectorText&&typeof arguments[1]==="string"){B.selectorText=arguments[1]}}else{if(typeof arguments[1]!=="object"&&typeof arguments[1]!=="string"){throw curvyCorners.newError("Second parameter of curvyCorners() must be an object or a class name.")}D=arguments[1];if(typeof D!=="string"){D=""}if(D!==""&&D.charAt(0)!=="."&&"autoPad" in arguments[0]){D="."+D}B=new curvyCnrSpec(D);B.setfrom(arguments[0])}if(B.selectorText){J=0;var I=B.selectorText.replace(/\s+$/,"").split(/,\s*/);E=new Array;function A(M){var L=M.split("#");return(L.length===2?"#":"")+L.pop()}for(G=0;G7?curvyBrowser.get_style(this.box,"filter"):null;var H=this.spec.get("tR");var M=this.spec.get("bR");var W=function(f){if(typeof f==="number"){return f}if(typeof f!=="string"){throw new Error("unexpected styleToNPx type "+typeof f)}var d=/^[-\d.]([a-z]+)$/.exec(f);if(d&&d[1]!="px"){throw new Error("Unexpected unit "+d[1])}if(isNaN(f=parseInt(f))){f=0}return f};var T=function(d){return d<=0?"0":d+"px"};try{this.borderWidth=W(b);this.borderWidthB=W(J);this.borderWidthL=W(D);this.borderWidthR=W(B);this.boxColour=curvyObject.format_colour(E);this.topPadding=W(Z);this.bottomPadding=W(c);this.leftPadding=W(Q);this.rightPadding=W(a);this.boxWidth=K;this.boxHeight=this.box.clientHeight;this.borderColour=curvyObject.format_colour(I);this.borderColourB=curvyObject.format_colour(G);this.borderColourL=curvyObject.format_colour(A);this.borderString=this.borderWidth+"px solid "+this.borderColour;this.borderStringB=this.borderWidthB+"px solid "+this.borderColourB;this.backgroundImage=((C!="none")?C:"");this.backgroundRepeat=Y}catch(X){throw this.newError("getMessage" in X?X.getMessage():X.message)}var F=this.boxHeight;var V=K;if(curvyBrowser.isOp){R=W(R);P=W(P);if(R){var N=V+this.borderWidthL+this.borderWidthR;if(R>N){R=N}R=(N/R*100)+"%"}if(P){var N=F+this.borderWidth+this.borderWidthB;if(P>N){P=N}P=(N/P*100)+"%"}}if(curvyBrowser.quirksMode){}else{this.boxWidth-=this.leftPadding+this.rightPadding;this.boxHeight-=this.topPadding+this.bottomPadding}this.contentContainer=document.createElement("div");if(filter){this.contentContainer.style.filter=filter}while(this.box.firstChild){this.contentContainer.appendChild(this.box.removeChild(this.box.firstChild))}if(O!="absolute"){this.box.style.position="relative"}this.box.style.padding="0";this.box.style.border=this.box.style.backgroundImage="none";this.box.style.backgroundColor="transparent";this.box.style.width=(V+this.borderWidthL+this.borderWidthR)+"px";this.box.style.height=(F+this.borderWidth+this.borderWidthB)+"px";var L=document.createElement("div");L.style.position="absolute";if(filter){L.style.filter=filter}if(curvyBrowser.quirksMode){L.style.width=(V+this.borderWidthL+this.borderWidthR)+"px"}else{L.style.width=V+"px"}L.style.height=T(F+this.borderWidth+this.borderWidthB-H-M);L.style.padding="0";L.style.top=H+"px";L.style.left="0";if(this.borderWidthL){L.style.borderLeft=this.borderWidthL+"px solid "+this.borderColourL}if(this.borderWidth&&!H){L.style.borderTop=this.borderWidth+"px solid "+this.borderColour}if(this.borderWidthR){L.style.borderRight=this.borderWidthR+"px solid "+this.borderColourL}if(this.borderWidthB&&!M){L.style.borderBottom=this.borderWidthB+"px solid "+this.borderColourB}L.style.backgroundColor=E;L.style.backgroundImage=this.backgroundImage;L.style.backgroundRepeat=this.backgroundRepeat;this.shell=this.box.appendChild(L);K=curvyBrowser.get_style(this.shell,"width");if(K===""||K==="auto"||K.indexOf("%")!==-1){throw this.newError("Shell width is "+K)}this.boxWidth=(K!=""&&K!="auto"&&K.indexOf("%")==-1)?parseInt(K):this.shell.clientWidth;this.applyCorners=function(){if(this.backgroundObject){var w=function(AO,i,t){if(AO===0){return 0}var k;if(AO==="right"||AO==="bottom"){return t-i}if(AO==="center"){return(t-i)/2}if(AO.indexOf("%")>0){return(t-i)*100/parseInt(AO)}return W(AO)};this.backgroundPosX=w(R,this.backgroundObject.width,V);this.backgroundPosY=w(P,this.backgroundObject.height,F)}else{if(this.backgroundImage){this.backgroundPosX=W(R);this.backgroundPosY=W(P)}}if(H){v=document.createElement("div");v.style.width=this.boxWidth+"px";v.style.fontSize="1px";v.style.overflow="hidden";v.style.position="absolute";v.style.paddingLeft=this.borderWidth+"px";v.style.paddingRight=this.borderWidth+"px";v.style.height=H+"px";v.style.top=-H+"px";v.style.left=-this.borderWidthL+"px";this.topContainer=this.shell.appendChild(v)}if(M){var v=document.createElement("div");v.style.width=this.boxWidth+"px";v.style.fontSize="1px";v.style.overflow="hidden";v.style.position="absolute";v.style.paddingLeft=this.borderWidthB+"px";v.style.paddingRight=this.borderWidthB+"px";v.style.height=M+"px";v.style.bottom=-M+"px";v.style.left=-this.borderWidthL+"px";this.bottomContainer=this.shell.appendChild(v)}var AG=this.spec.cornerNames();for(var AK in AG){if(!isNaN(AK)){var AC=AG[AK];var AD=this.spec[AC+"R"];var AE,AH,j,AF;if(AC=="tr"||AC=="tl"){AE=this.borderWidth;AH=this.borderColour;AF=this.borderWidth}else{AE=this.borderWidthB;AH=this.borderColourB;AF=this.borderWidthB}j=AD-AF;var u=document.createElement("div");u.style.height=this.spec.get(AC+"Ru");u.style.width=this.spec.get(AC+"Ru");u.style.position="absolute";u.style.fontSize="1px";u.style.overflow="hidden";var r,q,p;var n=filter?parseInt(/alpha\(opacity.(\d+)\)/.exec(filter)[1]):100;for(r=0;r=j)?-1:Math.floor(Math.sqrt(Math.pow(j,2)-Math.pow(r+1,2)))-1;if(j!=AD){var h=(r>=j)?-1:Math.ceil(Math.sqrt(Math.pow(j,2)-Math.pow(r,2)));var f=(r+1>=AD)?-1:Math.floor(Math.sqrt(Math.pow(AD,2)-Math.pow((r+1),2)))-1}var d=(r>=AD)?-1:Math.ceil(Math.sqrt(Math.pow(AD,2)-Math.pow(r,2)));if(m>-1){this.drawPixel(r,0,this.boxColour,n,(m+1),u,true,AD)}if(j!=AD){if(this.spec.antiAlias){for(q=m+1;q=30,AD)}else{if(this.boxColour!=="transparent"){var AB=curvyObject.BlendColour(this.boxColour,AH,curvyObject.pixelFraction(r,q,j));this.drawPixel(r,q,AB,n,1,u,false,AD)}else{this.drawPixel(r,q,AH,n>>1,1,u,false,AD)}}}if(f>=h){if(h==-1){h=0}this.drawPixel(r,h,AH,n,(f-h+1),u,false,0)}p=AH;q=f}else{if(f>m){this.drawPixel(r,(m+1),AH,n,(f-m),u,false,0)}}}else{p=this.boxColour;q=m}if(this.spec.antiAlias){while(++q>>4]+""+A[B&15]};curvyObject.BlendColour=function(L,J,G){if(L==="transparent"||J==="transparent"){throw this.newError("Cannot blend with transparent")}if(L.charAt(0)!=="#"){L=curvyObject.format_colour(L)}if(J.charAt(0)!=="#"){J=curvyObject.format_colour(J)}var D=parseInt(L.substr(1,2),16);var K=parseInt(L.substr(3,2),16);var F=parseInt(L.substr(5,2),16);var C=parseInt(J.substr(1,2),16);var I=parseInt(J.substr(3,2),16);var E=parseInt(J.substr(5,2),16);if(G>1||G<0){G=1}var H=Math.round((D*G)+(C*(1-G)));if(H>255){H=255}if(H<0){H=0}var B=Math.round((K*G)+(I*(1-G)));if(B>255){B=255}if(B<0){B=0}var A=Math.round((F*G)+(E*(1-G)));if(A>255){A=255}if(A<0){A=0}return"#"+curvyObject.IntToHex(H)+curvyObject.IntToHex(B)+curvyObject.IntToHex(A)};curvyObject.pixelFraction=function(H,G,A){var J;var E=A*A;var B=new Array(2);var F=new Array(2);var I=0;var C="";var D=Math.sqrt(E-Math.pow(H,2));if(D>=G&&D<(G+1)){C="Left";B[I]=0;F[I]=D-G;++I}D=Math.sqrt(E-Math.pow(G+1,2));if(D>=H&&D<(H+1)){C+="Top";B[I]=D-H;F[I]=1;++I}D=Math.sqrt(E-Math.pow(H+1,2));if(D>=G&&D<(G+1)){C+="Right";B[I]=1;F[I]=D-G;++I}D=Math.sqrt(E-Math.pow(G,2));if(D>=H&&D<(H+1)){C+="Bottom";B[I]=D-H;F[I]=0}switch(C){case"LeftRight":J=Math.min(F[0],F[1])+((Math.max(F[0],F[1])-Math.min(F[0],F[1]))/2);break;case"TopRight":J=1-(((1-B[0])*(1-F[1]))/2);break;case"TopBottom":J=Math.min(B[0],B[1])+((Math.max(B[0],B[1])-Math.min(B[0],B[1]))/2);break;case"LeftBottom":J=F[0]*B[1]/2;break;default:J=1}return J};curvyObject.rgb2Array=function(A){var B=A.substring(4,A.indexOf(")"));return B.split(", ")};curvyObject.rgb2Hex=function(B){try{var C=curvyObject.rgb2Array(B);var G=parseInt(C[0]);var E=parseInt(C[1]);var A=parseInt(C[2]);var D="#"+curvyObject.IntToHex(G)+curvyObject.IntToHex(E)+curvyObject.IntToHex(A)}catch(F){var H="getMessage" in F?F.getMessage():F.message;throw new Error("Error ("+H+") converting RGB value to Hex in rgb2Hex")}return D};curvyObject.setOpacity=function(F,C){C=(C==100)?99.999:C;if(curvyBrowser.isSafari&&F.tagName!="IFRAME"){var B=curvyObject.rgb2Array(F.style.backgroundColor);var E=parseInt(B[0]);var D=parseInt(B[1]);var A=parseInt(B[2]);F.style.backgroundColor="rgba("+E+", "+D+", "+A+", "+C/100+")"}else{if(typeof F.style.opacity!=="undefined"){F.style.opacity=C/100}else{if(typeof F.style.MozOpacity!=="undefined"){F.style.MozOpacity=C/100}else{if(typeof F.style.filter!="undefined"){F.style.filter="alpha(opacity="+C+")"}else{if(typeof F.style.KHTMLOpacity!="undefined"){F.style.KHTMLOpacity=C/100}}}}}};function addEvent(D,C,B,A){if(D.addEventListener){D.addEventListener(C,B,A);return true}if(D.attachEvent){return D.attachEvent("on"+C,B)}D["on"+C]=B;return false}curvyObject.getComputedColour=function(E){var F=document.createElement("DIV");F.style.backgroundColor=E;document.body.appendChild(F);if(window.getComputedStyle){var D=document.defaultView.getComputedStyle(F,null).getPropertyValue("background-color");F.parentNode.removeChild(F);if(D.substr(0,3)==="rgb"){D=curvyObject.rgb2Hex(D)}return D}else{var A=document.body.createTextRange();A.moveToElementText(F);A.execCommand("ForeColor",false,E);var B=A.queryCommandValue("ForeColor");var C="rgb("+(B&255)+", "+((B&65280)>>8)+", "+((B&16711680)>>16)+")";F.parentNode.removeChild(F);A=null;return curvyObject.rgb2Hex(C)}};curvyObject.format_colour=function(A){if(A!=""&&A!="transparent"){if(A.substr(0,3)==="rgb"){A=curvyObject.rgb2Hex(A)}else{if(A.charAt(0)!=="#"){A=curvyObject.getComputedColour(A)}else{if(A.length===4){A="#"+A.charAt(1)+A.charAt(1)+A.charAt(2)+A.charAt(2)+A.charAt(3)+A.charAt(3)}}}}return A};curvyCorners.getElementsByClass=function(H,F){var E=new Array;if(F===undefined){F=document}H=H.split(".");var A="*";if(H.length===1){A=H[0];H=false}else{if(H[0]){A=H[0]}H=H[1]}var D,C,B;if(A.charAt(0)==="#"){C=document.getElementById(A.substr(1));if(C){E.push(C)}}else{C=F.getElementsByTagName(A);B=C.length;if(H){var G=new RegExp("(^|\\s)"+H+"(\\s|$)");for(D=0;D6){var H=J["-webkit-border-radius"]||0;var K=J["-webkit-border-top-right-radius"]||0;var F=J["-webkit-border-top-left-radius"]||0;var G=J["-webkit-border-bottom-right-radius"]||0;var M=J["-webkit-border-bottom-left-radius"]||0}else{var H=J["webkit-border-radius"]||0;var K=J["webkit-border-top-right-radius"]||0;var F=J["webkit-border-top-left-radius"]||0;var G=J["webkit-border-bottom-right-radius"]||0;var M=J["webkit-border-bottom-left-radius"]||0}if(H||F||K||G||M){var I=new curvyCnrSpec(L.selectorText);if(H){I.setcorner(null,null,parseInt(H),B(H))}else{if(K){I.setcorner("t","r",parseInt(K),B(K))}if(F){I.setcorner("t","l",parseInt(F),B(F))}if(M){I.setcorner("b","l",parseInt(M),B(M))}if(G){I.setcorner("b","r",parseInt(G),B(G))}}curvyCorners(I)}}for(E=0;E';
- if (!this.selectedFound) this.selectedNode = null;
- this.completed = true;
- return str;
-};
-
-// Creates the tree structure
-dTree.prototype.addNode = function(pNode) {
- var str = '';
- var n=0;
- if (this.config.inOrder) n = pNode._ai;
- for (n; n ';
- }
- if (node.url) {
- str += '';
- }
- else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)
- str += ' ';
- str += node.name;
- if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += ' ';
- str += '';
- if (node._hc) {
- str += '';
- str += this.addNode(node);
- str += '
';
- }
- this.aIndent.pop();
- return str;
-};
-
-// Adds the empty and line icons
-dTree.prototype.indent = function(node, nodeId) {
- var str = '';
- if (this.root.id != node.pid) {
- for (var n=0; n ';
- (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);
- if (node._hc) {
- str += ' ';
- } else str += ' ';
- }
- return str;
-};
-
-// Checks if a node has any children and if it is the last sibling
-dTree.prototype.setCS = function(node) {
- var lastId;
- for (var n=0; n)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
-Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
-(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
-a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
-"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
-function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;ba ";
-var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
-parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
-false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML=" ";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
-s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
-applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
-else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
-a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
-w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
-cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
-c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
-a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
-function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
-k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
-C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type=
-e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
-f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
-if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
-e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
-"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
-d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
-t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
-g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
-CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
-g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
-text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
-setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
-h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
-"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
-h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l ";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
-q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=" ";
-if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="
";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
-(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
-function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
-{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
-"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
-d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
-a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
-1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"+d+">"},F={option:[1,""," "],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
-c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
-prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
-this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
-""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
-return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
-""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
-c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
-c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
-function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
-Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
-"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
-a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
-a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/
-
-
-
-
-
-
-
-
-