Skip to content

Commit e180149

Browse files
committed
Added additional filtering
1 parent 40ea9ce commit e180149

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

ft8_tx.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ def __init__(self):
7171
self._rf_gain_config = ConfigParser.ConfigParser()
7272
self._rf_gain_config.read(file_name)
7373
try: rf_gain = self._rf_gain_config.getfloat('tx', 'tx_rf_gain')
74-
except: rf_gain = 10
74+
except: rf_gain = 60
75+
print("RF Gain: " + str(rf_gain))
7576
self.rf_gain = rf_gain
7677
self._offset_config = ConfigParser.ConfigParser()
7778
self._offset_config.read(file_name)
@@ -131,6 +132,8 @@ def __init__(self):
131132
self.osmosdr_sink_0.set_bandwidth(0, 0)
132133

133134
self.blocks_wavfile_source_0 = blocks.wavfile_source(wav_file, False)
135+
self.band_pass_filter_af = filter.fir_filter_fff(1, firdes.band_pass(
136+
1, wav_samp_rate, 300, 2700, 150, firdes.WIN_HAMMING, 6.76))
134137
self.blocks_multiply_xx_0_0 = blocks.multiply_vcc(1)
135138
self.blocks_multiply_xx_0 = blocks.multiply_vcc(1)
136139
self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((audio_gain, ))
@@ -154,7 +157,8 @@ def __init__(self):
154157
self.connect((self.blocks_multiply_const_vxx_0, 0), (self.rational_resampler_xxx_0, 0))
155158
self.connect((self.blocks_multiply_xx_0, 0), (self.band_pass_filter_0, 0))
156159
self.connect((self.blocks_multiply_xx_0_0, 0), (self.rational_resampler_xxx_0_0, 0))
157-
self.connect((self.blocks_wavfile_source_0, 0), (self.blocks_multiply_const_vxx_0, 0))
160+
self.connect((self.blocks_wavfile_source_0, 0), (self.band_pass_filter_af, 0))
161+
self.connect((self.band_pass_filter_af, 0), (self.blocks_multiply_const_vxx_0, 0))
158162
self.connect((self.rational_resampler_xxx_0, 0), (self.blocks_float_to_complex_0, 1))
159163
self.connect((self.rational_resampler_xxx_0_0, 0), (self.osmosdr_sink_0, 0))
160164

@@ -372,10 +376,10 @@ def check_time(cycle):
372376
else:
373377
if now < 30:
374378
print("Waiting for 30 second mark")
375-
time.sleep(30-now)
379+
time.sleep((30-0.4)-now)
376380
else:
377381
print("Waiting for the top of the minute...")
378-
time.sleep(60 - now)
382+
time.sleep((60-0.4) - now)
379383

380384
def main(top_block_cls=usb_tx_bpf, options=None):
381385

0 commit comments

Comments
 (0)