initial app helpers completed - moving to make the default apps next.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from .light_patterns import *
|
||||
from .sound_patterns import *
|
||||
from .helper_funcs import *
|
||||
@@ -0,0 +1,10 @@
|
||||
def clamp(num, min_value, max_value):
|
||||
return max(min(num, max_value), min_value)
|
||||
|
||||
|
||||
|
||||
def rgb_from_int(rgb):
|
||||
blue = rgb & 255
|
||||
green = (rgb >> 8) & 255
|
||||
red = (rgb >> 16) & 255
|
||||
return red, green, blue
|
||||
@@ -0,0 +1,20 @@
|
||||
arrows_with_enter = [
|
||||
(0, 0, 0), (0, 0, 0), (0, 0, 0),
|
||||
(0, 0, 0), (0, 0, 100), (0, 0, 0),
|
||||
(0, 0, 100), (100, 0, 0), (0, 0, 100),
|
||||
(0, 0, 0), (0, 0, 100), (0, 0, 0)
|
||||
]
|
||||
|
||||
up_down_enter = [
|
||||
(0, 0, 0), (0, 0, 0), (0, 0, 0),
|
||||
(0, 0, 0), (0, 0, 100), (0, 0, 0),
|
||||
(0, 0, 0), (100, 0, 0), (0, 0, 0),
|
||||
(0, 0, 0), (0, 0, 100), (0, 0, 0)
|
||||
]
|
||||
|
||||
arrows_yes_no = [
|
||||
(0, 0, 0), (0, 0, 100), (0, 0, 0),
|
||||
(100, 0, 0), (0, 0, 100), (0, 100, 0),
|
||||
(0, 0, 0), (0, 0, 0), (0, 0, 0),
|
||||
(0, 0, 0), (0, 0, 0), (0, 0, 0),
|
||||
]
|
||||
Reference in New Issue
Block a user