Skip to content

Commit 3420a30

Browse files
committed
Improve Doxygen comments for structs and enums
1 parent 092b913 commit 3420a30

File tree

1 file changed

+63
-2
lines changed

1 file changed

+63
-2
lines changed

src/sfeQwiicOtos.h

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,76 +20,137 @@
2020
#include <math.h>
2121
#include <stdint.h>
2222

23+
/// @struct sfe_otos_pose2d_t
2324
/// @brief 2D pose structure, including x and y coordinates and heading angle
2425
/// @note Although pose is traditionally used for position and orientation, this
2526
/// structure is also used for velocity and accleration by the OTOS driver
2627
typedef struct
2728
{
29+
/// @brief X value
2830
float x;
31+
32+
/// @brief Y value
2933
float y;
34+
35+
/// @brief Heading value
3036
float h;
3137
} sfe_otos_pose2d_t;
3238

33-
/// @brief Enumerations for the linear units
39+
/// @enum sfe_otos_linear_unit_t
40+
/// @brief Enumerations for linear units used by the OTOS driver
3441
typedef enum
3542
{
43+
/// @brief Meters
3644
kSfeOtosLinearUnitMeters = 0,
45+
46+
/// @brief Inches (default)
3747
kSfeOtosLinearUnitInches = 1
3848
} sfe_otos_linear_unit_t;
3949

40-
/// @brief Enumerations for the angular units
50+
/// @enum sfe_otos_angular_unit_t
51+
/// @brief Enumerations for angular units used by the OTOS driver
4152
typedef enum
4253
{
54+
/// @brief Radians
4355
kSfeOtosAngularUnitRadians = 0,
56+
57+
/// @brief Degrees (default)
4458
kSfeOtosAngularUnitDegrees = 1
4559
} sfe_otos_angular_unit_t;
4660

61+
/// @union sfe_otos_version_t
4762
/// @brief Version register bit fields
4863
typedef union {
4964
struct
5065
{
66+
/// @brief Minor version number
5167
uint8_t minor : 4;
68+
69+
/// @brief Major version number
5270
uint8_t major : 4;
5371
};
72+
73+
/// @brief Raw register value
5474
uint8_t value;
5575
} sfe_otos_version_t;
5676

77+
/// @union sfe_otos_signal_process_config_t
5778
/// @brief Signal process config register bit fields
5879
typedef union {
5980
struct
6081
{
82+
/// @brief Whether to use the internal lookup table calibration for the
83+
/// optical sensor
6184
uint8_t enLut : 1;
85+
86+
/// @brief Whether to feed the accelerometer data to the Kalman filters
6287
uint8_t enAcc : 1;
88+
89+
/// @brief Whether to rotate the IMU and optical sensor data by the
90+
/// heading angle
6391
uint8_t enRot : 1;
92+
93+
/// @brief Whether to use the correct sensor variance in the Kalman
94+
/// filters, or use 0 varaince to effectively disable the filters
6495
uint8_t enVar : 1;
96+
97+
/// @brief Reserved bits, do not use
6598
uint8_t reserved : 4;
6699
};
100+
101+
/// @brief Raw register value
67102
uint8_t value;
68103
} sfe_otos_signal_process_config_t;
69104

105+
/// @union sfe_otos_self_test_config_t
70106
/// @brief Self test register bit fields
71107
typedef union {
72108
struct
73109
{
110+
/// @brief Write 1 to start the self test
74111
uint8_t start : 1;
112+
113+
/// @brief Returns 1 while the self test is in progress
75114
uint8_t inProgress : 1;
115+
116+
/// @brief Returns 1 if the self test passed
76117
uint8_t pass : 1;
118+
119+
/// @brief Returns 1 if the self test failed
77120
uint8_t fail : 1;
121+
122+
/// @brief Reserved bits, do not use
78123
uint8_t reserved : 4;
79124
};
125+
126+
/// @brief Raw register value
80127
uint8_t value;
81128
} sfe_otos_self_test_config_t;
82129

130+
/// @union sfe_otos_status_t
83131
/// @brief Status register bit fields
84132
typedef union {
85133
struct
86134
{
135+
/// @brief Returns 1 if the tilt angle threshold has been exceeded.
136+
/// While set, the accelerometer data is ignored
87137
uint8_t warnTiltAngle : 1;
138+
139+
/// @brief Returns 1 if the optical tracking is unreliable. While set,
140+
/// only the IMU data is used for tracking unless warnTiltAngle is set
88141
uint8_t warnOpticalTracking : 1;
142+
143+
/// @brief Reserved bits, do not use
89144
uint8_t reserved : 4;
145+
146+
/// @brief Returns 1 if the optical sensor has a fatal error
90147
uint8_t errorPaa : 1;
148+
149+
/// @brief Returns 1 if the IMU has a fatal error
91150
uint8_t errorLsm : 1;
92151
};
152+
153+
/// @brief Raw register value
93154
uint8_t value;
94155
} sfe_otos_status_t;
95156

0 commit comments

Comments
 (0)