initial app helpers completed - moving to make the default apps next.

This commit is contained in:
Lucas Oskorep
2022-08-31 20:11:29 -04:00
parent 0136c1a1a4
commit 93e3e1eadc
27 changed files with 732 additions and 180 deletions
+3
View File
@@ -0,0 +1,3 @@
from .light_patterns import *
from .sound_patterns import *
from .helper_funcs import *
+10
View File
@@ -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
+20
View File
@@ -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),
]