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)
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)
def make_sstv(): '''Convert latest.ppm to an SSTV wav file.''' robot36_encode("latest.ppm", "latest.wav", _cwd=cwd)