diff options
author | Ashwini | 2015-03-10 17:23:13 +0530 |
---|---|---|
committer | Ashwini | 2015-03-10 17:23:13 +0530 |
commit | 92326794e39e1753f5fcb20715c57ea0f537752e (patch) | |
tree | e40825f34f4a6402d9acf2fdcf5600dd65ad6f56 /gr-input/python/gr_ramp_source.py | |
parent | af6398eb6e3273c005312939fb6d965f8a50baed (diff) | |
download | gnuradio-92326794e39e1753f5fcb20715c57ea0f537752e.tar.gz gnuradio-92326794e39e1753f5fcb20715c57ea0f537752e.tar.bz2 gnuradio-92326794e39e1753f5fcb20715c57ea0f537752e.zip |
Deleted
Diffstat (limited to 'gr-input/python/gr_ramp_source.py')
-rw-r--r-- | gr-input/python/gr_ramp_source.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/gr-input/python/gr_ramp_source.py b/gr-input/python/gr_ramp_source.py deleted file mode 100644 index 574f9f70b..000000000 --- a/gr-input/python/gr_ramp_source.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/python - -import gras -import numpy -# Serial is imported in __init__ -class ramp(gras.Block): - - - def __init__(self): - gras.Block.__init__(self, - name="ser", - in_sig=[numpy.float32], - out_sig=[numpy.float32]) - self.i = 0 - self.flag=True - - def set_parameters(self, ramp_slope, height_Offset, width_Offset): - self.slope = ramp_slope - self.width = width_Offset - self.offset = height_Offset - - def work(self, input_items, output_items): - - out = output_items[0][0:1] - input_stream = input_items[0][0] - - if self.flag: - for j in range(self.width): - out = self.offset - print "OUT", out - - self.produce(0,1) # Produce from port 0 output_items - self.consume(0,1) # Consume from port 0 input_items - - self.flag = False - - else: - - self.i = self.i + 1 - out[:1] =self.offset + self.i*input_stream*self.slope - - print "OUT", out - - self.produce(0,1) # Produce from port 0 output_items - self.consume(0,1) # Consume from port 0 input_items - |