Skip to content
Browse files

compiled images seem to be good enough, actually.

  • Loading branch information...
1 parent 8af9fd7 commit 747f7d343a9782f2cd0b508291268ab6839b8a19 @phooky phooky committed Jun 25, 2013
Showing with 5 additions and 6 deletions.
  1. +0 −1 hexaservice/led_panel.py
  2. +5 −5 hexaservice/service.py
View
1 hexaservice/led_panel.py
@@ -21,7 +21,6 @@ def compile_image(img, x=0, y=0):
if img.getpixel(( i+x, j+y )):
b |= 1 << (7-j)
bitmap = bitmap + struct.pack("B",b)
- print width, height, len(bitmap)
return bitmap
class Panel:
View
10 hexaservice/service.py
@@ -26,12 +26,12 @@ def sigint_handler(signal,frame):
signal.signal(signal.SIGINT,sigint_handler)
while True:
msg = time.strftime("%H:%M:%S")
+ txtimg = base_font.strImg(msg)
+ img = Image.new("1",(120,7))
+ img.paste(txtimg,(15,0))
+ img.paste(txtimg,(75,0))
+ bitmap = compile_image(img,0,0)
for j in range(3):
- txtimg = base_font.strImg(msg)
- img = Image.new("1",(120,7))
- img.paste(txtimg,(15,0))
- img.paste(txtimg,(75,0))
- bitmap = compile_image(img,0,0)
panels[j].setCompiledImage(bitmap)
time.sleep(0.1)

0 comments on commit 747f7d3

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