Skip to content

Commit 9aa2bf3

Browse files
committed
Merge branch 'release/1.2.2'
2 parents 7caa24e + c188ce9 commit 9aa2bf3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+23575
-12
lines changed

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Doxyfile
2-
xml/
3-
html/
1+
# Doxyfile
2+
docs/doxygen_output/*
43
*.gch
4+
docs/_build
5+
6+
!docs/doxygen_output/xml

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Contributing guide
2+
3+
For now, this'll only be about documentation:
4+
5+
## Generating documentation
6+
7+
To generate the documentation, you'll need to install both Doxygen and Sphinx.
8+
9+
When these are installed, you can run the following in your favorite shell to build the documentation.
10+
11+
* doxygen Doxyfile
12+
* cd docs
13+
* make html

Doxyfile

Lines changed: 2482 additions & 0 deletions
Large diffs are not rendered by default.

Pozyx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ typedef struct __attribute__((packed))_device_range {
229229
}device_range_t;
230230

231231
/**
232-
* Pozyx CLASS
233-
* -----------
232+
* Provides an interface to an attached Pozyx shield.
233+
*
234234
*/
235235
class PozyxClass
236236
{

Pozyx_definitions.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
Pozyx_definitions.h - Library for Arduino Pozyx shield.
33
Copyright (c) Pozyx Laboratories. All right reserved.
44
@@ -28,7 +28,7 @@
2828
#define _POZYX_FORMAT_FOOT
2929
#define _POZYX_FORMAT_INCH
3030

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

3434
#define POZYX_I2C_ADDRESS 0x4B
@@ -216,6 +216,8 @@
216216
#define POZYX_DELAY_REMOTE_WRITE 5
217217
#define POZYX_DELAY_REMOTE_FUNCTION 10
218218
#define POZYX_DELAY_INTERRUPT 100
219+
#define POZYX_DELAY_POSITIONING 1000
220+
#define POZYX_DELAY_REMOTE_POSITIONING 1000
219221
#define POZYX_DELAY_CALIBRATION 1000
220222
#define POZYX_FAILURE 0x0
221223
#define POZYX_SUCCESS 0x1
@@ -259,6 +261,8 @@
259261

260262
// Division factors for converting the raw register values to meaningful physical quantities
261263
#define POZYX_POS_DIV_MM 1.0f
264+
#define POZYX_PRESS_DIVPOSITIONING 1000
265+
#define POZYX_PRESS_DIVREMOTE_POSITIONING 1000
262266
#define POZYX_PRESS_DIV_PA 1000.0f
263267
#define POZYX_ACCEL_DIV_MG 1.0f
264268
#define POZYX_GYRO_DIV_DPS 16.0f

Pozyx_lib.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ int PozyxClass::doPositioning(coordinates_t *position, uint8_t dimension, int32_
805805
return POZYX_FAILURE;
806806

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

922-
if (firmware == 0x13) {
922+
if (firmware >= 0x13) {
923923
uint8_t params_positioning[2] = {1, 0};
924924
status = remoteRegFunctionWithoutCheck(remote_id, POZYX_DO_POSITIONING, params_positioning, 2, NULL, 0);
925925

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

952952
// change timeout flag if crashes
953-
if (waitForFlag_safe(POZYX_INT_STATUS_RX_DATA , 200)){
953+
if (waitForFlag_safe(POZYX_INT_STATUS_RX_DATA , POZYX_DELAY_REMOTE_POSITIONING)){
954954

955955
// we received a response, now get some information about the response
956956
uint8_t rx_info[3]= {0,0,0};

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = PozyxArduinoLibrary
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/api/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. toctree::
2+
:maxdepth: 2
3+
:caption: Contents:
4+
5+
pozyx_functions
6+
pozyx_class
7+
structs
8+
9+
10+

docs/api/pozyx_class.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Pozyx Class Full
2+
================
3+
4+
Members
5+
-------
6+
7+
.. doxygenclass:: PozyxClass
8+
:members:
9+
10+
11+
Protected
12+
---------
13+
14+
.. doxygenclass:: PozyxClass
15+
:protected-members:
16+
17+
18+
Private
19+
-------
20+
21+
.. doxygenclass:: PozyxClass
22+
:private-members:
23+
24+
25+
Undocumented...
26+
---------------
27+
28+
.. doxygenclass:: PozyxClass
29+
:undoc-members:

docs/api/pozyx_functions.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Pozyx Class Full
2+
================
3+
4+
5+
Core
6+
----
7+
8+
.. doxygengroup:: core
9+
:members:
10+
11+
12+
System functions
13+
----------------
14+
15+
.. doxygengroup:: System_functions
16+
:members:
17+
18+
19+
Communication
20+
-------------
21+
22+
.. doxygengroup:: Communication_functions
23+
:members:
24+
25+
26+
Device list
27+
-------------
28+
29+
.. doxygengroup:: device_list
30+
:members:
31+
32+
33+
Positioning
34+
-------------
35+
36+
.. doxygengroup:: Positioning_functions
37+
:members:
38+
39+
40+
Sensor Data
41+
-------------
42+
43+
.. doxygengroup:: sensor_data
44+
:members:
45+

0 commit comments

Comments
 (0)