Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Arist
firmware
Commits
d3106d0e
Verified
Commit
d3106d0e
authored
Aug 12, 2019
by
Rahix
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(leds): Rename functions for consistency
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
6f1981a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
pycardium/modules/py/leds.py
pycardium/modules/py/leds.py
+23
-23
No files found.
pycardium/modules/py/leds.py
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment