diff --git a/.gitignore b/.gitignore index 6a0bf36496..78379d4bf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# ignore html dir for github pages +/doc/html + *.so *.[oa] *.out @@ -17,6 +20,13 @@ *.aux +# Eclipse IDE project files +*.cproject +*.project +*.externalToolBuilders +/build.properties +/META-INF + # Debian related files *.deb *.dsc diff --git a/Doxyfile b/Doxyfile index 934897d58e..bd783c89f6 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.6.3 +# Doxyfile 1.7.4 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -25,20 +25,33 @@ 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 = Paparazzi +PROJECT_NAME = "Paparazzi UAS" # 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 = 4 +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "Paparazzi is a free software Unmanned Aircraft System." + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = data/pictures/penguin_icon.png # 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 +OUTPUT_DIRECTORY = doc/html # 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 @@ -57,7 +70,7 @@ CREATE_SUBDIRS = NO # 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, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English @@ -126,7 +139,7 @@ STRIP_FROM_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 +# (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO @@ -137,7 +150,7 @@ SHORT_NAMES = NO # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) -JAVADOC_AUTOBRIEF = NO +JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style @@ -207,14 +220,15 @@ OPTIMIZE_FOR_FORTRAN = NO 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. +# 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, CSharp, 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 = @@ -222,7 +236,7 @@ EXTENSION_MAPPING = # 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 +# func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO @@ -240,7 +254,7 @@ 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 +# will make doxygen 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. @@ -262,6 +276,13 @@ DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + # 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 @@ -278,10 +299,10 @@ TYPEDEF_HIDES_STRUCT = NO # 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. +# causing a significant performance penalty. # 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 +# a logarithmic scale so increasing the size by one will roughly 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 @@ -326,7 +347,7 @@ EXTRACT_LOCAL_METHODS = NO # 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. +# anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO @@ -411,7 +432,13 @@ SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO -# 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. +# 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 @@ -431,6 +458,15 @@ SORT_GROUP_NAMES = NO SORT_BY_SCOPE_NAME = NO +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + # 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. @@ -461,10 +497,10 @@ GENERATE_DEPRECATEDLIST= YES 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 initial value of a variable or macro 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 +# The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. @@ -489,8 +525,7 @@ SHOW_DIRECTORIES = 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 +# 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 @@ -505,12 +540,12 @@ SHOW_NAMESPACES = YES 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. +# 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 = @@ -542,7 +577,7 @@ WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for +# The WARN_NO_PARAMDOC option can be enabled 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 @@ -574,7 +609,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = sw/airborne sw/airborne/math +INPUT = doc/manual sw/airborne # 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 @@ -588,8 +623,9 @@ INPUT_ENCODING = UTF-8 # 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 +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = @@ -597,16 +633,30 @@ FILE_PATTERNS = # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. -RECURSIVE = NO +RECURSIVE = YES # 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 = var +EXCLUDE = sw/airborne/csc/ \ + sw/airborne/obsolete/ \ + sw/airborne/booz/ \ + sw/airborne/test/ \ + sw/airborne/arch/avr/ \ + sw/airborne/firmwares/non_ap/ \ + sw/airborne/firmwares/logger/ \ + sw/airborne/firmwares/vor/ \ + sw/airborne/firmwares/wind_tunnel/ \ + sw/airborne/firmwares/beth/ \ + sw/airborne/firmwares/motor_bench/ \ + sw/airborne/fms/ \ + sw/airborne/arch/lpc21/test/ \ + sw/airborne/arch/lpc21/efsl/ \ + sw/airborne/arch/lpc21/lpcusb/ # The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO @@ -658,20 +708,17 @@ IMAGE_PATH = # 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 +# to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. 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: +# 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. +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = @@ -681,6 +728,14 @@ FILTER_PATTERNS = FILTER_SOURCE_FILES = NO +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- @@ -718,8 +773,7 @@ REFERENCES_RELATION = YES # 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. +# link to the source code. Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES @@ -745,7 +799,7 @@ VERBATIM_HEADERS = YES # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. -ALPHABETICAL_INDEX = NO +ALPHABETICAL_INDEX = YES # 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 @@ -773,7 +827,7 @@ GENERATE_HTML = YES # 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 +HTML_OUTPUT = docs # 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 @@ -783,7 +837,14 @@ 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 -# standard header. +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is adviced to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = @@ -802,6 +863,40 @@ HTML_FOOTER = HTML_STYLESHEET = +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + # 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. @@ -830,7 +925,8 @@ HTML_DYNAMIC_SECTIONS = YES # 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. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. GENERATE_DOCSET = NO @@ -848,6 +944,16 @@ DOCSET_FEEDNAME = "Doxygen generated docs" DOCSET_BUNDLE_ID = org.doxygen.Project +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + # 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) @@ -892,10 +998,10 @@ BINARY_TOC = NO TOC_EXPAND = NO -# 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. +# 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 @@ -917,20 +1023,24 @@ QHP_NAMESPACE = org.doxygen.Project 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 +# 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. +# 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 +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's # filter section matches. -# Qt Help Project / Filter Attributes. +# +# Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = @@ -942,12 +1052,13 @@ QHP_SECT_FILTER_ATTRS = 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 +# 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. +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. GENERATE_ECLIPSEHELP = NO @@ -963,8 +1074,10 @@ ECLIPSE_DOC_ID = org.doxygen.Project DISABLE_INDEX = NO -# 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. +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 @@ -976,7 +1089,7 @@ ENUM_VALUES_PER_LINE = 4 # 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 +GENERATE_TREEVIEW = YES # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. @@ -989,6 +1102,11 @@ USE_INLINE_TREES = NO TREEVIEW_WIDTH = 250 +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + # 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 @@ -997,15 +1115,50 @@ TREEVIEW_WIDTH = 250 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 +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# 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 +# 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 disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO @@ -1046,7 +1199,7 @@ MAKEINDEX_CMD_NAME = makeindex 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 +# by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide @@ -1063,6 +1216,13 @@ EXTRA_PACKAGES = LATEX_HEADER = +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + # 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 @@ -1089,7 +1249,10 @@ LATEX_BATCHMODE = NO 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. +# 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 @@ -1229,10 +1392,8 @@ GENERATE_PERLMOD = NO 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 +# 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. @@ -1269,7 +1430,7 @@ MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO # 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. +# pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES @@ -1277,8 +1438,7 @@ SEARCH_INCLUDES = YES # contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = sw/include \ - sw/airborne +INCLUDE_PATH = sw/include # 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 @@ -1295,22 +1455,20 @@ INCLUDE_FILE_PATTERNS = # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = KILL_SWITCH \ - USE_BUSS_TWI_BLMC \ - USE_AMI601 +PREDEFINED = # 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. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. 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 -# the parser if not removed. +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES @@ -1322,11 +1480,9 @@ SKIP_FUNCTION_MACROS = YES # 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 ... +# TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: -# -# TAGFILES = file1=loc1 "file2 = loc2" ... +# 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. @@ -1366,9 +1522,8 @@ PERL_PATH = /usr/bin/perl # 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. +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES @@ -1394,11 +1549,18 @@ HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES -# 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, +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You 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. @@ -1478,7 +1640,7 @@ CALL_GRAPH = YES 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. +# will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES @@ -1490,10 +1652,10 @@ GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES # 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 +# generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. -DOT_IMAGE_FORMAT = gif +DOT_IMAGE_FORMAT = png # 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. @@ -1506,6 +1668,12 @@ DOT_PATH = DOTFILE_DIRS = +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + # 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 diff --git a/README b/README index 1fbae924f2..ed5b36cc2c 100644 --- a/README +++ b/README @@ -39,8 +39,6 @@ conf: the configuration directory (airframe, radio, ... descriptions). data: where to put read-only data (e.g. maps, terrain elevation files, icons) -hw: hardware (electronic schemas, PCBs, ...) - sw: software (onboard, ground station, simulation, ...) var: products of compilation, cache for the map tiles, ... diff --git a/conf/Makefile.stm32 b/conf/Makefile.stm32 index 707d867861..edd19a7e1f 100644 --- a/conf/Makefile.stm32 +++ b/conf/Makefile.stm32 @@ -118,7 +118,7 @@ endif MULTILIB = $(shell if $(CC) --print-multi-lib | grep thumb2 > /dev/null ; then echo "yes"; else echo "no"; fi) CFLAGS = -I. -I./$(ARCH) $(INCLUDES) -D__thumb2__ -Wall -msoft-float -O$(OPT) -CFLAGS += -Wl,gc-sections +CFLAGS += -Wl,--gc-sections CFLAGS += -mcpu=$(MCU) -mthumb -ansi ifeq ("$(MULTILIB)","yes") CFLAGS += -mfix-cortex-m3-ldrd @@ -149,9 +149,9 @@ endif AFLAGS += -x assembler-with-cpp -Wa,-adhlns=$(OBJDIR)/$(<:.S=.lst),--g$(DEBUG) ifeq ("$(MULTILIB)","yes") -LDFLAGS = -T$(LDSCRIPT) -nostartfiles -O$(OPT) --gc-sections -mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float +LDFLAGS = -T$(LDSCRIPT) -nostartfiles -O$(OPT) -mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float else -LDFLAGS = -D__thumb2__ -T$(LDSCRIPT) -nostartfiles -L$(GCC_LIB_DIR) -O$(OPT) --gc-sections +LDFLAGS = -D__thumb2__ -T$(LDSCRIPT) -nostartfiles -L$(GCC_LIB_DIR) -O$(OPT) endif LDFLAGS += -Wl,-Map=$(OBJDIR)/$(TARGET).map,--cref,--gc-sections LDLIBS += -lc -lm -lgcc -lcmsis -lstm32 -l$(LIBOPENCM3_LIB) diff --git a/conf/airframes/CDW/ChimuJTinyFwSpi.xml b/conf/airframes/CDW/ChimuJTinyFwSpi.xml new file mode 100644 index 0000000000..98868c8e66 --- /dev/null +++ b/conf/airframes/CDW/ChimuJTinyFwSpi.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +
+ + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ +
+ + + + + + + +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/conf/airframes/CDW/debug_i2c.xml b/conf/airframes/CDW/debug_i2c.xml index 27d5dfdf5b..4e23d41dbd 100644 --- a/conf/airframes/CDW/debug_i2c.xml +++ b/conf/airframes/CDW/debug_i2c.xml @@ -74,9 +74,7 @@
- -
@@ -164,7 +162,6 @@
-
diff --git a/conf/airframes/ENAC/quadrotor/blender.xml b/conf/airframes/ENAC/quadrotor/blender.xml index 4a23ddd7b6..c1682f0477 100644 --- a/conf/airframes/ENAC/quadrotor/blender.xml +++ b/conf/airframes/ENAC/quadrotor/blender.xml @@ -228,7 +228,6 @@
-
diff --git a/conf/airframes/ENAC/quadrotor/booz2_g1.xml b/conf/airframes/ENAC/quadrotor/booz2_g1.xml index db0e515bc6..6b639e148d 100644 --- a/conf/airframes/ENAC/quadrotor/booz2_g1.xml +++ b/conf/airframes/ENAC/quadrotor/booz2_g1.xml @@ -158,7 +158,6 @@
-
@@ -193,9 +192,7 @@
- -
diff --git a/conf/airframes/ENAC/quadrotor/g1_vision.xml b/conf/airframes/ENAC/quadrotor/g1_vision.xml index 001a712d4e..f6833aa79e 100644 --- a/conf/airframes/ENAC/quadrotor/g1_vision.xml +++ b/conf/airframes/ENAC/quadrotor/g1_vision.xml @@ -131,7 +131,6 @@
-
@@ -174,9 +173,7 @@
- -
diff --git a/conf/airframes/ENAC/quadrotor/mkk1-vision.xml b/conf/airframes/ENAC/quadrotor/mkk1-vision.xml index b81cb8ac65..54afa6cd75 100644 --- a/conf/airframes/ENAC/quadrotor/mkk1-vision.xml +++ b/conf/airframes/ENAC/quadrotor/mkk1-vision.xml @@ -164,7 +164,6 @@
-
@@ -207,9 +206,7 @@
- -
diff --git a/conf/airframes/ENAC/quadrotor/mkk1.xml b/conf/airframes/ENAC/quadrotor/mkk1.xml index c44af4ea1c..f574321c9f 100644 --- a/conf/airframes/ENAC/quadrotor/mkk1.xml +++ b/conf/airframes/ENAC/quadrotor/mkk1.xml @@ -194,7 +194,6 @@
-
@@ -227,9 +226,7 @@
- -
diff --git a/conf/airframes/ENAC/quadrotor/nova1.xml b/conf/airframes/ENAC/quadrotor/nova1.xml index 1d75a0ee58..3198cd7af5 100644 --- a/conf/airframes/ENAC/quadrotor/nova1.xml +++ b/conf/airframes/ENAC/quadrotor/nova1.xml @@ -165,7 +165,6 @@
-
@@ -198,9 +197,7 @@
- -
diff --git a/conf/airframes/NoVa_L.xml b/conf/airframes/NoVa_L.xml index 4a8f9b0a4c..42794dc1bb 100644 --- a/conf/airframes/NoVa_L.xml +++ b/conf/airframes/NoVa_L.xml @@ -102,9 +102,7 @@
- -
@@ -192,7 +190,6 @@
-
diff --git a/conf/airframes/PPZUAV/quadrotor/ppzuav_booz2_asctec_example.xml b/conf/airframes/PPZUAV/quadrotor/ppzuav_booz2_asctec_example.xml index 9e05da1098..830c2d2260 100644 --- a/conf/airframes/PPZUAV/quadrotor/ppzuav_booz2_asctec_example.xml +++ b/conf/airframes/PPZUAV/quadrotor/ppzuav_booz2_asctec_example.xml @@ -178,9 +178,7 @@
- -
diff --git a/conf/airframes/PPZUAV/quadrotor/ppzuav_booz2_mkk_example.xml b/conf/airframes/PPZUAV/quadrotor/ppzuav_booz2_mkk_example.xml index 7c4c1e8e8a..750ad110ec 100644 --- a/conf/airframes/PPZUAV/quadrotor/ppzuav_booz2_mkk_example.xml +++ b/conf/airframes/PPZUAV/quadrotor/ppzuav_booz2_mkk_example.xml @@ -196,9 +196,7 @@
- -
diff --git a/conf/airframes/Poine/booz2_a1.xml b/conf/airframes/Poine/booz2_a1.xml index f90a486d32..30358596c0 100644 --- a/conf/airframes/Poine/booz2_a1.xml +++ b/conf/airframes/Poine/booz2_a1.xml @@ -169,9 +169,7 @@
- -
diff --git a/conf/airframes/Poine/booz2_a1p.xml b/conf/airframes/Poine/booz2_a1p.xml index e0903b41a3..4dc659aa53 100644 --- a/conf/airframes/Poine/booz2_a1p.xml +++ b/conf/airframes/Poine/booz2_a1p.xml @@ -173,9 +173,7 @@
- -
diff --git a/conf/airframes/Poine/booz2_a7.xml b/conf/airframes/Poine/booz2_a7.xml index fe7afd9476..8b408aeed4 100644 --- a/conf/airframes/Poine/booz2_a7.xml +++ b/conf/airframes/Poine/booz2_a7.xml @@ -74,9 +74,7 @@
- -
@@ -164,7 +162,6 @@
-
diff --git a/conf/airframes/Poine/booz2_a8.xml b/conf/airframes/Poine/booz2_a8.xml index 46ad289276..c98fbb24cb 100644 --- a/conf/airframes/Poine/booz2_a8.xml +++ b/conf/airframes/Poine/booz2_a8.xml @@ -182,9 +182,7 @@
- -
diff --git a/conf/airframes/Poine/easy_glider1.xml b/conf/airframes/Poine/easy_glider1.xml index 25b6298d47..44791bc811 100644 --- a/conf/airframes/Poine/easy_glider1.xml +++ b/conf/airframes/Poine/easy_glider1.xml @@ -76,7 +76,6 @@
-
diff --git a/conf/airframes/Poine/h_hex.xml b/conf/airframes/Poine/h_hex.xml index db9214e262..3979fb654c 100644 --- a/conf/airframes/Poine/h_hex.xml +++ b/conf/airframes/Poine/h_hex.xml @@ -76,9 +76,7 @@
- -
@@ -183,7 +181,7 @@ - + diff --git a/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_overo_fw.xml b/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_overo_fw.xml new file mode 100644 index 0000000000..ab07cfb2b8 --- /dev/null +++ b/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_overo_fw.xml @@ -0,0 +1,2 @@ + + diff --git a/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_overo_rc.xml b/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_overo_rc.xml new file mode 100644 index 0000000000..ab07cfb2b8 --- /dev/null +++ b/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_overo_rc.xml @@ -0,0 +1,2 @@ + + diff --git a/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_fw.xml b/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_fw.xml new file mode 100644 index 0000000000..ab07cfb2b8 --- /dev/null +++ b/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_fw.xml @@ -0,0 +1,2 @@ + + diff --git a/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_rc.xml b/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_rc.xml new file mode 100644 index 0000000000..ab07cfb2b8 --- /dev/null +++ b/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_rc.xml @@ -0,0 +1,2 @@ + + diff --git a/conf/airframes/TestHardware/LisaM_1.0_aspirin_v1.5_fw.xml b/conf/airframes/TestHardware/LisaM_1.0_aspirin_v1.5_fw.xml new file mode 100644 index 0000000000..ab07cfb2b8 --- /dev/null +++ b/conf/airframes/TestHardware/LisaM_1.0_aspirin_v1.5_fw.xml @@ -0,0 +1,2 @@ + + diff --git a/conf/airframes/TestHardware/LisaM_1.0_aspirin_v1.5_rc.xml b/conf/airframes/TestHardware/LisaM_1.0_aspirin_v1.5_rc.xml new file mode 100644 index 0000000000..ab07cfb2b8 --- /dev/null +++ b/conf/airframes/TestHardware/LisaM_1.0_aspirin_v1.5_rc.xml @@ -0,0 +1,2 @@ + + diff --git a/conf/airframes/TestHardware/Tiny_2.11_fw.xml b/conf/airframes/TestHardware/Tiny_2.11_fw.xml new file mode 100644 index 0000000000..ab07cfb2b8 --- /dev/null +++ b/conf/airframes/TestHardware/Tiny_2.11_fw.xml @@ -0,0 +1,2 @@ + + diff --git a/conf/airframes/UofAdelaide/A1000_BOOZ.xml b/conf/airframes/UofAdelaide/A1000_BOOZ.xml index 54dbc672ca..1a5c088e1c 100644 --- a/conf/airframes/UofAdelaide/A1000_BOOZ.xml +++ b/conf/airframes/UofAdelaide/A1000_BOOZ.xml @@ -242,9 +242,7 @@ second attempt
- -
diff --git a/conf/airframes/UofAdelaide/A1000_LISA.xml b/conf/airframes/UofAdelaide/A1000_LISA.xml index 5493c8d8c5..f48128a609 100644 --- a/conf/airframes/UofAdelaide/A1000_LISA.xml +++ b/conf/airframes/UofAdelaide/A1000_LISA.xml @@ -74,9 +74,7 @@
- -
diff --git a/conf/airframes/UofAdelaide/A1000_NOVA.xml b/conf/airframes/UofAdelaide/A1000_NOVA.xml index 761350b2c9..bcef6ccc71 100644 --- a/conf/airframes/UofAdelaide/A1000_NOVA.xml +++ b/conf/airframes/UofAdelaide/A1000_NOVA.xml @@ -204,10 +204,7 @@
- - -
diff --git a/conf/airframes/UofAdelaide/booz2_NoVa_001_1000.xml b/conf/airframes/UofAdelaide/booz2_NoVa_001_1000.xml index e2189844cc..e00eac3141 100644 --- a/conf/airframes/UofAdelaide/booz2_NoVa_001_1000.xml +++ b/conf/airframes/UofAdelaide/booz2_NoVa_001_1000.xml @@ -204,10 +204,7 @@
- - -
diff --git a/conf/airframes/UofAdelaide/booz2_a1000.xml b/conf/airframes/UofAdelaide/booz2_a1000.xml index bc0f5c553a..3ea1b957b4 100755 --- a/conf/airframes/UofAdelaide/booz2_a1000.xml +++ b/conf/airframes/UofAdelaide/booz2_a1000.xml @@ -244,9 +244,7 @@ second attempt
- -
diff --git a/conf/airframes/UofAdelaide/lisa_a1000.xml b/conf/airframes/UofAdelaide/lisa_a1000.xml index 71ddb6413d..bf9899187e 100644 --- a/conf/airframes/UofAdelaide/lisa_a1000.xml +++ b/conf/airframes/UofAdelaide/lisa_a1000.xml @@ -71,9 +71,7 @@
- -
diff --git a/conf/airframes/booz2_flixr.xml b/conf/airframes/booz2_flixr.xml index 6aa4a7ee6d..f21e10ec05 100644 --- a/conf/airframes/booz2_flixr.xml +++ b/conf/airframes/booz2_flixr.xml @@ -212,7 +212,6 @@
- diff --git a/conf/airframes/booz2_ppzuav.xml b/conf/airframes/booz2_ppzuav.xml index 0961e3f73f..2078e7e7de 100644 --- a/conf/airframes/booz2_ppzuav.xml +++ b/conf/airframes/booz2_ppzuav.xml @@ -179,10 +179,7 @@
- - -
diff --git a/conf/airframes/easy_glider_example.xml b/conf/airframes/easy_glider_example.xml index 4981d5fb8f..9bbb174eab 100644 --- a/conf/airframes/easy_glider_example.xml +++ b/conf/airframes/easy_glider_example.xml @@ -69,7 +69,6 @@
-
diff --git a/conf/airframes/esden/jt_lisam.xml b/conf/airframes/esden/jt_lisam.xml index cd1948f709..cb1e3fc21a 100644 --- a/conf/airframes/esden/jt_lisam.xml +++ b/conf/airframes/esden/jt_lisam.xml @@ -65,9 +65,7 @@
- -
@@ -196,7 +194,7 @@ - + diff --git a/conf/airframes/esden/lisa_asctec.xml b/conf/airframes/esden/lisa_asctec.xml index b2a8c41b02..50c0a66790 100644 --- a/conf/airframes/esden/lisa_asctec.xml +++ b/conf/airframes/esden/lisa_asctec.xml @@ -81,9 +81,7 @@
- -
diff --git a/conf/airframes/esden/lisa_asctec_aspirin.xml b/conf/airframes/esden/lisa_asctec_aspirin.xml index 67bad41320..9852a28db6 100644 --- a/conf/airframes/esden/lisa_asctec_aspirin.xml +++ b/conf/airframes/esden/lisa_asctec_aspirin.xml @@ -81,9 +81,7 @@
- -
@@ -202,7 +200,7 @@ - + diff --git a/conf/airframes/esden/lisa_m_pwm.xml b/conf/airframes/esden/lisa_m_pwm.xml index c7aa63004b..96940571fe 100644 --- a/conf/airframes/esden/lisa_m_pwm.xml +++ b/conf/airframes/esden/lisa_m_pwm.xml @@ -95,9 +95,7 @@
- -
@@ -223,7 +221,7 @@ - + diff --git a/conf/airframes/esden/lisa_pwm_aspirin.xml b/conf/airframes/esden/lisa_pwm_aspirin.xml index 86ecf78dd6..dd2c46b85e 100644 --- a/conf/airframes/esden/lisa_pwm_aspirin.xml +++ b/conf/airframes/esden/lisa_pwm_aspirin.xml @@ -69,9 +69,7 @@
- -
@@ -200,7 +198,7 @@ - + diff --git a/conf/airframes/esden/synerani_4B.xml b/conf/airframes/esden/synerani_4B.xml index 7b6827b926..d96d36b2f0 100644 --- a/conf/airframes/esden/synerani_4B.xml +++ b/conf/airframes/esden/synerani_4B.xml @@ -72,9 +72,7 @@
- -
@@ -203,7 +201,7 @@ - + diff --git a/conf/airframes/mm/extra/rctx.xml b/conf/airframes/mm/extra/rctx.xml index da6e0d221f..ad468276c0 100644 --- a/conf/airframes/mm/extra/rctx.xml +++ b/conf/airframes/mm/extra/rctx.xml @@ -12,7 +12,6 @@
- diff --git a/conf/airframes/mm/fixed-wing/funjetgfi3.xml b/conf/airframes/mm/fixed-wing/funjetgfi3.xml index 4570d819b7..b90be3eb3b 100644 --- a/conf/airframes/mm/fixed-wing/funjetgfi3.xml +++ b/conf/airframes/mm/fixed-wing/funjetgfi3.xml @@ -79,7 +79,6 @@
- diff --git a/conf/airframes/mm/fixed-wing/funjetgfi4.xml b/conf/airframes/mm/fixed-wing/funjetgfi4.xml index 4b2a1a8d56..e7326bcfe3 100644 --- a/conf/airframes/mm/fixed-wing/funjetgfi4.xml +++ b/conf/airframes/mm/fixed-wing/funjetgfi4.xml @@ -78,7 +78,6 @@
- diff --git a/conf/airframes/mm/hangar/black_one.xml b/conf/airframes/mm/hangar/black_one.xml index be9796bf51..d7e6d06287 100644 --- a/conf/airframes/mm/hangar/black_one.xml +++ b/conf/airframes/mm/hangar/black_one.xml @@ -103,7 +103,6 @@
- diff --git a/conf/airframes/mm/hangar/glass_one1.xml b/conf/airframes/mm/hangar/glass_one1.xml index e8bf7ff754..82b92dedd8 100644 --- a/conf/airframes/mm/hangar/glass_one1.xml +++ b/conf/airframes/mm/hangar/glass_one1.xml @@ -91,7 +91,6 @@
- diff --git a/conf/airframes/mm/hangar/glass_one2.xml b/conf/airframes/mm/hangar/glass_one2.xml index 2aa4cd4511..3848eadc40 100644 --- a/conf/airframes/mm/hangar/glass_one2.xml +++ b/conf/airframes/mm/hangar/glass_one2.xml @@ -74,7 +74,6 @@
- diff --git a/conf/airframes/mm/hangar/glass_one3.xml b/conf/airframes/mm/hangar/glass_one3.xml index 64c7c610fb..834100ad89 100644 --- a/conf/airframes/mm/hangar/glass_one3.xml +++ b/conf/airframes/mm/hangar/glass_one3.xml @@ -92,7 +92,6 @@
- diff --git a/conf/airframes/mm/hangar/mac06a.xml b/conf/airframes/mm/hangar/mac06a.xml index 932014cd75..63dae8793b 100644 --- a/conf/airframes/mm/hangar/mac06a.xml +++ b/conf/airframes/mm/hangar/mac06a.xml @@ -89,7 +89,6 @@
- diff --git a/conf/airframes/mm/hangar/red_one.xml b/conf/airframes/mm/hangar/red_one.xml index 887601c421..2c074fcba9 100644 --- a/conf/airframes/mm/hangar/red_one.xml +++ b/conf/airframes/mm/hangar/red_one.xml @@ -96,7 +96,6 @@
- diff --git a/conf/airframes/mm/rotor/qmk1.xml b/conf/airframes/mm/rotor/qmk1.xml index a210004acd..c414b3214b 100644 --- a/conf/airframes/mm/rotor/qmk1.xml +++ b/conf/airframes/mm/rotor/qmk1.xml @@ -81,9 +81,7 @@
- -
diff --git a/conf/autopilot/lisa_m_test_progs.makefile b/conf/autopilot/lisa_m_test_progs.makefile index e5c334f6f0..9135a84da8 100644 --- a/conf/autopilot/lisa_m_test_progs.makefile +++ b/conf/autopilot/lisa_m_test_progs.makefile @@ -714,22 +714,22 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_manual.srcs += $(SRC_SUBSYSTEMS)/radio_control.c \ # subsystems/radio_control/spektrum.c \ # $(SRC_ARCH)/subsystems/radio_control/spektrum_arch.c + + + # +# tunnel # -# -## -## tunnel -## -#tunnel.ARCHDIR = $(ARCH) -#tunnel.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT -#tunnel.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -#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 -#tunnel.srcs += $(SRC_ARCH)/led_hw.c -#tunnel.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -#tunnel.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)' -#tunnel.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c +tunnel.ARCHDIR = $(ARCH) +tunnel.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT +tunnel.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) +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 +tunnel.srcs += $(SRC_ARCH)/led_hw.c +tunnel.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) +tunnel.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)' +tunnel.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c diff --git a/conf/autopilot/logger.makefile b/conf/autopilot/logger.makefile index 1845dd204b..680131df66 100644 --- a/conf/autopilot/logger.makefile +++ b/conf/autopilot/logger.makefile @@ -50,6 +50,9 @@ ap.srcs += mcu.c #set SPI interface for SD card (0 or 1) ap.CFLAGS += -DHW_ENDPOINT_LPC2000_SPINUM=$(SPI_CHANNEL) +#LPC2148 USB hw module needs at least 18MHz PCLK +ap.CFLAGS += -DUSE_USB_HIGH_PCLK + #efsl ap.CFLAGS += -I $(SRC_ARCH)/efsl/inc -I $(SRC_ARCH)/efsl/conf diff --git a/conf/autopilot/setup.makefile b/conf/autopilot/setup.makefile index f4bea44b93..ca6ac88fc1 100644 --- a/conf/autopilot/setup.makefile +++ b/conf/autopilot/setup.makefile @@ -9,15 +9,31 @@ CFG_SHARED=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/shared SRC_ARCH=arch/$(ARCH) SRC_FIRMWARE=firmwares/setup +SRC_LISA=lisa SETUP_INC = -I$(SRC_FIRMWARE) $(TARGET).CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) # a test program to tunnel between both uart +ifeq ($(ARCH), lpc21) tunnel.CFLAGS += -DUSE_LED tunnel.srcs += $(SRC_ARCH)/uart_tunnel.c tunnel.srcs += mcu.c $(SRC_ARCH)/mcu_arch.c +else ifeq ($(ARCH), stm32) +tunnel.ARCHDIR = $(ARCH) +tunnel.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT +tunnel.srcs += 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 +tunnel.srcs += $(SRC_ARCH)/led_hw.c +tunnel.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) +tunnel.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)' +tunnel.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c +endif # for the usb_tunnel we need to set PCLK higher with the flag USE_USB_HIGH_PCLK @@ -40,7 +56,11 @@ usb_tunnel_1.srcs += $(SRC_ARCH)/lpcusb/usbcontrol.c $(SRC_ARCH)/lpcusb/usbstdre 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 else -$(error usb_tunnel currently only implemented for the lpc21) +ifeq ($(TARGET),usb_tunnel_0) +$(error usb_tunnel_0 currently only implemented for the lpc21) +else ifeq ($(TARGET),usb_tunnel_1) +$(error usb_tunnel_1 currently only implemented for the lpc21) +endif endif @@ -73,9 +93,13 @@ endif # a test program to setup actuators +ifeq ($(ARCH), lpc21) 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 mcu_periph/uart.c $(SRC_ARCH)/mcu_periph/uart_arch.c firmwares/fixedwing/main.c mcu.c $(SRC_ARCH)/mcu_arch.c +else ifeq ($(TARGET),setup_actuators) +$(error setup_actuators currently only implemented for the lpc21) +endif diff --git a/conf/autopilot/subsystems/fixedwing/autopilot.makefile b/conf/autopilot/subsystems/fixedwing/autopilot.makefile index 25687b7151..feb2496d0b 100644 --- a/conf/autopilot/subsystems/fixedwing/autopilot.makefile +++ b/conf/autopilot/subsystems/fixedwing/autopilot.makefile @@ -178,7 +178,7 @@ ap_srcs += $(SRC_FIXEDWING)/estimator.c UNAME = $(shell uname -s) ifeq ("$(UNAME)","Darwin") - sim.CFLAGS += -I/opt/local/include/ + sim.CFLAGS += -I/opt/paparazzi/include/ -I/opt/local/include/ endif sim.CFLAGS += $(CPPFLAGS) diff --git a/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile b/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile index 933150953b..c9d42eda7b 100644 --- a/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile +++ b/conf/autopilot/subsystems/fixedwing/navigation_extra.makefile @@ -17,4 +17,6 @@ $(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 +$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/gls.c +$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/border_line.c diff --git a/conf/autopilot/subsystems/fixedwing/radio_control_datalink.makefile b/conf/autopilot/subsystems/fixedwing/radio_control_datalink.makefile index 6202acf1b8..bb342a5c3e 100644 --- a/conf/autopilot/subsystems/fixedwing/radio_control_datalink.makefile +++ b/conf/autopilot/subsystems/fixedwing/radio_control_datalink.makefile @@ -11,6 +11,9 @@ endif ifeq ($(NORADIO), False) +ifdef (RADIO_CONTROL_DATALINK_LED) + ap.CFLAGS += -D(RADIO_CONTROL_DATALINK_LED=$((RADIO_CONTROL_DATALINK_LED) +endif $(TARGET).CFLAGS += -DRADIO_CONTROL $(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_H=\"radio_control/rc_datalink.h\" $(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_DATALINK diff --git a/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile b/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile index 5922e9c2ce..ed4da826d6 100644 --- a/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile +++ b/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile @@ -6,6 +6,8 @@ # ... # # +# +# # # # diff --git a/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.2.makefile b/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.2.makefile index 91ba3d16d4..b412070be6 100644 --- a/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.2.makefile +++ b/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.2.makefile @@ -42,7 +42,6 @@ # imu Booz2 v1.2 imu_CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_b2.h\" -imu_CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_HMC5843 imu_CFLAGS += -DIMU_B2_VERSION_1_2 imu_srcs += $(SRC_SUBSYSTEMS)/imu.c imu_srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c @@ -51,15 +50,16 @@ 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/hmc5843.c -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 ms2100 not used on this imu -imu_CFLAGS += -DMS2100_DRDY_VIC_SLOT=12 +imu_CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_HMC58XX +imu_CFLAGS += -DHMC58XX_I2C_DEVICE=i2c1 -DUSE_I2C1 +imu_srcs += peripherals/hmc58xx.c else ifeq ($(ARCH), stm32) +imu_CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_HMC5843 +imu_srcs += peripherals/hmc5843.c +imu_srcs += $(SRC_ARCH)/peripherals/hmc5843_arch.c imu_CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ imu_CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT) imu_CFLAGS += -DMAX_1168_DRDY_PORT_SOURCE=$(MAX_1168_DRDY_PORT_SOURCE) diff --git a/conf/autopilot/subsystems/fixedwing/imu_analog.makefile b/conf/autopilot/subsystems/shared/imu_analog.makefile similarity index 95% rename from conf/autopilot/subsystems/fixedwing/imu_analog.makefile rename to conf/autopilot/subsystems/shared/imu_analog.makefile index 9cfc7e1d90..b91187fe7a 100644 --- a/conf/autopilot/subsystems/fixedwing/imu_analog.makefile +++ b/conf/autopilot/subsystems/shared/imu_analog.makefile @@ -58,6 +58,10 @@ imu_CFLAGS += -DADC_CHANNEL_ACCEL_X=$(ACCEL_X) -DADC_CHANNEL_ACCEL_Y=$(ACCEL_Y) imu_srcs += $(SRC_SUBSYSTEMS)/imu.c imu_srcs += $(SRC_SUBSYSTEMS)/imu/imu_analog.c +else ifeq ($(ARCH), stm32) + +$(error Not implemented for the stm32 yet... should be trivial, just do it...) + endif # Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets diff --git a/conf/autopilot/subsystems/shared/imu_aspirin.makefile b/conf/autopilot/subsystems/shared/imu_aspirin.makefile index 51bbaa33e3..1c08dca87b 100644 --- a/conf/autopilot/subsystems/shared/imu_aspirin.makefile +++ b/conf/autopilot/subsystems/shared/imu_aspirin.makefile @@ -1,66 +1,3 @@ -# -# Aspirin IMU -# -# -# required xml: -#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
-# -# +include $(CFG_SHARED)/imu_aspirin_v1.0.makefile -# imu aspirin - -IMU_ASPIRIN_CFLAGS = -DUSE_IMU -IMU_ASPIRIN_CFLAGS += -DIMU_TYPE_H=\"imu/imu_aspirin.h\" -DIMU_OVERRIDE_CHANNELS -IMU_ASPIRIN_SRCS = $(SRC_SUBSYSTEMS)/imu.c \ - $(SRC_SUBSYSTEMS)/imu/imu_aspirin.c \ - $(SRC_ARCH)/subsystems/imu/imu_aspirin_arch.c - -# Magnetometer -IMU_ASPIRIN_SRCS += peripherals/hmc5843.c $(SRC_ARCH)/peripherals/hmc5843_arch.c - -IMU_ASPIRIN_CFLAGS += -DUSE_I2C2 - -ifeq ($(ARCH), lpc21) -#TODO -else ifeq ($(ARCH), stm32) -IMU_ASPIRIN_CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14 -IMU_ASPIRIN_CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5 -IMU_ASPIRIN_CFLAGS += -DUSE_EXTI2_IRQ # Accel Int on PD2 -IMU_ASPIRIN_CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA -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 -ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS) -ap.srcs += $(IMU_ASPIRIN_SRCS) - -# sim not done yet -#sim.CFLAGS += $(IMU_ASPIRIN_CFLAGS) -#sim.srcs += $(IMU_ASPIRIN_SRCS) +$(warning The imu_aspirin subsystem has been split up into different versions, please replace with (or aspirin_v1.5) in your airframe file.) diff --git a/conf/autopilot/subsystems/shared/imu_aspirin_common.makefile b/conf/autopilot/subsystems/shared/imu_aspirin_common.makefile new file mode 100644 index 0000000000..0deb8e75b3 --- /dev/null +++ b/conf/autopilot/subsystems/shared/imu_aspirin_common.makefile @@ -0,0 +1,58 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Common part for all Aspirin IMUs +# +# +# required xml: +#
+# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +#
+# +# + +# imu aspirin + +IMU_ASPIRIN_CFLAGS = -DUSE_IMU +IMU_ASPIRIN_CFLAGS += -DIMU_TYPE_H=\"imu/imu_aspirin.h\" -DIMU_OVERRIDE_CHANNELS +IMU_ASPIRIN_SRCS = $(SRC_SUBSYSTEMS)/imu.c \ + $(SRC_SUBSYSTEMS)/imu/imu_aspirin.c \ + $(SRC_ARCH)/subsystems/imu/imu_aspirin_arch.c + +# Magnetometer +IMU_ASPIRIN_SRCS += peripherals/hmc5843.c $(SRC_ARCH)/peripherals/hmc5843_arch.c + +IMU_ASPIRIN_CFLAGS += -DUSE_I2C2 + +ifeq ($(ARCH), lpc21) +#TODO +else ifeq ($(ARCH), stm32) +IMU_ASPIRIN_CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14 +IMU_ASPIRIN_CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5 +IMU_ASPIRIN_CFLAGS += -DUSE_EXTI2_IRQ # Accel Int on PD2 +IMU_ASPIRIN_CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA +endif + diff --git a/conf/autopilot/subsystems/shared/imu_aspirin_v1.0.makefile b/conf/autopilot/subsystems/shared/imu_aspirin_v1.0.makefile new file mode 100644 index 0000000000..3e2e8a7c26 --- /dev/null +++ b/conf/autopilot/subsystems/shared/imu_aspirin_v1.0.makefile @@ -0,0 +1,46 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Aspirin IMU v1.0 +# +# +# required xml: +#
+# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +#
+# +# + +# imu aspirin + +include $(CFG_SHARED)/imu_aspirin_common.makefile + +IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_1_0 + +# 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_ASPIRIN_CFLAGS) +ap.srcs += $(IMU_ASPIRIN_SRCS) diff --git a/conf/autopilot/subsystems/shared/imu_aspirin_v1.5.makefile b/conf/autopilot/subsystems/shared/imu_aspirin_v1.5.makefile new file mode 100644 index 0000000000..2686e94905 --- /dev/null +++ b/conf/autopilot/subsystems/shared/imu_aspirin_v1.5.makefile @@ -0,0 +1,46 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Aspirin IMU v1.5 +# +# +# required xml: +#
+# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +#
+# +# + +# imu aspirin + +include $(CFG_SHARED)/imu_aspirin_common.makefile + +IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_1_5 + +# 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_ASPIRIN_CFLAGS) +ap.srcs += $(IMU_ASPIRIN_SRCS) diff --git a/conf/autopilot/subsystems/shared/radio_control_ppm.makefile b/conf/autopilot/subsystems/shared/radio_control_ppm.makefile index 6b2fdeab88..41b7f90729 100644 --- a/conf/autopilot/subsystems/shared/radio_control_ppm.makefile +++ b/conf/autopilot/subsystems/shared/radio_control_ppm.makefile @@ -12,7 +12,7 @@ endif ifeq ($(NORADIO), False) $(TARGET).CFLAGS += -DRADIO_CONTROL - ifdef RADIO_CONTROL_LED + ifneq ($(RADIO_CONTROL_LED),none) ap.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) endif $(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/ppm.h\" diff --git a/conf/autopilot/subsystems/shared/radio_control_spektrum.makefile b/conf/autopilot/subsystems/shared/radio_control_spektrum.makefile index ae53bd7a26..192a21c376 100644 --- a/conf/autopilot/subsystems/shared/radio_control_spektrum.makefile +++ b/conf/autopilot/subsystems/shared/radio_control_spektrum.makefile @@ -10,7 +10,7 @@ ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/spektrum.h\" ifeq ($(ARCH), lpc21) ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_MODEL_H=$(RADIO_CONTROL_SPEKTRUM_MODEL) endif -ifdef RADIO_CONTROL_LED +ifneq ($(RADIO_CONTROL_LED),none) ap.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) endif ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_PRIMARY_PORT=$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT) diff --git a/conf/boards/classix.makefile b/conf/boards/classix.makefile index 79002ad107..055ec54e92 100644 --- a/conf/boards/classix.makefile +++ b/conf/boards/classix.makefile @@ -24,6 +24,7 @@ LPC21ISP_XTAL = 12000 ### default settings for classix GPS_BAUD = B38400 GPS_LED = none +RADIO_CONTROL_LED = none # All targets on the TINY board run on the same processor achitecture $(TARGET).ARCHDIR = $(ARCH) diff --git a/conf/boards/hb_1.1.makefile b/conf/boards/hb_1.1.makefile index b8d0c3ae0a..4c2a8c8525 100644 --- a/conf/boards/hb_1.1.makefile +++ b/conf/boards/hb_1.1.makefile @@ -37,6 +37,7 @@ GPS_BAUD = B38400 endif GPS_LED = 2 +RADIO_CONTROL_LED = none ifndef ADC_IR1 ADC_IR1 = 1 diff --git a/conf/boards/lisa_m_1.0.makefile b/conf/boards/lisa_m_1.0.makefile index 0a05903f17..269bc8aef4 100644 --- a/conf/boards/lisa_m_1.0.makefile +++ b/conf/boards/lisa_m_1.0.makefile @@ -31,7 +31,7 @@ SYS_TIME_LED = 1 RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT = UART3 RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT = UART5 -#RADIO_CONTROL_LED = 5 +RADIO_CONTROL_LED = none ifndef MODEM_PORT MODEM_PORT=UART2 diff --git a/conf/boards/tiny_2.11.makefile b/conf/boards/tiny_2.11.makefile index 33c35ec77c..00cbc94af6 100644 --- a/conf/boards/tiny_2.11.makefile +++ b/conf/boards/tiny_2.11.makefile @@ -36,6 +36,8 @@ ifndef MODEM_BAUD MODEM_BAUD = B57600 endif +RADIO_CONTROL_LED = none + ADC_IR_TOP = ADC_0 ADC_IR1 = ADC_1 ADC_IR2 = ADC_2 diff --git a/conf/boards/umarim_1.0.makefile b/conf/boards/umarim_1.0.makefile index 793cc91778..3ebc16dbcd 100644 --- a/conf/boards/umarim_1.0.makefile +++ b/conf/boards/umarim_1.0.makefile @@ -29,6 +29,8 @@ GPS_BAUD = B38400 endif GPS_LED = 2 +RADIO_CONTROL_LED = none + ifndef MODEM_PORT MODEM_PORT = UART1 endif diff --git a/conf/modules/baro_board.xml b/conf/modules/baro_board.xml index 4ace2ff541..0553718835 100644 --- a/conf/modules/baro_board.xml +++ b/conf/modules/baro_board.xml @@ -9,11 +9,21 @@ - - - - + + +ifeq ($(BOARD), navgo) + ap.CFLAGS += -DUSE_I2C1 -DUSE_ADS1114_1 + ap.CFLAGS += -DADS1114_I2C_DEVICE=i2c1 + ap.srcs += peripherals/ads1114.c +else ifeq ($(BOARD), umarim) + ap.CFLAGS += -DUSE_I2C1 -DUSE_ADS1114_1 + ap.CFLAGS += -DADS1114_I2C_DEVICE=i2c1 + ap.srcs += peripherals/ads1114.c +else ifeq ($(BOARD), lisa_l) + ap.CFLAGS += -DUSE_I2C2 +endif + diff --git a/conf/settings/tuning.xml b/conf/settings/tuning.xml index 8e9538720e..cf1fcb3f4c 100644 --- a/conf/settings/tuning.xml +++ b/conf/settings/tuning.xml @@ -31,6 +31,11 @@ + + + + + diff --git a/conf/settings/tuning_ctl_adaptive.xml b/conf/settings/tuning_ctl_adaptive.xml index 7cd558dae2..6271f6aa9c 100644 --- a/conf/settings/tuning_ctl_adaptive.xml +++ b/conf/settings/tuning_ctl_adaptive.xml @@ -6,6 +6,11 @@ + + + + + diff --git a/conf/settings/tuning_ctl_new.xml b/conf/settings/tuning_ctl_new.xml index d283b907fb..38f5e825fe 100644 --- a/conf/settings/tuning_ctl_new.xml +++ b/conf/settings/tuning_ctl_new.xml @@ -6,6 +6,11 @@ + + + + + diff --git a/conf/settings/tuning_ins.xml b/conf/settings/tuning_ins.xml index 1f092a4a56..0aa57141ef 100644 --- a/conf/settings/tuning_ins.xml +++ b/conf/settings/tuning_ins.xml @@ -31,6 +31,11 @@ + + + + + diff --git a/conf/settings/tuning_ins_dcm.xml b/conf/settings/tuning_ins_dcm.xml index 4ba4f43d96..91b399acbe 100644 --- a/conf/settings/tuning_ins_dcm.xml +++ b/conf/settings/tuning_ins_dcm.xml @@ -31,6 +31,11 @@ + + + + + diff --git a/conf/settings/tuning_loiter.xml b/conf/settings/tuning_loiter.xml index eb6a88c2fe..823fd33523 100644 --- a/conf/settings/tuning_loiter.xml +++ b/conf/settings/tuning_loiter.xml @@ -44,6 +44,10 @@ + + + + diff --git a/data/pictures/penguin_logo.svg b/data/pictures/penguin_logo.svg index 9ae8538987..8c9a98c24a 100644 --- a/data/pictures/penguin_logo.svg +++ b/data/pictures/penguin_logo.svg @@ -1,23 +1,24 @@ + + inkscape:version="0.48.2 r9819" + sodipodi:docname="penguin_logo.svg" + version="1.1"> + inkscape:window-width="1680" + inkscape:window-height="1001" + inkscape:window-x="0" + inkscape:window-y="25" + showgrid="false" + fit-margin-top="10" + fit-margin-left="10" + fit-margin-right="10" + fit-margin-bottom="10" + inkscape:window-maximized="1" /> - + - image/svg+xml + rdf:about=""> + image/svg+xml @@ -54,29 +57,34 @@ + id="layer1" + transform="translate(6.1774787,3.2309135)"> + sodipodi:nodetypes="cccccccccccccccccccccccccccc" + inkscape:connector-curvature="0" /> + sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccc" + inkscape:connector-curvature="0" /> + sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + inkscape:connector-curvature="0" /> + sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccsccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + inkscape:connector-curvature="0" /> diff --git a/doc/manual/mainpage.dox b/doc/manual/mainpage.dox new file mode 100644 index 0000000000..45c4e60b25 --- /dev/null +++ b/doc/manual/mainpage.dox @@ -0,0 +1,29 @@ +/** @mainpage Paparazzi Developer's Guide + +Welcome to the Paparazzi Developer's Guide -- the developer's resource for +learning about the internal architecture of the Paparazzi project. @par + +Developers that want to contribute to Paparazzi should read the following +sections before starting work: + +- The @subpage styleguide provides rules that developers should + follow when writing new code for Paparazzi. + +@ref primer provide introductory materials for new developers on various +specific topics. + + + */ + +/** @page primer Paparazzi Technical Primers + +This pages lists Technical Primers available for Paparazzi Developers. +They seek to provide information to pull novices up the learning curves +associated with the fundamental technologies used by Paparazzi. + +- TODO + + +Contributions or suggestions for new Technical Primers are welcome. + + */ diff --git a/doc/manual/style.dox b/doc/manual/style.dox new file mode 100644 index 0000000000..a3aa6167ba --- /dev/null +++ b/doc/manual/style.dox @@ -0,0 +1,249 @@ +/** @page styleguide Style Guides + +The goals for each of these guides are: +- to produce correct code that appears clean, consistent, and readable, +- to allow developers to create patches that conform to a standard, and +- to eliminate these issues as points of future contention. + +Some of these rules may be ignored in the spirit of these stated goals; +however, such exceptions should be fairly rare. + +The following style guides describe a formatting, naming, and other +conventions that should be followed when writing or changing the Papaprazzi +code or documentation: + +- @subpage stylec +- @subpage styledoxygen + + +Feedback would be welcome to improve the Paparazzi guidelines. + */ + +/** @page stylec C Style Guide + +This page contains guidelines for writing new C source code for the +Paparazzi project. + +@section styleformat Formatting Guide + +- remove any trailing white space at the end of lines. +- use 2 spaces for indentation; do NOT use tabs. +- use Unix line endings ('\\n'); do NOT use DOS endings ('\\r\\n') +- limit adjacent empty lines to at most two (2). +- remove any trailing empty lines at the end of source files +- do not "comment out" code from the tree; instead, one should either: + -# remove it entirely (git can retrieve the old version), or + -# use an @c \#if/\#endif block. + +@section stylenames Naming Rules + +- most identifiers must use lower-case letters (and digits) only. + - macros should use upper-case letters (and digits) only. + +@section styletypes Type Guidelines +- use the types from \: + - @c int8_t, @c int16_t, @c int32_t, or @c int64_t: signed types of specified size + - @c uint8_t, @c uint16_t, @c uint32_t, or @c uint64_t: unsigned types of specified size + +@section stylefunc Functions + +- static inline functions should be prefered over macros in most cases: +@code +/* do NOT define macro-like functions like this... */ +#define CUBE(x) ((x) * (x) * (x)) +/* instead, define the same expression using a C99 inline function */ +static inline int cube(int x) { return x * x * x; } +@endcode +- Functions should be declared static unless required by other modules + - define static functions before first usage to avoid forward declarations. +- Functions should have no space between its name and its parameter list: +@code +int32_t f(int32_t x1, int32_t x2) +{ + ... + int32_t y = f(x1, x2 - x1); + ... +} +@endcode + +@section styleswitch Switch statements + +- specify a default case +- prefer an enum over defines for the different states +@code +enum state +{ + STATE_FOO = 1, + STATE_BAR = 2 +}; + +switch( state ) +{ + case STATE_FOO: + foo(); + break; + case STATE_BAR: + bar(); + break; + default: + break; +} +@endcode + +@section stylecpp Preprocessor directives +- For conditional compilation use @c #if instead of @c #ifdef. +Someone might write code like: +@code +#ifdef USE_FOO + bar(); +#endif +@endcode +Someone else might compile the code with turned-off foo info like: +@verbatim + gcc stuff.c -DUSE_FOO=0 +@endverbatim +So use @c #if not @c #ifdef to turn a feature on or off. This works fine, and does the right thing, even if USE_FOO is not defined at all (!) +@code +#if USE_FOO + bar(); +#endif +@endcode +- If you really need to test whether a symbol is defined or not, test it with the @c defined construct. + + */ + +/** @page styledoxygen Doxygen Style Guide + +The following sections provide guidelines for Paparazzi developers +who wish to write Doxygen comments in the code or this manual. +For an introduction to Doxygen documentation, +see the @ref primerdoxygen. + +@section styledoxyblocks Doxygen Block Selection + +Several different types of Doxygen comments can be used; often, +one style will be the most appropriate for a specific context. +The following guidelines provide developers with heuristics for +selecting an appropriate form and writing consistent documentation +comments. + +-# use @c /// to for one-line documentation of instances. +-# for documentation requiring multiple lines, use a "block" style: +@verbatim +/** + * First sentence is brief description. Remaining text becomes + * the full description block, where "empty" lines start new paragraphs. + * + * One can make text appear in @a italics, @b bold, @c monospace, or + * in blocks such as the one in which this example appears in the Style + * Guide. See the Doxygen Manual for the full list of commands. + * + * @param foo For a function, describe the parameters (e.g. @a foo). + * @returns The value(s) returned, or possible error conditions. + */ +@endverbatim + -# The block should start on the line following the opening @c /**. + -# The end of the block, \f$*/\f$, should also be on its own line. + -# Every line in the block should have a @c '*' in-line with its start: + - A leading space is required to align the @c '*' with the @c /** line. + - A single "empty" line should separate the function documentation + from the block of parameter and return value descriptions. + - Except to separate paragraphs of documentation, other extra + "empty" lines should be removed from the block. + -# Only single spaces should be used; do @b not add mid-line indentation. +-# If the total line length will be less than 80 columns, then + - The /**< description form can be used on the same line for a detailed description. + - The ///< brief form can be used for brief descriptions. + - This style should be used sparingly; the best use is for fields: +@verbatim +int field; /**< detailed field description */ +int field2; ///< a brief description +@endverbatim +-# Every documented file should contain a block with @c \@file after the license header: +@verbatim +/** + * @file foo/bar/file.c + * Brief description of file. + * + * More detailed description of file. + */ +@endverbatim + +@section styledoxyall Doxygen Style Guide + +The following guidelines apply to all Doxygen comment blocks: + +-# Use the @c '\@cmd' form for all doxygen commands (do @b not use @c '\\cmd'). +-# It is not necessary to use @c \@brief since @c JAVADOC_AUTOBRIEF is enabled. + - The first line (until the first dot) is automatically treated as brief description. +-# Use symbol names such that Doxygen automatically creates links: + -# @c function_name() can be used to reference functions + (e.g. ahrs_propagate()). + -# @c struct_name::member_name should be used to reference structure + fields in the documentation (e.g. @c Ahrs::body_rate). + -# URLS get converted to markup automatically, without any extra effort. + -# new pages can be linked into the heirarchy by using the @c \@subpage + command somewhere the page(s) under which they should be linked: + -# use @c \@ref in other contexts to create links to pages and sections. +-# Use good Doxygen mark-up: + -# '\@a' (italics) should be used to reference parameters (e.g. foo). + -# '\@b' (bold) should be used to emphasizing single words. + -# '\@c' (monospace) should be used with file names and + code symbols, so they appear visually distinct from + surrounding text. + -# To mark-up multiple words, the HTML alternatives must be used. +-# Two spaces should be used when nesting lists; do @b not use '\\t' in lists. +-# Code examples provided in documentation must conform to the Style Guide. + +@section styledoxytext Doxygen Text Inputs + +In addition to the guidelines in the preceding sections, the following +additional style guidelines should be considered when writing +documentation as part of standalone text files: + +-# Text files must contain Doxygen at least one comment block: + -# Documentation should begin in the first column (except for nested lists). + -# Do NOT use the @c '*' convention that must be used in the source code. +-# Each file should contain at least one @c \@page block. + -# Each new page should be listed as a \@subpage in the \@page block + of the page that should serve as its parent. + -# Large pages should be structure in parts using meaningful \@section + and \@subsection commands. +-# Include a @c \@file block at the end of each Doxygen @c .dox file to + document its contents: + - Doxygen creates such pages for files automatically, but no content + will appear on them for those that only contain manual pages. + - The \@file block should provide useful meta-documentation to assist + techincal writers; typically, a list of the pages that it contains. + - For example, the @ref styleguide exists in @c doc/manual/style.dox, + which contains a reference back to itself. +-# The \@file and \@page commands should begin on the same line as + the start of the Doxygen comment: +@verbatim +/** @page pagename Page Title + +Documentation for the page. + + */ +/** @file + +This file contains the @ref pagename page. + + */ +@endverbatim + +For an example, the Doxygen source for this Style Guide can be found in +@c doc/manual/style.dox, alongside other parts of The Manual. + + */ + +/** @file + +This file contains the @ref styleguide pages. The @ref styleguide pages +include the following Style Guides for their respective code and +documentation languages: + +- @ref stylec +- @ref styledoxygen + + */ 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 0b98aee11e..6cb17e1fb6 100644 --- a/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.c +++ b/sw/airborne/arch/lpc21/subsystems/imu/imu_b2_arch.c @@ -96,6 +96,9 @@ void imu_periodic(void) { #if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601 RunOnceEvery(10, { ami601_read(); }); #endif +#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX + RunOnceEvery(5,Hmc58xxPeriodic()); +#endif } diff --git a/sw/airborne/arch/lpc21/usb_tunnel.c b/sw/airborne/arch/lpc21/usb_tunnel.c index c2acef1e61..035cebda84 100644 --- a/sw/airborne/arch/lpc21/usb_tunnel.c +++ b/sw/airborne/arch/lpc21/usb_tunnel.c @@ -67,7 +67,7 @@ int main( void ) { inc = Uart0Getch(); VCOM_putchar(inc); } - if (VCOM_check_available() && uart0_check_free_space(1)) { + if (VCOM_check_available() && Uart0CheckFreeSpace(1)) { LED_ON(2); tx_time = T0TC; inc = VCOM_getchar(); @@ -84,7 +84,7 @@ int main( void ) { inc = Uart1Getch(); VCOM_putchar(inc); } - if (VCOM_check_available() && uart1_check_free_space(1)) { + if (VCOM_check_available() && Uart1CheckFreeSpace(1)) { LED_ON(2); tx_time = T0TC; inc = VCOM_getchar(); diff --git a/sw/airborne/arch/sim/sim_ap.c b/sw/airborne/arch/sim/sim_ap.c index a37a453baa..c5e1a652db 100644 --- a/sw/airborne/arch/sim/sim_ap.c +++ b/sw/airborne/arch/sim/sim_ap.c @@ -17,7 +17,6 @@ #include "subsystems/nav.h" #include "firmwares/fixedwing/stabilization/stabilization_attitude.h" #include "firmwares/fixedwing/guidance/guidance_v.h" -#include "subsystems/sensors/infrared.h" #include "commands.h" #include "firmwares/fixedwing/main_ap.h" #include "ap_downlink.h" diff --git a/sw/airborne/arch/sim/sim_gps.c b/sw/airborne/arch/sim/sim_gps.c index 0930c39f34..13ef9b84cd 100644 --- a/sw/airborne/arch/sim/sim_gps.c +++ b/sw/airborne/arch/sim/sim_gps.c @@ -47,6 +47,7 @@ value sim_use_gps_pos(value x, value y, value z, value c, value a, value s, valu gps.utm_pos.north = Int_val(y); gps.utm_pos.zone = Int_val(z); lat = lon; /* Just to get rid of the "unused arg" warning */ + lon = lat; /* Just to get rid of the "unused arg" warning */ #endif // GPS_USE_LATLONG diff --git a/sw/airborne/arch/sim/subsystems/imu/imu_aspirin_arch.c b/sw/airborne/arch/sim/subsystems/imu/imu_aspirin_arch.c index 383dd78880..7b334860ec 100644 --- a/sw/airborne/arch/sim/subsystems/imu/imu_aspirin_arch.c +++ b/sw/airborne/arch/sim/subsystems/imu/imu_aspirin_arch.c @@ -33,6 +33,7 @@ void imu_periodic(void) { } +#if USE_NPS #include "nps_sensors.h" void imu_feed_gyro_accel(void) { @@ -56,3 +57,4 @@ void imu_feed_mag(void) { hmc5843.data.value[IMU_MAG_Z_CHAN] = sensors.mag.value.z; hmc5843.data_available = TRUE; } +#endif 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 e680ebc675..deb32021cb 100644 --- a/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.c +++ b/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.c @@ -35,7 +35,7 @@ void imu_periodic(void) { } -#ifdef USE_NPS +#if USE_NPS #include "nps_sensors.h" void imu_feed_gyro_accel(void) { diff --git a/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.h b/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.h index 025acd33bf..2944460181 100644 --- a/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.h +++ b/sw/airborne/arch/sim/subsystems/imu/imu_b2_arch.h @@ -31,7 +31,7 @@ extern int imu_overrun; -#ifdef USE_NPS +#if USE_NPS extern void imu_feed_gyro_accel(void); extern void imu_feed_mag(void); #endif diff --git a/sw/airborne/arch/sim/subsystems/imu/imu_crista_arch.c b/sw/airborne/arch/sim/subsystems/imu/imu_crista_arch.c index ee07d78462..4d78cef36a 100644 --- a/sw/airborne/arch/sim/subsystems/imu/imu_crista_arch.c +++ b/sw/airborne/arch/sim/subsystems/imu/imu_crista_arch.c @@ -10,7 +10,7 @@ void imu_crista_arch_init(void) { } - +#if USE_NPS #include "nps_sensors.h" void imu_feed_gyro_accel(void) { @@ -29,3 +29,4 @@ void imu_feed_mag(void) { ami601_values[IMU_MAG_Z_CHAN] = sensors.mag.value.z; ami601_status = AMI601_DATA_AVAILABLE; } +#endif diff --git a/sw/airborne/arch/sim/subsystems/radio_control/ppm_arch.c b/sw/airborne/arch/sim/subsystems/radio_control/ppm_arch.c index be462fc82b..164a296e45 100644 --- a/sw/airborne/arch/sim/subsystems/radio_control/ppm_arch.c +++ b/sw/airborne/arch/sim/subsystems/radio_control/ppm_arch.c @@ -28,7 +28,7 @@ #include #include -#ifdef USE_NPS +#if USE_NPS #include "nps_radio_control.h" #endif @@ -55,7 +55,7 @@ value send_ppm(value unit) { return unit; } -#ifdef USE_NPS +#if USE_NPS #define PPM_OF_NPS(_nps, _neutral, _min, _max) \ ((_nps) >= 0 ? (_neutral) + (_nps) * ((_max)-(_neutral)) : (_neutral) + (_nps) * ((_neutral)- (_min))) @@ -94,7 +94,7 @@ value send_ppm(value unit) { return unit; } -#ifdef USE_NPS +#if USE_NPS void radio_control_feed(void) {} #endif diff --git a/sw/airborne/arch/sim/subsystems/radio_control/ppm_arch.h b/sw/airborne/arch/sim/subsystems/radio_control/ppm_arch.h index c0f27a3b5e..5a6bcbe639 100644 --- a/sw/airborne/arch/sim/subsystems/radio_control/ppm_arch.h +++ b/sw/airborne/arch/sim/subsystems/radio_control/ppm_arch.h @@ -36,7 +36,7 @@ #define PPM_NB_CHANNEL RADIO_CONTROL_NB_CHANNEL -#ifdef USE_NPS +#if USE_NPS extern void radio_control_feed(void); #endif diff --git a/sw/airborne/arch/stm32/mcu_arch.c b/sw/airborne/arch/stm32/mcu_arch.c index 22ea358a60..326a2b20df 100644 --- a/sw/airborne/arch/stm32/mcu_arch.c +++ b/sw/airborne/arch/stm32/mcu_arch.c @@ -47,7 +47,7 @@ void mcu_arch_init(void) { return; #endif #ifdef HSE_TYPE_EXT_CLK -#warning Info: Using external clock +#pragma message "Using external clock." /* Setup the microcontroller system. * Initialize the Embedded Flash Interface, * initialize the PLL and update the SystemFrequency variable. @@ -85,7 +85,7 @@ void mcu_arch_init(void) { while(RCC_GetSYSCLKSource() != 0x08) {} } #else /* HSE_TYPE_EXT_CLK */ -#warning Using normal system clock setup +#pragma message "Using normal system clock setup." SystemInit(); #endif /* HSE_TYPE_EXT_CLK */ /* Set the Vector Table base location at 0x08000000 */ diff --git a/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c b/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c index e56c2e7a3d..f366f8c6f3 100644 --- a/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c +++ b/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c @@ -87,10 +87,10 @@ typedef struct SpektrumStateStruct SpektrumStateType; SpektrumStateType PrimarySpektrumState = {1,0,0,0,0,0,0,0,0}; #ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT -#warning "Using secondary spektrum receiver." +#pragma message "Using secondary spektrum receiver." SpektrumStateType SecondarySpektrumState = {1,0,0,0,0,0,0,0,0}; #else -#warning "NOT using secondary spektrum receiver." +#pragma message "NOT using secondary spektrum receiver." #endif int16_t SpektrumBuf[SPEKTRUM_CHANNELS_PER_FRAME*MAX_SPEKTRUM_FRAMES]; diff --git a/sw/airborne/arch/stm32/subsystems/settings_arch.c b/sw/airborne/arch/stm32/subsystems/settings_arch.c index 38e1bcd7a8..812f4c31c0 100644 --- a/sw/airborne/arch/stm32/subsystems/settings_arch.c +++ b/sw/airborne/arch/stm32/subsystems/settings_arch.c @@ -35,9 +35,14 @@ #include "subsystems/settings.h" -#include +#if defined(STM32F1) || defined(STM32F2) || defined(STM32F4) +#include +#else #include +#endif + #include +#include struct FlashInfo { uint32_t addr; diff --git a/sw/airborne/boards/booz_1.0.h b/sw/airborne/boards/booz_1.0.h index db7e8069b6..2d6d2a5b8a 100644 --- a/sw/airborne/boards/booz_1.0.h +++ b/sw/airborne/boards/booz_1.0.h @@ -91,11 +91,14 @@ #endif /* battery */ +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY AdcBank0(2) #ifndef USE_AD0 #define USE_AD0 #endif #define USE_AD0_2 +#endif #define DefaultVoltageOfAdc(adc) (0.0183*adc) diff --git a/sw/airborne/boards/hb_1.1.h b/sw/airborne/boards/hb_1.1.h index 317efcffc8..4599681f72 100644 --- a/sw/airborne/boards/hb_1.1.h +++ b/sw/airborne/boards/hb_1.1.h @@ -114,11 +114,14 @@ #define USE_AD1_4 #endif +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY AdcBank1(6) #ifndef USE_AD1 #define USE_AD1 #endif #define USE_AD1_6 +#endif #define DefaultVoltageOfAdc(adc) (0.032362123*adc) diff --git a/sw/airborne/boards/lisa_l/baro_board.c b/sw/airborne/boards/lisa_l/baro_board.c index bbfd84ff3c..8f1bb5421e 100644 --- a/sw/airborne/boards/lisa_l/baro_board.c +++ b/sw/airborne/boards/lisa_l/baro_board.c @@ -1,6 +1,15 @@ #include "subsystems/sensors/baro.h" +// Downlink +#include "mcu_periph/uart.h" +#include "messages.h" +#include "downlink.h" + +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + struct Baro baro; struct BaroBoard baro_board; struct i2c_transaction baro_trans; @@ -23,6 +32,11 @@ void baro_init(void) { baro_board.status = LBS_UNINITIALIZED; } +void baro_downlink_raw( void ) +{ + DOWNLINK_SEND_BARO_RAW(DefaultChannel,&baro.absolute,&baro.differential); +} + void baro_periodic(void) { #warning BARO_BOARD_CODE_DISABLED diff --git a/sw/airborne/boards/lisa_l/baro_board.h b/sw/airborne/boards/lisa_l/baro_board.h index 4eec5cfdee..4f988156eb 100644 --- a/sw/airborne/boards/lisa_l/baro_board.h +++ b/sw/airborne/boards/lisa_l/baro_board.h @@ -31,6 +31,8 @@ struct BaroBoard { extern struct BaroBoard baro_board; extern struct i2c_transaction baro_trans; +extern void baro_downlink_raw(void); + extern void baro_board_send_reset(void); extern void baro_board_send_config_abs(void); extern void baro_board_send_config_diff(void); diff --git a/sw/airborne/boards/lisa_l_1.0.h b/sw/airborne/boards/lisa_l_1.0.h index 0923a56a40..5cf7ef8e27 100644 --- a/sw/airborne/boards/lisa_l_1.0.h +++ b/sw/airborne/boards/lisa_l_1.0.h @@ -24,7 +24,10 @@ /* PA0 - ADC0 */ +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY 2 +#endif #define DefaultVoltageOfAdc(adc) (0.0059*adc) /* Onboard ADCs */ #define BOARD_ADC_CHANNEL_1 ADC_Channel_8 diff --git a/sw/airborne/boards/lisa_m_1.0.h b/sw/airborne/boards/lisa_m_1.0.h index 0fa3a7f7d4..fbc668aae8 100644 --- a/sw/airborne/boards/lisa_m_1.0.h +++ b/sw/airborne/boards/lisa_m_1.0.h @@ -15,17 +15,25 @@ #define LED_2_BANK #define LED_2_GPIO GPIOC #define LED_2_GPIO_CLK RCC_APB2Periph_GPIOC -#define LED_2_GPIO_PIN GPIO_Pin_13 +#define LED_2_GPIO_PIN GPIO_Pin_5 #define LED_2_AFIO_REMAP ((void)0) +#define LED_3_BANK +#define LED_3_GPIO GPIOC +#define LED_3_GPIO_CLK RCC_APB2Periph_GPIOC +#define LED_3_GPIO_PIN GPIO_Pin_2 +#define LED_3_AFIO_REMAP ((void)0) + /* configuration for aspirin - and more generaly IMUs */ #define IMU_ACC_DRDY_RCC_GPIO RCC_APB2Periph_GPIOB #define IMU_ACC_DRDY_GPIO GPIOB #define IMU_ACC_DRDY_GPIO_PORTSOURCE GPIO_PortSourceGPIOB - +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY 2 +#endif #define DefaultVoltageOfAdc(adc) (0.00485*adc) /* Onboard ADCs */ diff --git a/sw/airborne/boards/navgo_1.0.h b/sw/airborne/boards/navgo_1.0.h index da87c56b1c..17a6fbf118 100644 --- a/sw/airborne/boards/navgo_1.0.h +++ b/sw/airborne/boards/navgo_1.0.h @@ -43,11 +43,14 @@ /* ADC */ /* battery */ +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY AdcBank1(3) #ifndef USE_AD1 #define USE_AD1 #endif #define USE_AD1_3 +#endif #define DefaultVoltageOfAdc(adc) (0.01837*adc) diff --git a/sw/airborne/boards/tiny_0.99.h b/sw/airborne/boards/tiny_0.99.h index a2891e70f7..f618356e65 100644 --- a/sw/airborne/boards/tiny_0.99.h +++ b/sw/airborne/boards/tiny_0.99.h @@ -116,11 +116,14 @@ #define USE_AD1_2 #endif +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY AdcBank1(6) #ifndef USE_AD1 #define USE_AD1 #endif #define USE_AD1_6 +#endif #define DefaultVoltageOfAdc(adc) (0.01787109375*adc) diff --git a/sw/airborne/boards/tiny_1.1.h b/sw/airborne/boards/tiny_1.1.h index bec08225e0..d24360cb36 100644 --- a/sw/airborne/boards/tiny_1.1.h +++ b/sw/airborne/boards/tiny_1.1.h @@ -124,11 +124,14 @@ #define USE_AD1_5 #endif +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY AdcBank1(6) #ifndef USE_AD1 #define USE_AD1 #endif #define USE_AD1_6 +#endif #define DefaultVoltageOfAdc(adc) (0.01787109375*adc) diff --git a/sw/airborne/boards/tiny_2.0.h b/sw/airborne/boards/tiny_2.0.h index 23bc02f777..1e2c48ead0 100644 --- a/sw/airborne/boards/tiny_2.0.h +++ b/sw/airborne/boards/tiny_2.0.h @@ -122,11 +122,14 @@ #define USE_AD1_3 #endif +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY AdcBank1(5) #ifndef USE_AD1 #define USE_AD1 #endif #define USE_AD1_5 +#endif #ifndef VoltageOfAdc diff --git a/sw/airborne/boards/tiny_2.1.h b/sw/airborne/boards/tiny_2.1.h index 772834da7c..d80dad8efa 100644 --- a/sw/airborne/boards/tiny_2.1.h +++ b/sw/airborne/boards/tiny_2.1.h @@ -148,11 +148,14 @@ #define USE_AD1_3 #endif +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY AdcBank1(5) #ifndef USE_AD1 #define USE_AD1 #endif #define USE_AD1_5 +#endif #define DefaultVoltageOfAdc(adc) (0.01787109375*adc) diff --git a/sw/airborne/boards/tiny_sim.h b/sw/airborne/boards/tiny_sim.h index ff3845ca86..0c6fc3da1c 100644 --- a/sw/airborne/boards/tiny_sim.h +++ b/sw/airborne/boards/tiny_sim.h @@ -122,11 +122,14 @@ #endif /* #define ADC_3 AdcBank1(7) Used for VSUPPLY */ +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY AdcBank1(7) #ifndef USE_AD1 #define USE_AD1 #endif #define USE_AD1_7 +#endif #define DefaultVoltageOfAdc(adc) (0.01787109375*adc) diff --git a/sw/airborne/boards/umarim_1.0.h b/sw/airborne/boards/umarim_1.0.h index f4c87cbb96..eb47a0545c 100644 --- a/sw/airborne/boards/umarim_1.0.h +++ b/sw/airborne/boards/umarim_1.0.h @@ -78,11 +78,14 @@ /* battery */ +/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/ +#ifndef ADC_CHANNEL_VSUPPLY #define ADC_CHANNEL_VSUPPLY AdcBank0(2) #ifndef USE_AD0 #define USE_AD0 #endif #define USE_AD0_2 +#endif #define DefaultVoltageOfAdc(adc) (0.0247*adc) diff --git a/sw/airborne/commands.c b/sw/airborne/commands.c index c73b50081f..3dd61cfdd3 100644 --- a/sw/airborne/commands.c +++ b/sw/airborne/commands.c @@ -28,5 +28,16 @@ #include "commands.h" +#ifndef COMMAND_ROLL_TRIM +#define COMMAND_ROLL_TRIM 0 +#endif + +#ifndef COMMAND_PITCH_TRIM +#define COMMAND_PITCH_TRIM 0 +#endif + +pprz_t command_roll_trim = COMMAND_ROLL_TRIM; +pprz_t command_pitch_trim = COMMAND_PITCH_TRIM; + pprz_t commands[COMMANDS_NB]; const pprz_t commands_failsafe[COMMANDS_NB] = COMMANDS_FAILSAFE; diff --git a/sw/airborne/commands.h b/sw/airborne/commands.h index a824de01c9..4716959233 100644 --- a/sw/airborne/commands.h +++ b/sw/airborne/commands.h @@ -32,6 +32,8 @@ #include "paparazzi.h" #include "generated/airframe.h" +extern pprz_t command_roll_trim; +extern pprz_t command_pitch_trim; extern pprz_t commands[COMMANDS_NB]; extern const pprz_t commands_failsafe[COMMANDS_NB]; diff --git a/sw/airborne/firmwares/fixedwing/datalink.c b/sw/airborne/firmwares/fixedwing/datalink.c index 106156e564..bbd43d3eb1 100644 --- a/sw/airborne/firmwares/fixedwing/datalink.c +++ b/sw/airborne/firmwares/fixedwing/datalink.c @@ -187,14 +187,18 @@ void dl_parse_msg(void) { #endif // USE_JOYSTICK #if defined RADIO_CONTROL && defined RADIO_CONTROL_TYPE_DATALINK if (msg_id == DL_RC_3CH /*&& DL_RC_3CH_ac_id(dl_buffer) == TX_ID*/) { -LED_TOGGLE(3); +#ifdef RADIO_CONTROL_DATALINK_LED + LED_TOGGLE(RADIO_CONTROL_DATALINK_LED); +#endif parse_rc_3ch_datalink( DL_RC_3CH_throttle_mode(dl_buffer), DL_RC_3CH_roll(dl_buffer), DL_RC_3CH_pitch(dl_buffer)); } else if (msg_id == DL_RC_4CH && DL_RC_4CH_ac_id(dl_buffer) == AC_ID) { -LED_TOGGLE(3); +#ifdef RADIO_CONTROL_DATALINK_LED + LED_TOGGLE(RADIO_CONTROL_DATALINK_LED); +#endif parse_rc_4ch_datalink( DL_RC_4CH_mode(dl_buffer), DL_RC_4CH_throttle(dl_buffer), diff --git a/sw/airborne/firmwares/fixedwing/main_fbw.c b/sw/airborne/firmwares/fixedwing/main_fbw.c index f9f8b6b08b..7cde425448 100644 --- a/sw/airborne/firmwares/fixedwing/main_fbw.c +++ b/sw/airborne/firmwares/fixedwing/main_fbw.c @@ -49,11 +49,6 @@ #include "link_mcu.h" #endif -#ifdef MILLIAMP_PER_PERCENT -#error "deprecated MILLIAMP_PER_PERCENT --> Please use MILLIAMP_AT_FULL_THROTTLE" -#endif - - uint8_t fbw_mode; #include "inter_mcu.h" @@ -152,7 +147,18 @@ void event_task_fbw( void) { #ifdef ACTUATORS if (fbw_new_actuators > 0) { - SetActuatorsFromCommands(commands); + pprz_t trimmed_commands[COMMANDS_NB]; + int i; + for(i = 0; i < COMMANDS_NB; i++) trimmed_commands[i] = commands[i]; + + #ifdef COMMAND_ROLL + trimmed_commands[COMMAND_ROLL] += ChopAbs(command_roll_trim, MAX_PPRZ/10); + #endif + #ifdef COMMAND_PITCH + trimmed_commands[COMMAND_PITCH] += ChopAbs(command_pitch_trim, MAX_PPRZ/10); + #endif + + SetActuatorsFromCommands(trimmed_commands); fbw_new_actuators = 0; } #endif diff --git a/sw/airborne/firmwares/logger/main_logger.c b/sw/airborne/firmwares/logger/main_logger.c index 8f3eea1406..cc23a76b42 100644 --- a/sw/airborne/firmwares/logger/main_logger.c +++ b/sw/airborne/firmwares/logger/main_logger.c @@ -100,7 +100,7 @@ #endif #ifndef LOG_STOP_KEY -/* BUTTON that stops logging (BUTTON = P0.7, DTR = P0.13, INT1 = P0.14) */ +/* BUTTON that stops logging (PPM_IN = P0.6, BUTTON = P0.7, DTR = P0.13, INT1 = P0.14) */ #define LOG_STOP_KEY 7 #endif diff --git a/sw/airborne/led.h b/sw/airborne/led.h index 55a9c0493e..802056f216 100644 --- a/sw/airborne/led.h +++ b/sw/airborne/led.h @@ -23,7 +23,7 @@ */ /** \file led.h - * \brief arch independant LED (Light Emitting Diodes) API + * \brief arch independent LED (Light Emitting Diodes) API * * */ diff --git a/sw/airborne/mcu.h b/sw/airborne/mcu.h index 0372433374..e4fdaf5aee 100644 --- a/sw/airborne/mcu.h +++ b/sw/airborne/mcu.h @@ -23,7 +23,7 @@ */ /** \file mcu.h - * \brief arch independant mcu ( Micro Controller Unit ) utilities + * \brief arch independent mcu ( Micro Controller Unit ) utilities */ #ifndef MCU_H diff --git a/sw/airborne/mcu_periph/adc.h b/sw/airborne/mcu_periph/adc.h index bb2f9362c2..feb7cf4c47 100644 --- a/sw/airborne/mcu_periph/adc.h +++ b/sw/airborne/mcu_periph/adc.h @@ -23,7 +23,7 @@ */ /** \file adc.h - * \brief arch independant ADC (Analog to Digital Converter) API + * \brief arch independent ADC (Analog to Digital Converter) API * * Facility to store last values in a circular buffer for a specific * channel: diff --git a/sw/airborne/mcu_periph/spi.h b/sw/airborne/mcu_periph/spi.h index 9cdd614a4b..c2fbf7c0c6 100644 --- a/sw/airborne/mcu_periph/spi.h +++ b/sw/airborne/mcu_periph/spi.h @@ -23,7 +23,7 @@ */ /** \file mcu_periph/spi.h - * \brief arch independant SPI (Serial Peripheral Interface) API */ + * \brief arch independent SPI (Serial Peripheral Interface) API */ #ifndef SPI_H diff --git a/sw/airborne/mcu_periph/uart.h b/sw/airborne/mcu_periph/uart.h index d9ebf3b32b..d2bd283d7e 100644 --- a/sw/airborne/mcu_periph/uart.h +++ b/sw/airborne/mcu_periph/uart.h @@ -23,7 +23,7 @@ */ /** \file mcu_periph/uart.h - * \brief arch independant UART (Universal Asynchronous Receiver/Transmitter) API + * \brief arch independent UART (Universal Asynchronous Receiver/Transmitter) API * */ diff --git a/sw/airborne/mcu_periph/usb_serial.h b/sw/airborne/mcu_periph/usb_serial.h index fa080e407e..0ce1a825d1 100644 --- a/sw/airborne/mcu_periph/usb_serial.h +++ b/sw/airborne/mcu_periph/usb_serial.h @@ -23,7 +23,7 @@ */ /** \file usb_serial.h - * \brief arch independant USB API + * \brief arch independent USB API * */ diff --git a/sw/airborne/modules/digital_cam/servo_cam_ctrl.h b/sw/airborne/modules/digital_cam/servo_cam_ctrl.h index abdc372f1f..fdd0820b4f 100644 --- a/sw/airborne/modules/digital_cam/servo_cam_ctrl.h +++ b/sw/airborne/modules/digital_cam/servo_cam_ctrl.h @@ -99,6 +99,8 @@ static inline void dc_send_command(uint8_t cmd) DC_PUSH(DC_POWER_SERVO); break; #endif + default: + break; } } diff --git a/sw/airborne/anemotaxis.c b/sw/airborne/modules/enose/anemotaxis.c similarity index 97% rename from sw/airborne/anemotaxis.c rename to sw/airborne/modules/enose/anemotaxis.c index 562b02b7e1..055816bb84 100644 --- a/sw/airborne/anemotaxis.c +++ b/sw/airborne/modules/enose/anemotaxis.c @@ -1,11 +1,11 @@ -#include "anemotaxis.h" +#include "modules/enose/anemotaxis.h" #include "generated/airframe.h" #include "estimator.h" #include "std.h" #include "subsystems/nav.h" #include "generated/flight_plan.h" #include "ap_downlink.h" -#include "chemo_detect.h" +#include "modules/enose/chemo_detect.h" enum status { UTURN, CROSSWIND }; static enum status status; diff --git a/sw/airborne/anemotaxis.h b/sw/airborne/modules/enose/anemotaxis.h similarity index 100% rename from sw/airborne/anemotaxis.h rename to sw/airborne/modules/enose/anemotaxis.h diff --git a/sw/airborne/chemotaxis.c b/sw/airborne/modules/enose/chemotaxis.c similarity index 94% rename from sw/airborne/chemotaxis.c rename to sw/airborne/modules/enose/chemotaxis.c index 6bc9514c92..bbb6504da2 100644 --- a/sw/airborne/chemotaxis.c +++ b/sw/airborne/modules/enose/chemotaxis.c @@ -1,11 +1,11 @@ -#include "chemotaxis.h" +#include "modules/enose/chemotaxis.h" #include "generated/airframe.h" #include "estimator.h" #include "std.h" #include "subsystems/nav.h" #include "generated/flight_plan.h" #include "ap_downlink.h" -#include "chemo_detect.h" +#include "modules/enose/chemo_detect.h" #define MAX_RADIUS 250 #define ALPHA 0.5 diff --git a/sw/airborne/chemotaxis.h b/sw/airborne/modules/enose/chemotaxis.h similarity index 100% rename from sw/airborne/chemotaxis.h rename to sw/airborne/modules/enose/chemotaxis.h diff --git a/sw/airborne/modules/ins/ins_xsens.c b/sw/airborne/modules/ins/ins_xsens.c index f16d597a69..cce76a36ac 100644 --- a/sw/airborne/modules/ins/ins_xsens.c +++ b/sw/airborne/modules/ins/ins_xsens.c @@ -251,14 +251,14 @@ void ins_periodic_task( void ) { case 13: #ifdef AHRS_H_X - #warning Sending XSens Magnetic Declination + #pragma message "Sending XSens Magnetic Declination." xsens_declination = atan2(AHRS_H_Y, AHRS_H_X); XSENS_SetMagneticDeclination(xsens_declination); #endif break; case 12: #ifdef GPS_IMU_LEVER_ARM_X - #warning Sending XSens GPS Arm + #pragma message "Sending XSens GPS Arm." XSENS_SetLeverArmGps(GPS_IMU_LEVER_ARM_X,GPS_IMU_LEVER_ARM_Y,GPS_IMU_LEVER_ARM_Z); #endif break; diff --git a/sw/airborne/modules/sensors/imu_ppzuav.c b/sw/airborne/modules/sensors/imu_ppzuav.c index ba8b137cc8..71e84757e9 100644 --- a/sw/airborne/modules/sensors/imu_ppzuav.c +++ b/sw/airborne/modules/sensors/imu_ppzuav.c @@ -73,10 +73,10 @@ void imu_impl_init(void) #if PERIODIC_FREQUENCY == 60 /* set gyro range to 2000deg/s and low pass at 20Hz (< 60Hz/2) internal sampling at 1kHz */ ppzuavimu_itg3200.buf[1] = (0x03<<3) | (0x04<<0); -# warning Info: ITG3200 read at 50Hz +# pragma message "ITG3200 read at 50Hz." #else # if PERIODIC_FREQUENCY == 120 -# warning Info: ITG3200 read at 100Hz +# pragma message "ITG3200 read at 100Hz." /* set gyro range to 2000deg/s and low pass at 42Hz (< 120Hz/2) internal sampling at 1kHz */ ppzuavimu_itg3200.buf[1] = (0x03<<3) | (0x03<<0); # else diff --git a/sw/airborne/subsystems/ahrs.h b/sw/airborne/subsystems/ahrs.h index 5a30258d63..158f8a7fd8 100644 --- a/sw/airborne/subsystems/ahrs.h +++ b/sw/airborne/subsystems/ahrs.h @@ -19,6 +19,10 @@ * Boston, MA 02111-1307, USA. */ +/** \file ahrs.h + * \brief Attitude and Heading Reference System interface + */ + #ifndef AHRS_H #define AHRS_H @@ -34,41 +38,44 @@ #include AHRS_TYPE_H #endif - +/** Attitude and Heading Reference System state (fixed point version) */ struct Ahrs { - struct Int32Quat ltp_to_imu_quat; - struct Int32Eulers ltp_to_imu_euler; - struct Int32RMat ltp_to_imu_rmat; - struct Int32Rates imu_rate; + struct Int32Quat ltp_to_imu_quat; ///< Rotation from LocalTangentPlane to IMU frame as unit quaternion + struct Int32Eulers ltp_to_imu_euler; ///< Rotation from LocalTangentPlane to IMU frame as Euler angles + struct Int32RMat ltp_to_imu_rmat; ///< Rotation from LocalTangentPlane to IMU frame as Rotation Matrix + struct Int32Rates imu_rate; ///< Rotational velocity in IMU frame - struct Int32Quat ltp_to_body_quat; - struct Int32Eulers ltp_to_body_euler; - struct Int32RMat ltp_to_body_rmat; - struct Int32Rates body_rate; + struct Int32Quat ltp_to_body_quat; ///< Rotation from LocalTangentPlane to body frame as unit quaternion + struct Int32Eulers ltp_to_body_euler; ///< Rotation from LocalTangentPlane to body frame as Euler angles + struct Int32RMat ltp_to_body_rmat; ///< Rotation from LocalTangentPlane to body frame as Rotation Matrix + struct Int32Rates body_rate; ///< Rotational velocity in body frame - uint8_t status; + uint8_t status; ///< status of the AHRS, AHRS_UNINIT or AHRS_RUNNING }; +/** Attitude and Heading Reference System state (floating point version) */ struct AhrsFloat { - struct FloatQuat ltp_to_imu_quat; - struct FloatEulers ltp_to_imu_euler; - struct FloatRMat ltp_to_imu_rmat; - struct FloatRates imu_rate; + struct FloatQuat ltp_to_imu_quat; ///< Rotation from LocalTangentPlane to IMU frame as unit quaternion + struct FloatEulers ltp_to_imu_euler; ///< Rotation from LocalTangentPlane to IMU frame as Euler angles + struct FloatRMat ltp_to_imu_rmat; ///< Rotation from LocalTangentPlane to IMU frame as Rotation Matrix + struct FloatRates imu_rate; ///< Rotational velocity in IMU frame struct FloatRates imu_rate_previous; struct FloatRates imu_rate_d; - struct FloatQuat ltp_to_body_quat; - struct FloatEulers ltp_to_body_euler; - struct FloatRMat ltp_to_body_rmat; - struct FloatRates body_rate; + struct FloatQuat ltp_to_body_quat; ///< Rotation from LocalTangentPlane to body frame as unit quaternion + struct FloatEulers ltp_to_body_euler; ///< Rotation from LocalTangentPlane to body frame as Euler angles + struct FloatRMat ltp_to_body_rmat; ///< Rotation from LocalTangentPlane to body frame as Rotation Matrix + struct FloatRates body_rate; ///< Rotational velocity in body frame struct FloatRates body_rate_d; // always use status from fixed point ahrs struct for now //uint8_t status; }; +/** global AHRS state (fixed point version) */ extern struct Ahrs ahrs; +/** global AHRS state (floating point version) */ extern struct AhrsFloat ahrs_float; extern float ahrs_mag_offset; @@ -86,10 +93,33 @@ extern float ahrs_mag_offset; RATES_BFP_OF_REAL(ahrs.body_rate, ahrs_float.body_rate); \ } +/** AHRS initialization. Called at startup. + * Needs to be implemented by each AHRS algorithm. + */ extern void ahrs_init(void); + +/** Aligns the AHRS. Called after ahrs_aligner has run to set initial attitude and biases. + * Must set the ahrs status to AHRS_RUNNING. + * Needs to be implemented by each AHRS algorithm. + */ extern void ahrs_align(void); + +/** Propagation. Usually integrates the gyro rates to angles. + * Reads the global #imu data struct. + * Needs to be implemented by each AHRS algorithm. + */ extern void ahrs_propagate(void); + +/** Update AHRS state with accerleration measurements. + * Reads the global #imu data struct. + * Needs to be implemented by each AHRS algorithm. + */ extern void ahrs_update_accel(void); + +/** Update AHRS state with magnetometer measurements. + * Reads the global #imu data struct. + * Needs to be implemented by each AHRS algorithm. + */ extern void ahrs_update_mag(void); #endif /* AHRS_H */ diff --git a/sw/airborne/subsystems/electrical.c b/sw/airborne/subsystems/electrical.c index 4694df4e89..c9986928c1 100644 --- a/sw/airborne/subsystems/electrical.c +++ b/sw/airborne/subsystems/electrical.c @@ -6,6 +6,13 @@ #include "generated/airframe.h" #include BOARD_CONFIG +#ifdef MILLIAMP_PER_PERCENT +#warning "deprecated MILLIAMP_PER_PERCENT --> Please use MILLIAMP_AT_FULL_THROTTLE" +#endif +#if defined BATTERY_SENS || defined BATTERY_OFFSET +#warning "BATTERY_SENS and BATTERY_OFFSET are deprecated, please remove them --> if you want to change the default use VoltageOfAdc" +#endif + struct Electrical electrical; static struct { diff --git a/sw/airborne/subsystems/gps.c b/sw/airborne/subsystems/gps.c index 4d50a634dc..0c827a85f2 100644 --- a/sw/airborne/subsystems/gps.c +++ b/sw/airborne/subsystems/gps.c @@ -19,6 +19,11 @@ * Boston, MA 02111-1307, USA. */ +/** @file gps.c + * @brief Device independent GPS code + * + */ + #include "subsystems/gps.h" #include "led.h" diff --git a/sw/airborne/subsystems/gps.h b/sw/airborne/subsystems/gps.h index 2d46b16c0d..64370bb209 100644 --- a/sw/airborne/subsystems/gps.h +++ b/sw/airborne/subsystems/gps.h @@ -20,7 +20,7 @@ */ /** @file gps.h - * @brief Device independent GPS code + * @brief Device independent GPS code (interface) * */ @@ -48,16 +48,17 @@ #define GPS_NB_CHANNELS 1 #endif -/** Space Vehicle Information */ +/** data structure for Space Vehicle Information of a single satellite */ struct SVinfo { - uint8_t svid; - uint8_t flags; - uint8_t qi; - uint8_t cno; - int8_t elev; ///< deg - int16_t azim; ///< deg + uint8_t svid; ///< Satellite ID + uint8_t flags; ///< bitfield with GPS receiver specific flags + uint8_t qi; ///< quality bitfield (GPS receiver specific) + uint8_t cno; ///< Carrier to Noise Ratio (Signal Strength) in dbHz + int8_t elev; ///< elevation in deg + int16_t azim; ///< azimuth in deg }; +/** data structure for GPS information */ struct GpsState { struct EcefCoor_i ecef_pos; ///< position in ECEF in cm struct LlaCoor_i lla_pos; ///< position in LLA (lat,lon: rad*1e7; alt: mm over ellipsoid) @@ -77,7 +78,7 @@ struct GpsState { uint32_t tow; ///< time of week in ms uint8_t nb_channels; ///< Number of scanned satellites - struct SVinfo svinfos[GPS_NB_CHANNELS]; + struct SVinfo svinfos[GPS_NB_CHANNELS]; ///< holds information from the Space Vehicles (Satellites) uint32_t last_fix_ticks; ///< cpu time in ticks at last valid fix uint16_t last_fix_time; ///< cpu time in sec at last valid fix @@ -90,6 +91,7 @@ struct GpsTimeSync { uint32_t t0; ///< for time sync: hw clock ticks when GPS message is received }; +/** global GPS state */ extern struct GpsState gps; diff --git a/sw/airborne/subsystems/gps/gps_mtk.c b/sw/airborne/subsystems/gps/gps_mtk.c index aaa96859e6..79a157db86 100644 --- a/sw/airborne/subsystems/gps/gps_mtk.c +++ b/sw/airborne/subsystems/gps/gps_mtk.c @@ -386,6 +386,8 @@ static bool_t user_gps_configure(bool_t cpt) { case 1: MtkSend_CFG(MTK_DIY_OUTPUT_RATE); return FALSE; + default: + break; } return TRUE; /* Continue, except for the last case */ } diff --git a/sw/airborne/subsystems/imu.c b/sw/airborne/subsystems/imu.c index 515adc6b38..714ce9a049 100644 --- a/sw/airborne/subsystems/imu.c +++ b/sw/airborne/subsystems/imu.c @@ -21,6 +21,10 @@ * Boston, MA 02111-1307, USA. */ +/** \file imu.c + * \brief Inertial Measurement Unit interface + */ + #include "subsystems/imu.h" struct Imu imu; diff --git a/sw/airborne/subsystems/imu.h b/sw/airborne/subsystems/imu.h index 43bf62a56f..f2889e09bf 100644 --- a/sw/airborne/subsystems/imu.h +++ b/sw/airborne/subsystems/imu.h @@ -20,6 +20,9 @@ * the Free Software Foundation, 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +/** \file imu.h + * \brief Inertial Measurement Unit interface + */ #ifndef IMU_H #define IMU_H @@ -32,23 +35,24 @@ extern void imu_impl_init(void); extern void imu_periodic(void); +/** abstract IMU interface providing fixed point interface */ struct Imu { - struct Int32Rates gyro; - struct Int32Vect3 accel; - struct Int32Vect3 mag; - struct Int32Rates gyro_prev; - struct Int32Vect3 accel_prev; - struct Int32Rates gyro_neutral; - struct Int32Vect3 accel_neutral; - struct Int32Vect3 mag_neutral; - struct Int32Rates gyro_unscaled; - struct Int32Vect3 accel_unscaled; - struct Int32Vect3 mag_unscaled; - struct Int32Quat body_to_imu_quat; - struct Int32RMat body_to_imu_rmat; + struct Int32Rates gyro; ///< gyroscope measurements + struct Int32Vect3 accel; ///< accelerometer measurements + struct Int32Vect3 mag; ///< magnetometer measurements + struct Int32Rates gyro_prev; ///< previous gyroscope measurements + struct Int32Vect3 accel_prev; ///< previous accelerometer measurements + struct Int32Rates gyro_neutral; ///< gyroscope bias + struct Int32Vect3 accel_neutral; ///< accelerometer bias + struct Int32Vect3 mag_neutral; ///< magnetometer neutral readings (bias) + struct Int32Rates gyro_unscaled; ///< unscaled gyroscope measurements + struct Int32Vect3 accel_unscaled; ///< unscaled accelerometer measurements + struct Int32Vect3 mag_unscaled; ///< unscaled magnetometer measurements + struct Int32Quat body_to_imu_quat; ///< rotation from body to imu frame as a unit quaternion + struct Int32RMat body_to_imu_rmat; ///< rotation from body to imu frame as a rotation matrix }; -/* abstract IMU interface providing floating point interface */ +/** abstract IMU interface providing floating point interface */ struct ImuFloat { struct FloatRates gyro; struct FloatVect3 accel; @@ -61,6 +65,8 @@ struct ImuFloat { }; extern void imu_float_init(struct ImuFloat* imuf); + +/** global IMU state */ extern struct Imu imu; /* underlying hardware */ diff --git a/sw/airborne/subsystems/imu/imu_aspirin.c b/sw/airborne/subsystems/imu/imu_aspirin.c index 86cb2a8764..70d4bce7b1 100644 --- a/sw/airborne/subsystems/imu/imu_aspirin.c +++ b/sw/airborne/subsystems/imu/imu_aspirin.c @@ -7,8 +7,8 @@ struct ImuAspirin imu_aspirin; /* initialize peripherals */ static void configure_gyro(void); -static void configure_mag(void); static void configure_accel(void); +//static void configure_mag(void); static void send_i2c_msg_with_retry(struct i2c_transaction* t) { uint8_t max_retry = 8; @@ -98,8 +98,8 @@ static void configure_accel(void) { adxl345_write_to_reg(ADXL345_REG_POWER_CTL, 1<<3); /* enable data ready interrupt */ adxl345_write_to_reg(ADXL345_REG_INT_ENABLE, 1<<7); - /* Enable full res and interrupt active low */ - adxl345_write_to_reg(ADXL345_REG_DATA_FORMAT, 1<<3|1<<5); + /* Enable full res with +-16g range and interrupt active low */ + adxl345_write_to_reg(ADXL345_REG_DATA_FORMAT, 1<<0|1<<1|1<<3|1<<5); /* clear spi rx reg to make DMA happy */ adxl345_clear_rx_buf(); /* reads data once to bring interrupt line up */ diff --git a/sw/airborne/subsystems/imu/imu_aspirin.h b/sw/airborne/subsystems/imu/imu_aspirin.h index f14a8f0bc7..39f8e5cd89 100644 --- a/sw/airborne/subsystems/imu/imu_aspirin.h +++ b/sw/airborne/subsystems/imu/imu_aspirin.h @@ -32,9 +32,27 @@ #include "peripherals/hmc5843.h" #include "peripherals/adxl345.h" +#ifdef IMU_ASPIRIN_VERSION_1_0 #define IMU_MAG_X_CHAN 0 #define IMU_MAG_Y_CHAN 1 #define IMU_MAG_Z_CHAN 2 +#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_Z_SIGN 1 +#endif +#endif + +#ifdef IMU_ASPIRIN_VERSION_1_5 +#define IMU_MAG_X_CHAN 2 +#define IMU_MAG_Y_CHAN 0 +#define IMU_MAG_Z_CHAN 1 +#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_Z_SIGN 1 +#endif +#endif #if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN #define IMU_GYRO_P_SIGN 1 @@ -46,11 +64,6 @@ #define IMU_ACCEL_Y_SIGN 1 #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_Z_SIGN 1 -#endif enum AspirinStatus { AspirinStatusUninit, diff --git a/sw/airborne/subsystems/imu/imu_b2.c b/sw/airborne/subsystems/imu/imu_b2.c index 5d4bf680a6..a41c6e9c37 100644 --- a/sw/airborne/subsystems/imu/imu_b2.c +++ b/sw/airborne/subsystems/imu/imu_b2.c @@ -34,6 +34,8 @@ void imu_impl_init(void) { ami601_init(); #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC5843 hmc5843_init(); +#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX + hmc58xx_init(); #endif } diff --git a/sw/airborne/subsystems/imu/imu_b2.h b/sw/airborne/subsystems/imu/imu_b2.h index 2c076d03ad..1860501be9 100644 --- a/sw/airborne/subsystems/imu/imu_b2.h +++ b/sw/airborne/subsystems/imu/imu_b2.h @@ -33,6 +33,8 @@ #define IMU_B2_MAG_NONE 0 #define IMU_B2_MAG_MS2100 1 #define IMU_B2_MAG_AMI601 2 +#define IMU_B2_MAG_HMC5843 3 +#define IMU_B2_MAG_HMC58XX 4 #ifdef IMU_B2_VERSION_1_0 @@ -167,7 +169,7 @@ } \ } #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC5843 -#include "peripherals/hmc5843.h" +include "peripherals/hmc5843.h" #define foo_handler() {} #define ImuMagEvent(_mag_handler) { \ MagEvent(foo_handler); \ @@ -179,6 +181,19 @@ hmc5843.data_available = FALSE; \ } \ } +#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX +#include "peripherals/hmc58xx.h" +#define foo_handler() {} +#define ImuMagEvent(_mag_handler) { \ + MagEvent(foo_handler); \ + if (hmc58xx_data_available) { \ + imu.mag_unscaled.x = hmc58xx_data.x; \ + imu.mag_unscaled.y = hmc58xx_data.y; \ + imu.mag_unscaled.z = hmc58xx_data.z; \ + _mag_handler(); \ + hmc58xx_data_available = FALSE; \ + } \ + } #else #define ImuMagEvent(_mag_handler) {} #endif diff --git a/sw/airborne/subsystems/ins.c b/sw/airborne/subsystems/ins.c index d25b367a84..c5b87519bf 100644 --- a/sw/airborne/subsystems/ins.c +++ b/sw/airborne/subsystems/ins.c @@ -91,16 +91,16 @@ void ins_init() { ins_ltp_initialised = TRUE; /** 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); + struct LlaCoor_i llh_nav0; /* Height above the ellipsoid */ + llh_nav0.lat = INT32_RAD_OF_DEG(NAV_LAT0); + llh_nav0.lon = INT32_RAD_OF_DEG(NAV_LON0); /* NAV_ALT0 = ground alt above msl, NAV_MSL0 = geoid-height (msl) over ellipsoid */ - llh.alt = NAV_ALT0 + NAV_MSL0; + llh_nav0.alt = NAV_ALT0 + NAV_MSL0; - struct EcefCoor_i nav_init; - ecef_of_lla_i(&nav_init, &llh); + struct EcefCoor_i ecef_nav0; + ecef_of_lla_i(&ecef_nav0, &llh_nav0); - ltp_def_from_ecef_i(&ins_ltp_def, &nav_init); + ltp_def_from_ecef_i(&ins_ltp_def, &ecef_nav0); ins_ltp_def.hmsl = NAV_ALT0; #else ins_ltp_initialised = FALSE; diff --git a/sw/airborne/subsystems/navigation/border_line.c b/sw/airborne/subsystems/navigation/border_line.c new file mode 100644 index 0000000000..5dd7d42c3c --- /dev/null +++ b/sw/airborne/subsystems/navigation/border_line.c @@ -0,0 +1,138 @@ +/* + * $Id$ + * + * Copyright (C) 2012 Tobias Muench + * + * 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. + * + */ + + +//modified nav_linie by Anton Kochevar, ENAC + +/** + * @file subsystems/navigation/border_line.c + * @brief navigate along a border line (line 1-2) with turns in the same direction + * + * you can use this function to navigate along a border if it is essetial not to cross it + * navigation is along line p1, p2 with turns in the same direction to make sure you dont cross the line + * take care youre navigation radius is not to small in strong wind conditions! +*/ + +#include "subsystems/navigation/border_line.h" +#include "generated/airframe.h" +#include "subsystems/nav.h" + + +enum border_line_status { LR12, LQC21, LTC2, LQC22, LR21, LQC12, LTC1, LQC11 }; +static enum border_line_status border_line_status; + +bool_t border_line_init( void ) { + border_line_status = LR12; + return FALSE; +} + +bool_t border_line(uint8_t l1, uint8_t l2, float radius) { + radius = fabs(radius); + float alt = waypoints[l1].a; + waypoints[l2].a = alt; + + float l2_l1_x = WaypointX(l1) - WaypointX(l2); + float l2_l1_y = WaypointY(l1) - WaypointY(l2); + float d = sqrt(l2_l1_x*l2_l1_x+l2_l1_y*l2_l1_y); + + float u_x = l2_l1_x / d; + float u_y = l2_l1_y / d; + + float angle = atan2((WaypointY(l1)-WaypointY(l2)),(WaypointX(l2)-WaypointX(l1))); + + struct point l2_c1 = { WaypointX(l1) - sin(angle)*radius, + WaypointY(l1) - cos(angle)*radius, + alt }; + struct point l2_c2 = { l2_c1.x + 2*radius*cos(angle) , + l2_c1.y - 2*radius*sin(angle), + alt }; + + + + struct point l1_c2 = { WaypointX(l2) - sin(angle)*radius, + WaypointY(l2) - cos(angle)*radius, + alt }; + struct point l1_c3 = { l1_c2.x - 2*radius*cos(angle) , + l1_c2.y + 2*radius*sin(angle), + alt }; + + float qdr_out_2_1 = M_PI/3. - atan2(u_y, u_x); + float qdr_out_2_2 = -M_PI/3. - atan2(u_y, u_x); + float qdr_out_2_3 = M_PI - atan2(u_y, u_x); + + + NavVerticalAutoThrottleMode(0); + NavVerticalAltitudeMode(WaypointAlt(l1), 0.); + + switch (border_line_status) { + case LR12: + NavSegment(l2, l1); + if (NavApproachingFrom(l1, l2, CARROT)) { + border_line_status = LQC21; + nav_init_stage(); + } + break; + case LQC21: + nav_circle_XY(l2_c1.x, l2_c1.y, -radius); + if (NavQdrCloseTo(DegOfRad(qdr_out_2_2)-10)) { + border_line_status = LTC2; + nav_init_stage(); + } + break; + case LTC2: + nav_circle_XY(l2_c2.x, l2_c2.y, radius); + if (NavQdrCloseTo(DegOfRad(qdr_out_2_3)-10)) { + border_line_status = LR21; + nav_init_stage(); + } + break; + + case LR21: + NavSegment(l1, l2); + if (NavApproachingFrom(l2, l1, CARROT)) { + border_line_status = LTC1; + nav_init_stage(); + } + break; + + case LTC1: + nav_circle_XY(l1_c2.x, l1_c2.y, radius); + if (NavQdrCloseTo(DegOfRad(qdr_out_2_1) + 10)) { + border_line_status = LQC11; + nav_init_stage(); + } + break; + case LQC11: + nav_circle_XY(l1_c3.x, l1_c3.y, -radius); + if (NavQdrCloseTo(DegOfRad(qdr_out_2_3 + M_PI + 10))) { + border_line_status = LR12; + nav_init_stage(); + } + break; + + default: /* Should not occur !!! End the pattern */ + return FALSE; + } + return TRUE; /* This pattern never ends */ +} diff --git a/sw/airborne/subsystems/navigation/border_line.h b/sw/airborne/subsystems/navigation/border_line.h new file mode 100644 index 0000000000..7c8094b26a --- /dev/null +++ b/sw/airborne/subsystems/navigation/border_line.h @@ -0,0 +1,40 @@ +/* + * $Id$ + * + * Copyright (C) 2012, Tobias Muench + * + * 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/navigation/border_line.h + * @brief navigate along a border line (line 1-2) with turns in the same direction + */ + +#ifndef BORDER_LINE_H +#define BORDER_LINE_H + +#include "std.h" + +extern bool_t border_line_init( void ); +extern bool_t border_line(uint8_t wp1, uint8_t wp2, float radius); + +#endif + +/* BORDER_LINE_H */ diff --git a/sw/airborne/subsystems/navigation/gls.c b/sw/airborne/subsystems/navigation/gls.c new file mode 100644 index 0000000000..7346d60ff7 --- /dev/null +++ b/sw/airborne/subsystems/navigation/gls.c @@ -0,0 +1,177 @@ +/* + * + * Copyright (C) 2012, Tobias Münch + * + * 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/navigation/gls.c + * @brief gps landing system + * + * gps landing system + * -automatic calculation of top of decent for const app angle + * -smooth intercept posible + * -landing direction is set by app fix / also possible in flight!!! + * + * in airframe.xml + * it is possible to define + * + * 1. target_speed + * 2. app_angle + * 3. app_intercept_af_tod + * + * 1 - only efective with useairspeed flag + * 2 - defauld is a approach angle of 5 degree which should be fine for most planes + * 3 - distance between approach fix and top of decent +*/ + + + +#include "generated/airframe.h" +#include "estimator.h" +#include "subsystems/navigation/gls.h" +#include "subsystems/nav.h" +#include "generated/flight_plan.h" + + + +float target_speed; +float app_angle; +float app_intercept_af_tod; + +bool_t init = TRUE; + +#ifndef APP_TARGET_SPEED +#define APP_TARGET_SPEED V_CTL_AUTO_AIRSPEED_SETPOINT; +#endif + +#ifndef APP_ANGLE +#define APP_ANGLE 5; +#endif + +#ifndef APP_INTERCEPT_AF_TOD +#define APP_INTERCEPT_AF_TOD 100 +#endif + + +static inline bool_t gls_compute_TOD(uint8_t _af, uint8_t _tod, uint8_t _td) { + + if ((WaypointX(_af)==WaypointX(_td))&&(WaypointY(_af)==WaypointY(_td))){ + WaypointX(_af)=WaypointX(_td)-1; + } + + float td_af_x = WaypointX(_af) - WaypointX(_td); + float td_af_y = WaypointY(_af) - WaypointY(_td); + float td_af = sqrt( td_af_x*td_af_x + td_af_y*td_af_y); + float td_tod = (WaypointAlt(_af) - WaypointAlt(_td)) / (tan(RadOfDeg(app_angle))); + + WaypointX(_tod) = WaypointX(_td) + td_af_x / td_af * td_tod; + WaypointY(_tod) = WaypointY(_td) + td_af_y / td_af * td_tod; + WaypointAlt(_tod) = WaypointAlt(_af); + + if (td_tod > td_af) { + WaypointX(_af) = WaypointX(_tod) + td_af_x / td_af * app_intercept_af_tod; + WaypointY(_af) = WaypointY(_tod) + td_af_y / td_af * app_intercept_af_tod; + } + return FALSE; +} // end of gls_copute_TOD + + +//############################################################################################### + +bool_t gls_init(uint8_t _af, uint8_t _tod, uint8_t _td) { + + init = TRUE; + + #ifdef USE_AIRSPEED +// float wind_additional = sqrt(wind_east*wind_east + wind_north*wind_north); // should be gusts only! +// Bound(wind_additional, 0, 0.5); +// target_speed = FL_ENVE_V_S * 1.3 + wind_additional; FIXME + target_speed = APP_TARGET_SPEED; // ok for now! + #endif + + app_angle = APP_ANGLE; + app_intercept_af_tod = APP_INTERCEPT_AF_TOD; + Bound(app_intercept_af_tod,0,200); + + + gls_compute_TOD(_af, _tod, _td); // calculate Top Of Decent + + return FALSE; +} // end of gls_init() + + +//############################################################################################### + + +bool_t gls(uint8_t _af, uint8_t _tod, uint8_t _td) { + + + if (init){ + + #ifdef USE_AIRSPEED + v_ctl_auto_airspeed_setpoint = target_speed; // set target speed for approach + #endif + init = FALSE; + + } + + + float final_x = WaypointX(_td) - WaypointX(_tod); + float final_y = WaypointY(_td) - WaypointY(_tod); + float final2 = Max(final_x * final_x + final_y * final_y, 1.); + + float nav_final_progress = ((estimator_x - WaypointX(_tod)) * final_x + (estimator_y - WaypointY(_tod)) * final_y) / final2; + Bound(nav_final_progress,-1,1); + float nav_final_length = sqrt(final2); + + float pre_climb = -(WaypointAlt(_tod) - WaypointAlt(_td)) / (nav_final_length / estimator_hspeed_mod); + Bound(pre_climb, -5, 0.); + + float start_alt = WaypointAlt(_tod); + float diff_alt = WaypointAlt(_td) - start_alt; + float alt = start_alt + nav_final_progress * diff_alt; + Bound(alt, WaypointAlt(_td), start_alt +(pre_climb/(v_ctl_altitude_pgain))) // to prevent climbing before intercept + + + + + if(nav_final_progress < -0.5) { // for smooth intercept + + NavVerticalAltitudeMode(WaypointAlt(_tod), 0); // vertical mode (fly straigt and intercept glideslope) + + NavVerticalAutoThrottleMode(0); // throttle mode + + NavSegment(_af, _td); // horizontal mode (stay on localiser) + } + + else { // + + NavVerticalAltitudeMode(alt, pre_climb); // vertical mode (folow glideslope) + + NavVerticalAutoThrottleMode(0); // throttle mode + + NavSegment(_af, _td); // horizontal mode (stay on localiser) + } + + +return TRUE; + +} // end of gls() diff --git a/sw/airborne/subsystems/navigation/gls.h b/sw/airborne/subsystems/navigation/gls.h new file mode 100644 index 0000000000..f6f7ea71b8 --- /dev/null +++ b/sw/airborne/subsystems/navigation/gls.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (C) 2012, Tobias Muench + * + * 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/navigation/gls.h + * @brief gps landing system + */ + +#ifndef NAV_GLS_H +#define NAV_GLS_H + +#include "std.h" +#include "paparazzi.h" + + + +extern bool_t gls_init(uint8_t _af, uint8_t _tod, uint8_t _td); +extern bool_t gls(uint8_t _af, uint8_t _tod, uint8_t _td); + +#endif diff --git a/sw/airborne/subsystems/sensors/infrared.h b/sw/airborne/subsystems/sensors/infrared.h index 4b5e0e4acc..84ad3ac4e3 100644 --- a/sw/airborne/subsystems/sensors/infrared.h +++ b/sw/airborne/subsystems/sensors/infrared.h @@ -54,6 +54,10 @@ */ #define IR_RollOfIrs(_ir1, _ir2) (_ir1 + _ir2) #define IR_PitchOfIrs(_ir1, _ir2) (-(_ir1) + _ir2) +#else +#ifndef SITL +#error "You have to define either HORIZ_SENSOR_ALIGNED or HORIZ_SENSOR_TILTED in the IR section" +#endif #endif /* Vertical sensor, TOP_SIGN gives positice values when it's warm on the bottom */ #ifndef IR_TopOfIr diff --git a/sw/airborne/sys_time.h b/sw/airborne/sys_time.h index a665e88c5c..0c9298d433 100644 --- a/sw/airborne/sys_time.h +++ b/sw/airborne/sys_time.h @@ -23,7 +23,7 @@ */ /* - *\brief architecture independant timing functions + *\brief architecture independent timing functions * */ diff --git a/sw/ground_segment/cockpit/gcs.ml b/sw/ground_segment/cockpit/gcs.ml index 6f832fa8a0..488aeb7f30 100644 --- a/sw/ground_segment/cockpit/gcs.ml +++ b/sw/ground_segment/cockpit/gcs.ml @@ -347,7 +347,7 @@ let options = "-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"; "-fullscreen", Arg.Set fullscreen, "Fullscreen window"; - "-google_fill", Arg.Set GM.auto, "Google maps auto fill"; + "-maps_fill", Arg.Set GM.auto, "Automatically start loading background maps"; "-ign", Arg.String (fun s -> ign:=true; IGN.data_path := s), "IGN tiles path"; "-lambertIIe", Arg.Unit (fun () -> projection:=G.LambertIIe),"Switch to LambertIIe projection"; "-layout", Arg.Set_string layout_file, (sprintf " GUI layout. Default: %s" !layout_file); @@ -356,12 +356,12 @@ let options = "-mercator", Arg.Unit (fun () -> projection:=G.Mercator),"Switch to (Google Maps) Mercator projection, default"; "-mplayer", Arg.Set_string mplayer, "Launch mplayer with the given argument as X plugin"; "-no_alarm", Arg.Set no_alarm, "Disables alarm page"; - "-no_google_http", Arg.Unit (fun () -> Gm.set_policy Gm.NoHttp), "Switch off Google Maps downloading"; + "-maps_no_http", Arg.Unit (fun () -> Gm.set_policy Gm.NoHttp), "Switch off downloading of maps, always use cached maps"; "-ortho", Arg.Set_string get_bdortho, "IGN tiles path"; "-osm", Arg.Unit (fun () -> Gm.set_maps_source Gm.OSM), "Use OpenStreetMap database (default is Google)"; "-ms", Arg.Unit (fun () -> Gm.set_maps_source Gm.MS), "Use Microsoft maps database (default is Google)"; "-particules", Arg.Set display_particules, "Display particules"; - "-plugin", Arg.Set_string plugin_window, "External X application (launched with the id of the plugin window as argument)"; + "-plugin", Arg.Set_string plugin_window, "External X application (launched with the id of the plugin window as argument)"; "-ref", Arg.Set_string geo_ref, "Geographic ref (e.g. 'WGS84 43.605 1.443')"; "-speech", Arg.Set Speech.active, "Enable vocal messages"; "-srtm", Arg.Set srtm, "Enable SRTM elevation display"; diff --git a/sw/ground_segment/lpc21iap/Makefile b/sw/ground_segment/lpc21iap/Makefile index e3fab50201..dc4a954a37 100644 --- a/sw/ground_segment/lpc21iap/Makefile +++ b/sw/ground_segment/lpc21iap/Makefile @@ -27,8 +27,8 @@ endif UNAME = $(shell uname -s) ifeq ("$(UNAME)","Darwin") - INCLUDES=-I/opt/local/include/ - LIBRARYS=-L/opt/local/lib + LIBRARYS = -L /opt/paparazzi/lib -L /opt/local/lib + INCLUDES = -I /opt/paparazzi/include -I /opt/local/include/ endif diff --git a/sw/ground_segment/misc/Makefile b/sw/ground_segment/misc/Makefile index d7cf0118fb..7870fe7e62 100644 --- a/sw/ground_segment/misc/Makefile +++ b/sw/ground_segment/misc/Makefile @@ -1,7 +1,8 @@ UNAME = $(shell uname -s) ifeq ("$(UNAME)","Darwin") - LIBRARYS = -L/opt/local/lib + LIBRARYS = -L /opt/paparazzi/lib -L /opt/local/lib + INCLUDES = -I /opt/paparazzi/include -I /opt/local/include/ else LIBRARYS = -s endif @@ -19,4 +20,4 @@ kestrel2ivy: kestrel2ivy.o g++ -o kestrel2ivy kestrel2ivy.o $(LIBRARYS) -livy %.o : %.c - gcc -c -O2 -Wall -I /opt/local/include/ $< + gcc -c -O2 -Wall $(INCLUDES) $< diff --git a/sw/ground_segment/tmtc/rotorcraft_server.ml b/sw/ground_segment/tmtc/rotorcraft_server.ml index ac75d3e04c..a2bae0e44f 100644 --- a/sw/ground_segment/tmtc/rotorcraft_server.ml +++ b/sw/ground_segment/tmtc/rotorcraft_server.ml @@ -174,11 +174,13 @@ let log_and_parse = fun ac_name (a:Aircraft.aircraft) msg values -> a.roll <- foi32value "phi" /. angle_frac; a.pitch <- foi32value "theta" /. angle_frac; a.throttle <- foi32value "thrust" /. 2.; (* thrust / 200 * 100 *) - (*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*) + | "GPS_INT" -> + a.unix_time <- LL.unix_time_of_tow (truncate (fvalue "tow" /. 1000.)); + a.itow <- Int32.of_float (fvalue "tow"); + a.gps_Pacc <- ivalue "pacc" | "ROTORCRAFT_STATUS" -> a.vehicle_type <- Rotorcraft; a.fbw.rc_status <- get_rc_status (ivalue "rc_status"); diff --git a/sw/lib/ocaml/ivy/Makefile b/sw/lib/ocaml/ivy/Makefile index 24613416c7..574935c6d6 100644 --- a/sw/lib/ocaml/ivy/Makefile +++ b/sw/lib/ocaml/ivy/Makefile @@ -49,8 +49,11 @@ TKIVYCMX= $(TKIVY:.ml=.cmx) UNAME = $(shell uname -s) +UNAME = $(shell uname -s) + ifeq ("$(UNAME)","Darwin") - LIBRARYS = -L/opt/local/lib + LIBRARYS = -L /opt/paparazzi/lib -L /opt/local/lib + INCLUDES = -I /opt/paparazzi/include -I /opt/local/include/ endif LIBS = ivy-ocaml.cma ivy-ocaml.cmxa glibivy-ocaml.cma glibivy-ocaml.cmxa @@ -102,7 +105,7 @@ tkivy-ocaml.cmxa : $(TKIVYCMX) civy.o ctkivy.o $(OCAMLC) $(OCAMLFLAGS) $(INCLUDES) -c $< .c.o : - $(CC) -Wall -c $(FPIC) -I /opt/local/include/ $(OCAMLINC) $(GLIBINC) $< + $(CC) -Wall -c $(FPIC) $(INCLUDES) $(OCAMLINC) $(GLIBINC) $< .mli.cmi : $(OCAMLMLI) $(OCAMLFLAGS) -c $< .ml.cmx : diff --git a/sw/simulator/flight_gear.h b/sw/simulator/flight_gear.h index b5515c89cb..eaf35b0ea9 100644 --- a/sw/simulator/flight_gear.h +++ b/sw/simulator/flight_gear.h @@ -211,9 +211,15 @@ struct FGNetMiniFDM { #define FG_NET_GUI_VERSION 7 #define FG_NET_GUI_MAX_TANKS 4 +// FIXME: Flightgear on OSX is still 32 bit get rid +// off these pragmas when it goes to 64 bit. #ifdef __x86_64__ #pragma pack(push) +#ifdef __APPLE__ #pragma pack(4) +#else +#pragma pack(8) +#endif #endif struct FGNetGUI { uint32_t version; // increment when data values change diff --git a/sw/supervision/paparazzicenter.ml b/sw/supervision/paparazzicenter.ml index 6a174620ae..308adcf55c 100644 --- a/sw/supervision/paparazzicenter.ml +++ b/sw/supervision/paparazzicenter.ml @@ -199,14 +199,15 @@ let () = let tag = GText.tag ~name:color () in tag#set_property (`BACKGROUND color); (color, tag)) - ["red"; "green";"orange"] in + ["red"; "green"; "orange"] in let tag_table = GText.tag_table () in List.iter (fun (_color, tag) -> tag_table#add tag#as_tag) background_tags; let buffer = GText.buffer ~tag_table () in gui#console#set_buffer buffer; let errors = "red", ["error"; "no such file"; "undefined reference"; "failure"] - and warnings = "orange", ["warning"] in + and warnings = "orange", ["warning"] + and info = "green", ["pragma message"] in let color_regexps = List.map (fun (color, strings) -> @@ -214,7 +215,7 @@ let () = let s = String.concat "\\|" s in let s = ".*\\("^s^"\\)" in color, Str.regexp_case_fold s) - [errors; warnings] in + [errors; warnings; info] in let compute_tags = fun s -> let rec loop = function (color, regexp)::rs ->