-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
sensors: test: Add attribute support to sensor emulator backend #65278
Merged
carlescufi
merged 7 commits into
zephyrproject-rtos:main
from
yperess:peress/sensor_tests
Jan 16, 2024
Merged
sensors: test: Add attribute support to sensor emulator backend #65278
carlescufi
merged 7 commits into
zephyrproject-rtos:main
from
yperess:peress/sensor_tests
Jan 16, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
yperess
commented
Nov 16, 2023
•
edited
Loading
edited
- Fix BMI160 to align with data sheet
- Add BMI160 emulator backend so the data collection tests can be done by the generic test
- Add attribute 'get' support to BMI160 and emulator backend
- Write custom tests for bus failures on the BMI160
yperess
requested review from
nashif,
sjg20,
carlescufi,
galak and
MaureenHelm
as code owners
November 16, 2023 08:32
zephyrbot
requested review from
aaronemassey,
alevkoy,
asemjonovs,
avisconti,
jeremybettis,
teburd and
tristan-google
November 16, 2023 08:33
yperess
force-pushed
the
peress/sensor_tests
branch
7 times, most recently
from
November 17, 2023 06:34
9510cf2
to
fe57778
Compare
MaureenHelm
requested changes
Nov 17, 2023
yperess
force-pushed
the
peress/sensor_tests
branch
from
November 17, 2023 20:54
fe57778
to
93bbbdb
Compare
yperess
force-pushed
the
peress/sensor_tests
branch
from
November 17, 2023 21:04
93bbbdb
to
67ef4d3
Compare
alevkoy
reviewed
Nov 21, 2023
yperess
force-pushed
the
peress/sensor_tests
branch
from
December 12, 2023 04:48
ae49646
to
00b9683
Compare
Removed C++ |
teburd
previously approved these changes
Dec 12, 2023
alevkoy
previously approved these changes
Dec 12, 2023
@henrikbrixandersen @MaureenHelm any chance to get another review pass before the end of the year? This is a blocker for us to use upstream drivers |
tristan-google
previously approved these changes
Dec 22, 2023
MaureenHelm
reviewed
Jan 11, 2024
yperess
force-pushed
the
peress/sensor_tests
branch
from
January 12, 2024 15:29
00b9683
to
be22b89
Compare
The push above is just a rebase so that the |
yperess
dismissed stale reviews from tristan-google, alevkoy, and teburd
via
January 12, 2024 16:15
28f9c45
yperess
force-pushed
the
peress/sensor_tests
branch
from
January 12, 2024 16:15
be22b89
to
28f9c45
Compare
yperess
requested review from
MaureenHelm,
tristan-google,
teburd and
alevkoy
January 12, 2024 16:15
Update the backend for sensor emulators to include a function for setting the offset as well as a function to query an attribute's metadata such as bounds and increment size. Additionally, add backend support for setting the _xyz channel values. Make the appropriate test changes to accomodate. Signed-off-by: Yuval Peress <peress@google.com>
The logic in the driver was not aligned to the datasheet. Also, temperature reading was not being done in fetch, but in channel_get. There was also some extra conversions from SI->register->SI when setting the range, this was causing the register value calculation to produce an incorrect scale in some cases. Tests were added to cover these cases. Signed-off-by: Yuval Peress <peress@google.com>
Add support for getting the following attribute values: - SENSOR_ATTR_OFFSET - SENSOR_ATTR_SAMPLING_FREQUENCY - SENSOR_ATTR_FULL_SCALE Signed-off-by: Yuval Peress <peress@google.com>
Adding a hook for tests to inject a mock transport and migrating the accel test to test bmi160 specific things. The old version of the test which checks for read values is now covered by the generic test in the sensor build_all target. Signed-off-by: Yuval Peress <peress@google.com>
Rename the test directory to more accuratly reflect what's being tested. Signed-off-by: Yuval Peress <peress@google.com>
The range map was sorted wrong since the function bmi160_range_to_reg_val() that uses it checks for the user value less than the range component of the bmi160_range struct. This means that no matter what range is set, the value will always end up 2000dps. Signed-off-by: Yuval Peress <peress@google.com>
As an example, when the gyro range is set to 250 deg/sec the scale was set to 133 where it really should be 133.160058662. This leads to a 0.12% error in the value returned. By separating the numerator and denominator, we're able to drastically reduce the error. Signed-off-by: Yuval Peress <peress@google.com>
yperess
force-pushed
the
peress/sensor_tests
branch
from
January 12, 2024 16:52
28f9c45
to
915f68c
Compare
alevkoy
approved these changes
Jan 12, 2024
tristan-google
approved these changes
Jan 12, 2024
MaureenHelm
approved these changes
Jan 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.