Skip to content

Commit

Permalink
Fail reduced
Browse files Browse the repository at this point in the history
  • Loading branch information
bluehat authored and bluehat committed Jun 27, 2010
1 parent 9dc8c46 commit 208e4fb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions writeSign.py
Expand Up @@ -10,14 +10,14 @@
"scroll_always" : "<FH>",
}

def tosign(id, topStyle, u, bottomStyle, s):
def tosign(id, top_style, top_note, bottom_style, bottom_note):
signfile.write("\x0D\x0A\x0A")
signfile.write(" <ID"+str(id)+"><PZ>")
signfile.write(styles.get(topStyle))
signfile.write(styles.get(top_style))
signfile.write("<L1>")
signfile.write(u)
signfile.write("<L2>"+s)
signfile.write(styles.get(bottomStyle))
signfile.write(top_note)
signfile.write("<L2>"+bottom_note)
signfile.write(styles.get(bottom_style))
signfile.write("\x0D\x0A")
signfile.write(" ")
signfile.write("<ID"+str(id)+"><RPZ>")
Expand All @@ -28,7 +28,7 @@ def tosign(id, topStyle, u, bottomStyle, s):
time.sleep(1)
signfile.write("\x0C")

def formSign(sign, tweet):
def formTweet(sign, tweet):
tosign(sign, "center", '@'+tweet['user']['screen_name'].upper(), "scroll_always", tweet['text'])

signfile = serial.Serial('/dev/ttyUSB0',baudrate=9600)
Expand All @@ -44,9 +44,9 @@ def formSign(sign, tweet):
print tweet['user']['screen_name']+": "+tweet['text']
print "\n"
if "oil" in tweet['text']:
formSign(30, tweet)
formTweet(30, tweet)
if p:
formSign(40, p)
formTweet(40, p)
if pp:
formSign(73, pp)
if p:
Expand Down

0 comments on commit 208e4fb

Please sign in to comment.