-
Notifications
You must be signed in to change notification settings - Fork 8.1k
steval_stwinbx1 board: Improve sensor support #76870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
steval_stwinbx1 board: Improve sensor support #76870
Conversation
Do not fail when requested rate passed in SENSOR_ATTR_SAMPLING_FREQUENCY is not matching any of the odr values supported by sensor. Instead, round it up to the next one. Signed-off-by: Armando Visconti <[email protected]>
Fix the sensor range setting at runtime which is currently returning error, converting the SI (ms2) value passed thru SENSOR_ATTR_FULL_SCALE in mg (and not in g) as this is the unit used in the driver internals. Signed-off-by: Armando Visconti <[email protected]>
Add few other sensors support to steval_stwinbx1 board: - IIS2MDC: 3-axis magnetometer - ISM330DHCX: IMU, 3D accelerometer and 3D gyroscope - IIS2DLPC: 3-axis accelerometer - IIS2ICLX: 2-axis digital inclinometer Signed-off-by: Armando Visconti <[email protected]>
|
Without reading the sample in detail I wonder if SENSOR_SHELL can do the same? |
It's not exactly the same. I mean, sensor_shell is more an interactive tool to explore things up, and this sample is more board specific and automatic. |
I see. There definitely is an advantage of just flashing the board and it will print all sensor values without any interaction.
I guess it is somewhere in between. If a generic sensor sample that printed all initialized sensor's values periodically I think a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only nit comments.
Add sample to test STWIN.box board sensors. Signed-off-by: Armando Visconti <[email protected]>
3950a61 to
ca19fe7
Compare
Add few other sensors support to steval_stwinbx1 board and a basic sample to test:
Fixed a couple of things in iis2iclx driver while testing the board.