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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ln
firmware
Commits
d3106d0e
Verified
Commit
d3106d0e
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
chore(leds): Rename functions for consistency
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
6f1981a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pycardium/modules/py/leds.py
+23
-23
23 additions, 23 deletions
pycardium/modules/py/leds.py
with
23 additions
and
23 deletions
pycardium/modules/py/leds.py
+
23
−
23
View file @
d3106d0e
...
...
@@ -25,7 +25,7 @@ def clear():
sys_leds
.
set_all
(
values
)
def
flashlight
(
on
):
def
set_
flashlight
(
on
):
"""
Turn on the bright side LED.
...
...
@@ -37,25 +37,7 @@ def flashlight(on):
sys_leds
.
set_flashlight
(
on
)
def
dim_top
(
value
):
"""
Set global brightness for top RGB LEDs.
:param int value: Brightness. Default = 1, range = 1...8
"""
sys_leds
.
dim_top
(
value
)
def
dim_bottom
(
value
):
"""
Set global brightness for bottom RGB LEDs.
:param int value: Brightness. Default = 8, range = 1...8
"""
sys_leds
.
dim_bottom
(
value
)
def
rocket
(
led
,
value
):
def
set_rocket
(
led
,
value
):
"""
Set brightness of one of the rocket LEDs.
...
...
@@ -76,6 +58,24 @@ def rocket(led, value):
sys_leds
.
set_rocket
(
led
,
value
)
def
dim_top
(
value
):
"""
Set global brightness for top RGB LEDs.
:param int value: Brightness. Default = 1, range = 1...8
"""
sys_leds
.
dim_top
(
value
)
def
dim_bottom
(
value
):
"""
Set global brightness for bottom RGB LEDs.
:param int value: Brightness. Default = 8, range = 1...8
"""
sys_leds
.
dim_bottom
(
value
)
def
prep
(
led
,
color
):
"""
Prepare am RGB LED to be set to an RGB value.
...
...
@@ -183,7 +183,7 @@ def gay(value=0.5):
sys_leds
.
set_all_hsv
(
values
)
def
powersave
(
eco
=
True
):
def
set_
powersave
(
eco
=
True
):
"""
Enable or disable powersave mode.
...
...
@@ -197,7 +197,7 @@ def powersave(eco=True):
sys_leds
.
set_powersave
(
eco
)
def
gamma
(
power
=
4.0
):
def
set_
gamma
(
power
=
4.0
):
"""
Applies same power function gamma correction to all RGB channels.
...
...
@@ -209,7 +209,7 @@ def gamma(power=4.0):
sys_leds
.
update
()
def
gamma_rgb
(
channel
,
power
=
4.0
,
gain
=
1.0
):
def
set_
gamma_rgb
(
channel
,
power
=
4.0
,
gain
=
1.0
):
"""
Applies power function gamma correction with optional amplification to a single RGB channel.
...
...
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