Ejemplo n.º 1
0
Archivo: looper.py Proyecto: noexc/habp
 def run(self):
     global g, pid
     time.sleep(15)
     try:
         while True:
             sstv_debug_log('Encoder', 'Encoder reporting for duty')
             convert(
                 '/tmp/latest.jpg',
                 '-resize', '320x240!',
                 '-pointsize', '35',
                 '-fill', 'black',
                 '-annotate', '+0+37',
                 'W8UPD',
                 '-fill', 'white',
                 '-annotate', '+0+40',
                 'W8UPD',
                 '-fill', 'black',
                 '-annotate', '+30+230',
                 '%f, %f' % (g.fix.latitude, g.fix.longitude),
                 '-fill', 'white',
                 '-annotate', '+33+233',
                 '%f, %f' % (g.fix.latitude, g.fix.longitude),
                 '/tmp/latest.ppm')
             robot36_encode('/tmp/latest.ppm', '/tmp/inprogress.wav')
             mv('/tmp/inprogress.wav', '/tmp/latest.wav')
     except Exception as e:
         sstv_debug_log('Encoder', str(e), True)
         os._exit(1)
Ejemplo n.º 2
0
 def run(self):
     global g, pid
     time.sleep(15)
     try:
         while True:
             sstv_debug_log('Encoder', 'Encoder reporting for duty')
             convert('/tmp/latest.jpg', '-resize', '320x240!', '-pointsize',
                     '35', '-fill', 'black', '-annotate', '+0+37', 'W8UPD',
                     '-fill', 'white', '-annotate', '+0+40', 'W8UPD',
                     '-fill', 'black', '-annotate', '+30+230',
                     '%f, %f' % (g.fix.latitude, g.fix.longitude), '-fill',
                     'white', '-annotate', '+33+233',
                     '%f, %f' % (g.fix.latitude, g.fix.longitude),
                     '/tmp/latest.ppm')
             robot36_encode('/tmp/latest.ppm', '/tmp/inprogress.wav')
             mv('/tmp/inprogress.wav', '/tmp/latest.wav')
     except Exception as e:
         sstv_debug_log('Encoder', str(e), True)
         os._exit(1)
Ejemplo n.º 3
0
def make_sstv():
    '''Convert latest.ppm to an SSTV wav file.'''
    robot36_encode("latest.ppm", "latest.wav", _cwd=cwd)