Permalink
Browse files

- make the intro much more awesome ;)

  • Loading branch information...
1 parent 3903651 commit 4af5be258afffb1f23751731811d5775bb56321f @Memphiz Memphiz committed Nov 22, 2011
Showing with 23 additions and 6 deletions.
  1. +8 −5 default.py
  2. +15 −1 resources/lib/settings.py
View
13 default.py
@@ -90,16 +90,20 @@ def printLights():
print "boblight: " + lightname
def showRgbBobInit():
+ settings_loadForBobInit()
bob_set_priority(128) #allow lights to be turned on
rgb = (c_int * 3)(255,0,0)
bob_set_static_color(byref(rgb))
- time.sleep(1)
+ time.sleep(0.3)
rgb = (c_int * 3)(0,255,0)
bob_set_static_color(byref(rgb))
- time.sleep(1)
+ time.sleep(0.3)
rgb = (c_int * 3)(0,0,255)
bob_set_static_color(byref(rgb))
- time.sleep(1)
+ time.sleep(0.3)
+ rgb = (c_int * 3)(0,0,0)
+ bob_set_static_color(byref(rgb))
+ time.sleep(3)
bob_set_priority(255) #turn the lights off
def reconnectBoblight():
@@ -148,9 +152,8 @@ def reconnectBoblight():
if reconnectBoblight():
printLights()
print "boblight: setting up with user settings"
-#fixme with category - movie hardcoded for now
- settings_setup()
showRgbBobInit()
+ settings_setup()
process_boblight()
time.sleep(1)
View
16 resources/lib/settings.py
@@ -72,7 +72,7 @@ def settings_initGlobals():
g_hostport = int(__settings__.getSetting("hostport"))
g_timer = time.time()
g_category = "movie"
- g_bobdisable = __settings__.getSetting("bobdisable") == "true"
+ g_bobdisable = -1
if not g_networkaccess:
g_hostip = None
@@ -90,6 +90,20 @@ def settings_getBobDisable():
global g_bobdisable
return g_bobdisable
+def settings_loadForBobInit():
+ saturation = 4.0
+ value = 1.0
+ speed = 35.0
+ autospeed = 0.0
+ interpolation = 1
+ threshold = 0.0
+ bob_setoption("saturation " + str(saturation))
+ bob_setoption("value " + str(value))
+ bob_setoption("speed " + str(speed))
+ bob_setoption("autospeed " + str(autospeed))
+ bob_setoption("interpolation " + str(interpolation))
+ bob_setoption("threshold " + str(threshold))
+
def settings_getSettingCategory():
ret = "other"

0 comments on commit 4af5be2

Please sign in to comment.