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
External 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
fleur
firmware
Commits
1424c9fd
Commit
1424c9fd
authored
5 years ago
by
fleur
Browse files
Options
Downloads
Patches
Plain Diff
fixed formatting
parent
6ca3deb1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pycardium/modules/py/pride.py
+18
-9
18 additions, 9 deletions
pycardium/modules/py/pride.py
with
18 additions
and
9 deletions
pycardium/modules/py/pride.py
+
18
−
9
View file @
1424c9fd
...
...
@@ -15,7 +15,8 @@ flags["trans"] = [
[
85
,
205
,
252
],
]
flags
[
"
bi
"
]
=
[[
214
,
2
,
112
],
[
155
,
79
,
150
],
[
0
,
56
,
168
]]
flags
[
"
ace
"
]
=
[[
1
,
1
,
1
],
[
164
,
164
,
164
],
[
255
,
255
,
255
],
[
150
,
0
,
150
]]
flags
[
"
ace
"
]
=
[[
1
,
1
,
1
],
[
164
,
164
,
164
],
[
255
,
255
,
255
],
[
150
,
0
,
150
]]
flags
[
"
greyace
"
]
=
[
[
150
,
0
,
150
],
[
164
,
164
,
164
],
...
...
@@ -39,7 +40,8 @@ flags["greyaro"] = [
]
flags
[
"
pan
"
]
=
[[
255
,
27
,
141
],
[
255
,
218
,
0
],
[
27
,
179
,
255
]]
flags
[
"
inter
"
]
=
[[
255
,
218
,
0
],
[
122
,
0
,
172
]]
flags
[
"
genderqueer
"
]
=
[[
201
,
138
,
255
],
[
255
,
255
,
255
],
[
80
,
150
,
85
]]
flags
[
"
genderqueer
"
]
=
[[
201
,
138
,
255
],
[
255
,
255
,
255
],
[
80
,
150
,
85
]]
flags
[
"
lesbian
"
]
=
[
[
139
,
60
,
105
],
[
171
,
99
,
143
],
...
...
@@ -49,7 +51,8 @@ flags["lesbian"] = [
[
214
,
113
,
113
],
[
134
,
70
,
70
],
]
flags
[
"
nonbinary
"
]
=
[[
255
,
244
,
51
],
[
255
,
255
,
255
],
[
155
,
89
,
208
],
[
0
,
0
,
0
]]
flags
[
"
nonbinary
"
]
=
[[
255
,
244
,
51
],
[
255
,
255
,
255
],
[
155
,
89
,
208
],
[
0
,
0
,
0
]]
flags
[
"
genderfluid
"
]
=
[
[
254
,
117
,
161
],
[
255
,
255
,
255
],
...
...
@@ -104,11 +107,14 @@ def show_leds(flag="rainbow", brightness=0.5, gamma=1, cutoff=12, halo=True):
"""
Shows pride flag on the top leds.
:param str flag: Chooses flag. A list of all available flags is accessible via print_all(). Default =
'
rainbow
'
:param str flag: Chooses flag. A list of all available flags is accessible
via print_all(). Default =
'
rainbow
'
:param float brightness: Set brightness of LEDs. Default = 0.5
:param float gamma: Apply simple gamma correction to adjust colors. Default = 1
:param float gamma: Apply simple gamma correction to adjust colors.
Default = 1
:param int cutoff: See expand(). Default = 12
:param bool halo: Bottom LEDs copy outermost top LEDs if true. Default = True
:param bool halo: Bottom LEDs copy outermost top LEDs if true.
Default = True
"""
colors
=
ledfx
.
col_cor
(
flags
[
flag
],
brightness
,
gamma
)
output
=
expand
(
colors
,
cutoff
)[::
-
1
][
0
:
11
]
...
...
@@ -122,9 +128,11 @@ def show_display(flag="rainbow", brightness=1, gamma=1):
"""
Shows pride flag on the display.
:param str flag: Chooses flag. A list of all available flags is accessible via print_all(). Default =
'
rainbow
'
:param str flag: Chooses flag. A list of all available flags is accessible
via print_all(). Default =
'
rainbow
'
:param float brightness: Set brightness of LEDs. Default = 0.5
:param float gamma: Apply simple gamma correction to adjust colors. Default = 1
:param float gamma: Apply simple gamma correction to adjust colors.
Default = 1
"""
colors
=
ledfx
.
col_cor
(
flags
[
flag
],
brightness
,
gamma
)
colors
=
expand
(
colors
,
160
)
...
...
@@ -140,7 +148,8 @@ def get(flag="rainbow"):
"""
Returns color list of flag.
:param str flag: Chooses flag. A list of all available flags is accessible via print_all(). Default =
'
rainbow
'
:param str flag: Chooses flag. A list of all available flags is accessible
via print_all(). Default =
'
rainbow
'
"""
return
flags
[
flag
]
...
...
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