better Panic ?
authorrealraum <realraum@realraum.at>
Wed, 28 Jul 2010 01:21:33 +0000 (01:21 +0000)
committerrealraum <realraum@realraum.at>
Wed, 28 Jul 2010 01:21:33 +0000 (01:21 +0000)
switch-power.py

index 9880976..7d108fd 100755 (executable)
@@ -211,7 +211,9 @@ def eventPanic():
   logging.info("eventPanic(): switching around: "+uwscfg.slug_ids_panic)
   lst1 = uwscfg.slug_ids_panic.split(" ")
   lst2 = map(lambda e:[e,True], lst1)
-  for delay in map(lambda e: (40-e)/133.0,range(0,20)):
+  for id in lst1:
+    switchPower(id,True)
+  for delay in map(lambda e: (40-e)/33.0,range(0,20)):
     e = random.choice(lst2)
     e[1]=not e[1]
     switchPower(e[0],e[1])