Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DC motor driver hat
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
Software
DC motor driver hat
Commits
dd7f909e
Commit
dd7f909e
authored
8 months ago
by
Samuel Tardieu
Browse files
Options
Downloads
Patches
Plain Diff
Return a value instead of a 1-tuple for who_am_i
parent
10e8735a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#97381
failed
8 months ago
Stage: check
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
controller/python/controller.py
+1
-1
1 addition, 1 deletion
controller/python/controller.py
with
1 addition
and
1 deletion
controller/python/controller.py
+
1
−
1
View file @
dd7f909e
...
...
@@ -31,7 +31,7 @@ class Controller:
def
who_am_i
(
self
)
->
int
:
"""
Check that the motors controller board is present. This
should return the same value as Controller.I2C_ADDR.
"""
return
self
.
_read
(
self
.
WHO_AM_I
,
1
,
"
B
"
)
return
self
.
_read
(
self
.
WHO_AM_I
,
1
,
"
B
"
)
[
0
]
def
set_max_percentage
(
self
,
percent
:
float
):
"""
Set the maximum percentage of power which will be used
...
...
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