avoid unnecessary gen_freq_bits override

ironpython
András Veres-Szentkirályi 2013-06-19 16:17:42 +02:00
rodzic b51fae57e5
commit 8e1f888fec
2 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -6,9 +6,7 @@ from sstv import SSTV, byte_to_freq
class GrayscaleSSTV(SSTV):
def gen_freq_bits(self):
for item in SSTV.gen_freq_bits(self):
yield item
def gen_image_tuples(self):
for line in xrange(self.HEIGHT):
for item in self.horizontal_sync():
yield item

Wyświetl plik

@ -97,6 +97,11 @@ class SSTV(object):
parity_freq = FREQ_VIS_BIT1 if num_ones % 2 == 1 else FREQ_VIS_BIT0
yield parity_freq, MSEC_VIS_BIT
yield FREQ_SYNC, MSEC_VIS_BIT # stop bit
for freq_tuple in self.gen_image_tuples():
yield freq_tuple
def gen_image_tuples(self):
return []
def horizontal_sync(self):
yield FREQ_SYNC, self.SYNC