Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
test-project-please-ignore
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Progetti
test-project-please-ignore
Commits
27a96e78
Commit
27a96e78
authored
Oct 21, 2018
by
Federico Meloda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor bugfix in lightly
parent
2490ee62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lighting.py
lighting.py
+4
-4
No files found.
lighting.py
View file @
27a96e78
...
...
@@ -21,7 +21,7 @@ class Color:
class
ColorManager
(
Thread
):
current_rand
=
1
unscaled_blue
=
0
unscaled_blue
=
10
0
current_color
=
Color
(
0
,
0
,
0
)
activeFlag
=
True
spi
=
spidev
.
SpiDev
()
...
...
@@ -41,8 +41,8 @@ class ColorManager(Thread):
self
.
current_color
.
green
+=
rand
self
.
current_color
.
red
=
255
self
.
current_color
.
blue
=
self
.
unscaled_blue
*
self
.
current_color
.
green
//
255
if
self
.
unscaled_blue
>
0
:
self
.
unscaled_blue
--
if
self
.
unscaled_blue
<
10
0
:
self
.
unscaled_blue
++
def
fade
(
self
):
if
self
.
current_color
.
red
>
0
:
...
...
@@ -54,7 +54,7 @@ class ColorManager(Thread):
self
.
activeFlag
=
False
def
burn
(
self
):
self
.
unscaled_blue
=
255
self
.
unscaled_blue
=
0
def
run
(
self
):
while
self
.
is_alive
():
...
...
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