Skip to content
Browse files

host_python/equalizer.py: Switch HUE default, add -H commandline option

  • Loading branch information...
1 parent 17f589d commit 30dcfd54cdb608fd5072355fededbdfff0cceb65 @pasky pasky committed Dec 22, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 host_python/equalizer.py
View
10 host_python/equalizer.py
@@ -27,7 +27,7 @@
ATTENUATION = 10**(40/10) # attenuation of 40dB
-HUE = 1 # 1 - reddish, 0 - blueish
+HUE = 0 # 1 - reddish, 0 - blueish
logging.basicConfig(level='WARNING')
@@ -40,11 +40,12 @@ def print_usage():
-n number number of controlled boxes
-s symmetric mode
-a number attenuation in dB (try -a40.0)
+ -H number hue mode: 0 == blue-green (default), 1 == red-blue
-h --help show this help
''' % sys.argv[0]
try:
- opts, args = getopt.getopt(sys.argv[1:], 'n:lsha:', ['help'])
+ opts, args = getopt.getopt(sys.argv[1:], 'n:lsha:H:', ['help'])
except getopt.GetoptError:
print_usage()
sys.exit(1)
@@ -70,6 +71,11 @@ def print_usage():
print 'error: attenuation must be float value'
print_usage()
ATTENUATION = 10**(v/10)
+ elif k == '-H':
+ if not v.isdigit():
+ print_usage()
+ sys.exit(1)
+ HUE = int(v)
if LAZY == 1:
HISTORY_SIZE = 12

0 comments on commit 30dcfd5

Please sign in to comment.
Something went wrong with that request. Please try again.