Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
b84cd7e9
Commit
b84cd7e9
authored
4 years ago
by
rahix
Browse files
Options
Downloads
Plain Diff
Merge 'bhi160: Allow to re-open the sensor from Python'
Closes
#210
See merge request
!409
parents
903cbcc5
36f4efbc
No related branches found
No related tags found
1 merge request
!409
fix(bhi160): Allow to re-open the sensor from Python
Pipeline
#4759
passed with warnings
4 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pycardium/modules/py/bhi160.py
+5
-0
5 additions, 0 deletions
pycardium/modules/py/bhi160.py
with
5 additions
and
0 deletions
pycardium/modules/py/bhi160.py
+
5
−
0
View file @
b84cd7e9
...
...
@@ -18,6 +18,11 @@ class BHI160:
def
enable_sensor
(
self
):
interrupt
.
disable_callback
(
self
.
interrupt_id
)
interrupt
.
set_callback
(
self
.
interrupt_id
,
self
.
_interrupt
)
# If the sensor is already enabled, disable it first.
# The call is allowed to silently fail.
sys_bhi160
.
disable_sensor
(
self
.
sensor_id
)
self
.
stream_id
=
sys_bhi160
.
enable_sensor
(
self
.
sensor_id
,
self
.
sample_buffer_len
,
self
.
sample_rate
,
self
.
dynamic_range
)
...
...
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