Skip to content

Commit bd26b0d

Browse files
argilomarcusmueller
authored andcommitted
Convert tabs to spaces and fix syntax errors.
1 parent 86c99ce commit bd26b0d

File tree

5 files changed

+57
-57
lines changed

5 files changed

+57
-57
lines changed

gnuradio-runtime/examples/mp-sched/affinity_set.py

+25-25
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,30 @@ def __init__(self):
2121
gr.top_block.__init__(self, "Affinity Set Test")
2222

2323
##################################################
24-
# Variables
25-
##################################################
26-
self.samp_rate = samp_rate = 32000
24+
# Variables
25+
##################################################
26+
self.samp_rate = samp_rate = 32000
2727

28-
##################################################
29-
# Blocks
30-
##################################################
28+
##################################################
29+
# Blocks
30+
##################################################
3131
vec_len = 1
32-
self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*vec_len, samp_rate)
33-
self.blocks_null_source_0 = blocks.null_source(gr.sizeof_gr_complex*vec_len)
34-
self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_gr_complex*vec_len)
35-
self.filter_filt_0 = filter.fir_filter_ccc(1, 40000*[0.2+0.3j,])
36-
self.filter_filt_1 = filter.fir_filter_ccc(1, 40000*[0.2+0.3j,])
32+
self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*vec_len, samp_rate)
33+
self.blocks_null_source_0 = blocks.null_source(gr.sizeof_gr_complex*vec_len)
34+
self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_gr_complex*vec_len)
35+
self.filter_filt_0 = filter.fir_filter_ccc(1, 40000*[0.2+0.3j,])
36+
self.filter_filt_1 = filter.fir_filter_ccc(1, 40000*[0.2+0.3j,])
3737

38-
self.filter_filt_0.set_processor_affinity([0,])
39-
self.filter_filt_1.set_processor_affinity([0,1])
38+
self.filter_filt_0.set_processor_affinity([0,])
39+
self.filter_filt_1.set_processor_affinity([0,1])
4040

41-
##################################################
42-
# Connections
43-
##################################################
44-
self.connect((self.blocks_null_source_0, 0), (self.blocks_throttle_0, 0))
45-
self.connect((self.blocks_throttle_0, 0), (self.filter_filt_0, 0))
46-
self.connect((self.filter_filt_0, 0), (self.filter_filt_1, 0))
47-
self.connect((self.filter_filt_1, 0), (self.blocks_null_sink_0, 0))
41+
##################################################
42+
# Connections
43+
##################################################
44+
self.connect((self.blocks_null_source_0, 0), (self.blocks_throttle_0, 0))
45+
self.connect((self.blocks_throttle_0, 0), (self.filter_filt_0, 0))
46+
self.connect((self.filter_filt_0, 0), (self.filter_filt_1, 0))
47+
self.connect((self.filter_filt_1, 0), (self.blocks_null_sink_0, 0))
4848

4949
def get_samp_rate(self):
5050
return self.samp_rate
@@ -60,15 +60,15 @@ def set_samp_rate(self, samp_rate):
6060

6161
while(1):
6262
ret = input('Enter a new Core # or Press Enter to quit: ')
63-
if(len(ret) == 0):
63+
if(len(ret) == 0):
6464
tb.stop()
65-
sys.exit(0)
65+
sys.exit(0)
6666
elif(ret.lower() == "none"):
6767
tb.filter_filt_0.unset_processor_affinity()
68-
else:
68+
else:
6969
try:
7070
n = int(ret)
71-
except ValueError:
71+
except ValueError:
7272
print("Invalid number")
73-
else:
73+
else:
7474
tb.filter_filt_0.set_processor_affinity([n,])

gr-audio/examples/python/spectrum_inversion.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ def __init__(self):
5050
src = audio.source (sample_rate, args.audio_input)
5151
dst = audio.sink (sample_rate, args.audio_output)
5252

53-
vec1 = [1, -1]
54-
vsource = blocks.vector_source_f(vec1, True)
55-
multiply = blocks.multiply_ff()
53+
vec1 = [1, -1]
54+
vsource = blocks.vector_source_f(vec1, True)
55+
multiply = blocks.multiply_ff()
5656

57-
self.connect(src, (multiply, 0))
58-
self.connect(vsource, (multiply, 1))
59-
self.connect(multiply, dst)
57+
self.connect(src, (multiply, 0))
58+
self.connect(vsource, (multiply, 1))
59+
self.connect(multiply, dst)
6060

6161

6262
if __name__ == '__main__':

gr-digital/examples/narrowband/digital_bert_rx.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ def get_options(demods):
200200

201201

202202
if __name__ == "__main__":
203-
print ("Warning: this example in its current shape is deprecated and
203+
print ("""Warning: this example in its current shape is deprecated and
204204
will be removed or fundamentally reworked in a coming GNU Radio
205-
release.")
205+
release.""")
206206
demods = digital.modulation_utils.type_1_demods()
207207

208208
(options, args) = get_options(demods)

gr-digital/examples/narrowband/digital_bert_tx.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def __init__(self, constellation, samples_per_symbol,
4343
gr.hier_block2.__init__(self, "bert_transmit",
4444
gr.io_signature(0, 0, 0), # Output signature
4545
gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Input signature
46-
47-
# Create BERT data bit stream
48-
self._bits = blocks.vector_source_b([1,], True) # Infinite stream of ones
46+
47+
# Create BERT data bit stream
48+
self._bits = blocks.vector_source_b([1,], True) # Infinite stream of ones
4949
self._scrambler = digital.scrambler_bb(0x8A, 0x7F, 7) # CCSDS 7-bit scrambler
5050

5151
self._mod = digital.generic_mod(constellation, differential,
@@ -60,15 +60,15 @@ def __init__(self, constellation, samples_per_symbol,
6060

6161
class tx_psk_block(gr.top_block):
6262
def __init__(self, mod, options):
63-
gr.top_block.__init__(self, "tx_mpsk")
63+
gr.top_block.__init__(self, "tx_mpsk")
6464

6565
self._modulator_class = mod
6666

6767
# Get mod_kwargs
6868
mod_kwargs = self._modulator_class.extract_kwargs_from_options(options)
69-
69+
7070
# transmitter
71-
self._modulator = self._modulator_class(**mod_kwargs)
71+
self._modulator = self._modulator_class(**mod_kwargs)
7272

7373
if(options.tx_freq is not None):
7474
symbol_rate = options.bitrate / self._modulator.bits_per_symbol()
@@ -78,13 +78,13 @@ def __init__(self, mod, options):
7878
options.spec,
7979
options.antenna, options.verbose)
8080
options.samples_per_symbol = self._sink._sps
81-
81+
8282
elif(options.to_file is not None):
8383
self._sink = blocks.file_sink(gr.sizeof_gr_complex, options.to_file)
8484
else:
8585
self._sink = blocks.null_sink(gr.sizeof_gr_complex)
86-
87-
86+
87+
8888
self._transmitter = bert_transmit(self._modulator._constellation,
8989
options.samples_per_symbol,
9090
options.differential,
@@ -94,7 +94,7 @@ def __init__(self, mod, options):
9494
log=options.log)
9595

9696
self.amp = blocks.multiply_const_cc(options.amplitude)
97-
self.connect(self._transmitter, self.amp, self._sink)
97+
self.connect(self._transmitter, self.amp, self._sink)
9898

9999

100100
def get_options(mods):
@@ -120,22 +120,22 @@ def get_options(mods):
120120

121121
for mod in list(mods.values()):
122122
mod.add_options(parser)
123-
123+
124124
(options, args) = parser.parse_args()
125125
if len(args) != 0:
126126
parser.print_help()
127127
sys.exit(1)
128-
128+
129129
return (options, args)
130130

131131
if __name__ == "__main__":
132-
print ("Warning: this example in its current shape is deprecated and
132+
print ("""Warning: this example in its current shape is deprecated and
133133
will be removed or fundamentally reworked in a coming GNU Radio
134-
release.")
134+
release.""")
135135
mods = digital.modulation_utils.type_1_mods()
136136

137137
(options, args) = get_options(mods)
138-
138+
139139
mod = mods[options.modulation]
140140
tb = tx_psk_block(mod, options)
141141

gr-digital/examples/ofdm/receive_path.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
from __future__ import unicode_literals
22
#
33
# Copyright 2005,2006,2011 Free Software Foundation, Inc.
4-
#
4+
#
55
# This file is part of GNU Radio
6-
#
6+
#
77
# GNU Radio is free software; you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
99
# the Free Software Foundation; either version 3, or (at your option)
1010
# any later version.
11-
#
11+
#
1212
# GNU Radio is distributed in the hope that it will be useful,
1313
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
# GNU General Public License for more details.
16-
#
16+
#
1717
# You should have received a copy of the GNU General Public License
1818
# along with GNU Radio; see the file COPYING. If not, write to
1919
# the Free Software Foundation, Inc., 51 Franklin Street,
2020
# Boston, MA 02110-1301, USA.
21-
#
21+
#
2222

2323
from gnuradio import gr
2424
from gnuradio import eng_notation
@@ -35,9 +35,9 @@
3535
class receive_path(gr.hier_block2):
3636
def __init__(self, rx_callback, options):
3737

38-
gr.hier_block2.__init__(self, "receive_path",
39-
gr.io_signature(1, 1, gr.sizeof_gr_complex),
40-
gr.io_signature(0, 0, 0))
38+
gr.hier_block2.__init__(self, "receive_path",
39+
gr.io_signature(1, 1, gr.sizeof_gr_complex),
40+
gr.io_signature(0, 0, 0))
4141

4242

4343
options = copy.copy(options) # make a copy so we can destructively modify
@@ -61,7 +61,7 @@ def __init__(self, rx_callback, options):
6161
# Display some information about the setup
6262
if self._verbose:
6363
self._print_verbage()
64-
64+
6565
def carrier_sensed(self):
6666
"""
6767
Return True if we think carrier is present.

0 commit comments

Comments
 (0)