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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Nicolò Caruso
Skyward Boardcore
Commits
738a0383
Commit
738a0383
authored
1 year ago
by
Nicolò
Browse files
Options
Downloads
Patches
Plain Diff
LIS3DSHDef.h implemented
Implemented LISH3DSHDef.h header with sensor specifics
parent
d0d59f52
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/shared/sensors/MY_LIS3DSH/MY_LIS3DSHDefs.h
+17
-3
17 additions, 3 deletions
src/shared/sensors/MY_LIS3DSH/MY_LIS3DSHDefs.h
with
17 additions
and
3 deletions
src/shared/sensors/MY_LIS3DSH/MY_LIS3DSHDefs.h
+
17
−
3
View file @
738a0383
...
@@ -73,6 +73,20 @@ namespace Boardcore
...
@@ -73,6 +73,20 @@ namespace Boardcore
STATUS_REG_YOR
=
0b0010
<<
4
,
STATUS_REG_YOR
=
0b0010
<<
4
,
STATUS_REG_ZOR
=
0b0100
<<
4
,
STATUS_REG_ZOR
=
0b0100
<<
4
,
STATUS_REG_XYZOR
=
0b1000
<<
4
,
STATUS_REG_XYZOR
=
0b1000
<<
4
,
}
};
}
// Given by the CTRL_REG1 refernce register
}
constexpr
uint8_t
CTRL_REG1_XEN
=
0b1
;
// X axis Enabled
\ No newline at end of file
constexpr
uint8_t
CTRL_REG1_YEN
=
0b1
<<
1
;
// Y axis Enabled
constexpr
uint8_t
CTRL_REG1_ZEN
=
0b1
<<
2
;
// Z axis Enabled
// Given by the datasheet register
constexpr
uint8_t
WHO_AM_I_ID
=
0x33
;
// Here it is 00110011 -> 0x33
// Sensitivity values from the mechanical characteristics (Table 4 pag.10)
// Here there are 3 different values for the 3 power modes Low power, Normal, High Rate
constexpr
float
SENSITIVITY_VALUES_L
[]
=
{
0.016
,
0.032
,
0.064
,
0.192
}
constexpr
float
SENSITIVITY_VALUES_N
[]
=
{
0.004
,
0.008
,
0.016
,
0.048
}
constexpr
float
SENSITIVITY_VALUES_HR
[]
=
{
0.001
,
0.002
,
0.004
,
0.012
}
}
// namespace LIS3DSHDefs
}
// namespace Boardcore
\ No newline at end of file
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