Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Skyward Boardcore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
Skyward Boardcore
Commits
95caea74
Commit
95caea74
authored
4 months ago
by
Pietro Bortolus
Browse files
Options
Downloads
Patches
Plain Diff
[ND015X] Added doxygen comments
I also deleted an enum that was not used in the ND015A file
parent
8d26fc4e
No related branches found
No related tags found
No related merge requests found
Pipeline
#10969
passed
4 months ago
Stage: lint
Stage: build
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/shared/sensors/ND015X/ND015A.h
+30
-15
30 additions, 15 deletions
src/shared/sensors/ND015X/ND015A.h
src/shared/sensors/ND015X/ND015D.h
+34
-6
34 additions, 6 deletions
src/shared/sensors/ND015X/ND015D.h
with
64 additions
and
21 deletions
src/shared/sensors/ND015X/ND015A.h
+
30
−
15
View file @
95caea74
...
...
@@ -35,20 +35,6 @@ namespace Boardcore
class
ND015A
:
public
Sensor
<
ND015XData
>
{
public:
/**
* The datasheet is unclear about the unit of measure,
* it could be either psi or inH2O but I believe it's the latter
*/
enum
FullScaleRange
:
uint8_t
{
FS_1
=
0x02
,
// 1.0 psi
FS_2
=
0x03
,
// 2.0 psi
FS_4
=
0x04
,
// 4.0 psi
FS_5
=
0x05
,
// 5.0 psi
FS_10
=
0x06
,
// 10.0 psi
FS_15
=
0x07
,
// 15.0 psi
};
enum
BWLimitFilter
:
uint8_t
{
BWL_1
=
0x00
,
// 1.0 Hz
...
...
@@ -73,10 +59,27 @@ public:
ENABLED
=
0x80
,
};
/**
* @brief Constructor for the ND015A sensor.
*
* @param bus SPI bus interface.
* @param cs Chip select GPIO pin.
* @param spiConfig SPI bus configuration.
*/
ND015A
(
SPIBusInterface
&
bus
,
miosix
::
GpioPin
cs
,
SPIBusConfig
spiConfig
);
/**
* @brief Initializes the sensor.
*
* @return True if model number matches, false otherwise.
*/
bool
init
()
override
;
/**
* @brief Not implemented.
*
* @return Always returns true.
*/
bool
selfTest
()
override
;
/**
...
...
@@ -84,7 +87,9 @@ public:
*
* @param odr output data rate for the sensor,
* the actual odr is calculated as
* 444Hz / odr
* 444Hz / odr.
* Allowed values are 0x00 to 0xFF,
* 0x00 will select the auto-select rate mode
*/
void
setOutputDataRate
(
u_int8_t
odr
);
...
...
@@ -100,8 +105,18 @@ public:
*/
void
setIOWatchdog
(
IOWatchdogEnable
iow
);
/**
* @brief Sets the bandwidth limit filter for the sensor.
*
* @param bwl Bandwidth limit filter setting.
*/
void
setBWLimitFilter
(
BWLimitFilter
bwl
);
/**
* @brief Enables or disables the notch filter.
*
* @param ntc Notch filter setting.
*/
void
setNotch
(
NotchEnable
ntc
);
protected
:
...
...
This diff is collapsed.
Click to expand it.
src/shared/sensors/ND015X/ND015D.h
+
34
−
6
View file @
95caea74
...
...
@@ -72,10 +72,27 @@ public:
ENABLED
=
0x80
,
};
/**
* @brief Constructor for the ND015D sensor.
*
* @param bus SPI bus interface.
* @param cs Chip select GPIO pin.
* @param spiConfig SPI bus configuration.
*/
ND015D
(
SPIBusInterface
&
bus
,
miosix
::
GpioPin
cs
,
SPIBusConfig
spiConfig
);
/**
* @brief Initializes the sensor.
*
* @return True if model number matches, false otherwise.
*/
bool
init
()
override
;
/**
* @brief Not implemented.
*
* @return Always returns true.
*/
bool
selfTest
()
override
;
/**
...
...
@@ -83,27 +100,38 @@ public:
*
* @param odr output data rate for the sensor,
* the actual odr is calculated as
* 444Hz / odr
* 444Hz / odr.
* Allowed values are 0x00 to 0xFF,
* 0x00 will select the auto-select rate mode
*/
void
setOutputDataRate
(
u_int8_t
odr
);
/**
* @brief
function to set
the fullscale range
* @brief
Sets
the full
-
scale range
for the sensor.
*
* @param fs fullscale range, default is
* 2.0 psi
* @param fs Full-scale range. Default is 2.0 psi.
*/
void
setFullScaleRange
(
FullScaleRange
fs
);
/**
* @brief
function to en
able the IO watchdog
* @brief
Enables or dis
able
s
the IO watchdog
.
*
* @param iow setting
* @param iow
IO watchdog
setting
.
*/
void
setIOWatchdog
(
IOWatchdogEnable
iow
);
/**
* @brief Sets the bandwidth limit filter for the sensor.
*
* @param bwl Bandwidth limit filter setting.
*/
void
setBWLimitFilter
(
BWLimitFilter
bwl
);
/**
* @brief Enables or disables the notch filter.
*
* @param ntc Notch filter setting.
*/
void
setNotch
(
NotchEnable
ntc
);
protected
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment