Skip to content

Commit

Permalink
Merge branch 'release/1.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentva committed Aug 29, 2018
2 parents 7caa24e + c188ce9 commit 9aa2bf3
Show file tree
Hide file tree
Showing 46 changed files with 23,575 additions and 12 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Doxyfile
xml/
html/
# Doxyfile
docs/doxygen_output/*
*.gch
docs/_build

!docs/doxygen_output/xml
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contributing guide

For now, this'll only be about documentation:

## Generating documentation

To generate the documentation, you'll need to install both Doxygen and Sphinx.

When these are installed, you can run the following in your favorite shell to build the documentation.

* doxygen Doxyfile
* cd docs
* make html
2,482 changes: 2,482 additions & 0 deletions Doxyfile

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Pozyx.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ typedef struct __attribute__((packed))_device_range {
}device_range_t;

/**
* Pozyx CLASS
* -----------
* Provides an interface to an attached Pozyx shield.
*
*/
class PozyxClass
{
Expand Down
8 changes: 6 additions & 2 deletions Pozyx_definitions.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
Pozyx_definitions.h - Library for Arduino Pozyx shield.
Copyright (c) Pozyx Laboratories. All right reserved.
Expand Down Expand Up @@ -28,7 +28,7 @@
#define _POZYX_FORMAT_FOOT
#define _POZYX_FORMAT_INCH

// maximum number of anchors to be stored in the interal anchor list on the pozyx device
/* Maximum number of anchors to be stored in the interal anchor list on the pozyx device */
#define MAX_ANCHORS_IN_LIST 20

#define POZYX_I2C_ADDRESS 0x4B
Expand Down Expand Up @@ -216,6 +216,8 @@
#define POZYX_DELAY_REMOTE_WRITE 5
#define POZYX_DELAY_REMOTE_FUNCTION 10
#define POZYX_DELAY_INTERRUPT 100
#define POZYX_DELAY_POSITIONING 1000
#define POZYX_DELAY_REMOTE_POSITIONING 1000
#define POZYX_DELAY_CALIBRATION 1000
#define POZYX_FAILURE 0x0
#define POZYX_SUCCESS 0x1
Expand Down Expand Up @@ -259,6 +261,8 @@

// Division factors for converting the raw register values to meaningful physical quantities
#define POZYX_POS_DIV_MM 1.0f
#define POZYX_PRESS_DIVPOSITIONING 1000
#define POZYX_PRESS_DIVREMOTE_POSITIONING 1000
#define POZYX_PRESS_DIV_PA 1000.0f
#define POZYX_ACCEL_DIV_MG 1.0f
#define POZYX_GYRO_DIV_DPS 16.0f
Expand Down
8 changes: 4 additions & 4 deletions Pozyx_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ int PozyxClass::doPositioning(coordinates_t *position, uint8_t dimension, int32_
return POZYX_FAILURE;

// now wait for the positioning to finish or generate an error
if (waitForFlag_safe(POZYX_INT_STATUS_POS | POZYX_INT_STATUS_ERR, 2*POZYX_DELAY_INTERRUPT, &int_status)){
if (waitForFlag_safe(POZYX_INT_STATUS_POS | POZYX_INT_STATUS_ERR, POZYX_DELAY_POSITIONING, &int_status)){
if((int_status & POZYX_INT_STATUS_ERR) == POZYX_INT_STATUS_ERR)
{
// An error occured during positioning.
Expand Down Expand Up @@ -919,11 +919,11 @@ int PozyxClass::doRemotePositioning(uint16_t remote_id, coordinates_t *coordinat
uint8_t firmware;
getFirmwareVersion(&firmware);

if (firmware == 0x13) {
if (firmware >= 0x13) {
uint8_t params_positioning[2] = {1, 0};
status = remoteRegFunctionWithoutCheck(remote_id, POZYX_DO_POSITIONING, params_positioning, 2, NULL, 0);

if (waitForFlag_safe(POZYX_INT_STATUS_RX_DATA , 200) == POZYX_SUCCESS){
if (waitForFlag_safe(POZYX_INT_STATUS_RX_DATA , POZYX_DELAY_REMOTE_POSITIONING) == POZYX_SUCCESS){
uint8_t rx_info[3]= {0,0,0};
regRead(POZYX_RX_NETWORK_ID, rx_info, 3);
uint16_t remote_network_id = rx_info[0] + ((uint16_t)rx_info[1]<<8);
Expand All @@ -950,7 +950,7 @@ int PozyxClass::doRemotePositioning(uint16_t remote_id, coordinates_t *coordinat
}

// change timeout flag if crashes
if (waitForFlag_safe(POZYX_INT_STATUS_RX_DATA , 200)){
if (waitForFlag_safe(POZYX_INT_STATUS_RX_DATA , POZYX_DELAY_REMOTE_POSITIONING)){

// we received a response, now get some information about the response
uint8_t rx_info[3]= {0,0,0};
Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = PozyxArduinoLibrary
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
10 changes: 10 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. toctree::
:maxdepth: 2
:caption: Contents:

pozyx_functions
pozyx_class
structs



29 changes: 29 additions & 0 deletions docs/api/pozyx_class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Pozyx Class Full
================

Members
-------

.. doxygenclass:: PozyxClass
:members:


Protected
---------

.. doxygenclass:: PozyxClass
:protected-members:


Private
-------

.. doxygenclass:: PozyxClass
:private-members:


Undocumented...
---------------

.. doxygenclass:: PozyxClass
:undoc-members:
45 changes: 45 additions & 0 deletions docs/api/pozyx_functions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Pozyx Class Full
================


Core
----

.. doxygengroup:: core
:members:


System functions
----------------

.. doxygengroup:: System_functions
:members:


Communication
-------------

.. doxygengroup:: Communication_functions
:members:


Device list
-------------

.. doxygengroup:: device_list
:members:


Positioning
-------------

.. doxygengroup:: Positioning_functions
:members:


Sensor Data
-------------

.. doxygengroup:: sensor_data
:members:

Empty file added docs/api/structs.rst
Empty file.
163 changes: 163 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'Pozyx Arduino Library'
copyright = '2018, Samuel Van de Velde, Vadim Vermeiren, Laurent Van Acker'
author = 'Samuel Van de Velde, Vadim Vermeiren, Laurent Van Acker'

# The short X.Y version
version = '1.2'
# The full version, including alpha/beta/rc tags
release = '1.2.2'


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'breathe',
]


breathe_projects = { "ardupozyx": '/'.join(__file__.split('/')[:-1]) + "/doxygen_output/xml"}

breathe_default_project = "ardupozyx"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

html_logo = "images/logo.png"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'PozyxArduinoLibrarydoc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'PozyxArduinoLibrary.tex', 'Pozyx Arduino Library Documentation',
'Samuel Van de Velde, Vadim Vermeiren, Laurent Van Acker', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pozyxarduinolibrary', 'Pozyx Arduino Library Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'PozyxArduinoLibrary', 'Pozyx Arduino Library Documentation',
author, 'PozyxArduinoLibrary', 'One line description of project.',
'Miscellaneous'),
]
Loading

0 comments on commit 9aa2bf3

Please sign in to comment.