コード例 #1
0
ファイル: zmqspi.py プロジェクト: HelsinkiHacklab/ledmatrix
 def loop(self, img, count=False):
     c = imageconverter(img)
     while True:
         self.send_frame(c)
         if c.im.info.has_key('duration'):
             time.sleep(float(c.im.info['duration'])/1000)
         while c.seek():
             self.send_frame(c)
             time.sleep(float(c.im.info['duration'])/1000)
         c.seek(0)
コード例 #2
0
 def loop(self, img, count=False):
     c = imageconverter(img)
     while True:
         self.send_frame(c)
         if c.im.info.has_key('duration'):
             time.sleep(float(c.im.info['duration']) / 1000)
         while c.seek():
             self.send_frame(c)
             time.sleep(float(c.im.info['duration']) / 1000)
         c.seek(0)
コード例 #3
0
 def send(self, img):
     c = imageconverter(img)
     self.send_frame(c)
     # IF there are animation frames, send rest of them too
     #c.rgbim.show()
     # TODO: account for the time spent transferring the frame
     if c.im.info.has_key('duration'):
         time.sleep(float(c.im.info['duration']) / 1000)
     while c.seek():
         self.send_frame(c)
         #c.rgbim.show()
         time.sleep(float(c.im.info['duration']) / 1000)
コード例 #4
0
 def send(self, img):
     c = imageconverter(img)
     self.send_frame(c)
     # IF there are animation frames, send rest of them too
     #c.rgbim.show()
     # TODO: account for the time spent transferring the frame
     if c.im.info.has_key('duration'):
         time.sleep(float(c.im.info['duration'])/1000)
     while c.seek():
         self.send_frame(c)
         #c.rgbim.show()
         time.sleep(float(c.im.info['duration'])/1000)