Subversion Repositories svnkaklik

Compare Revisions

No changes between revisions

Ignore whitespace Rev 514 → Rev 515

/programy/C/avr/tests/ATmega128/blik.c
10,7 → 10,7
*********************************************/
#include <avr/io.h>
#include <inttypes.h>
#define F_CPU 11059200UL // 8 MHz
#define F_CPU 1000000UL // 8 MHz
#include <util/delay.h>
 
/programy/C/avr/tests/ATmega128/blik.hex
7,12 → 7,12
:100060000C9465000C9465000C9465000C9465007C
:100070000C9465000C9465000C9465000C9465006C
:100080000C9465000C9465000C94650011241FBE4F
:10009000CFEFD0E1DEBFCDBF11E0A0E0B1E0E8E0FE
:10009000CFEFD0E1DEBFCDBF11E0A0E0B1E0EEE0F8
:1000A000F1E000E00BBF02C007900D92A030B10755
:1000B000D9F711E0A0E0B1E001C01D92A030B10776
:1000C000E1F70E9473000C9483000C9400009C01E3
:1000D00006C08EE59AE00197F1F7215030402115D6
:1000E0003105B9F70895CFEFD0E1DEBFCDBFA59AB6
:1000F000AD9A88EE93E00E946700AD9888EE93E099
:080100000E946700F5CFFFCF5C
:1000C000E1F70E9471000C9485000C94000020EF71
:1000D00030E004C0F9013197F1F701970097D1F7AB
:1000E0000895A59A20EF30E0AD9A88EE93E0F901EB
:1000F0003197F1F70197D9F7AD9888EE93E0F901C0
:0E0100003197F1F70197D9F7EFCFF894FFCFC1
:00000001FF
/programy/C/avr/tests/ATmega128/blik.map
1,8 → 1,8
Archive member included because of file (symbol)
 
/usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
/usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o (exit)
/usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
/usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_exit.o)
/usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o (exit)
/usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_clear_bss.o)
blik.o (__do_clear_bss)
 
Memory Configuration
19,11 → 19,11
Linker script and memory map
 
Address of section .data set to 0x800100
LOAD /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
LOAD /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
LOAD blik.o
LOAD /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a
LOAD /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/libc.a
LOAD /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a
LOAD /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a
LOAD /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/libc.a
LOAD /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a
 
.hash
*(.hash)
115,9 → 115,9
.rela.plt
*(.rela.plt)
 
.text 0x00000000 0x108
.text 0x00000000 0x10e
*(.vectors)
.vectors 0x00000000 0x8c /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.vectors 0x00000000 0x8c /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
0x00000000 __vectors
0x00000000 __vector_default
*(.vectors)
142,20 → 142,20
SORT(*)(.ctors)
SORT(*)(.dtors)
*(.init0)
.init0 0x0000008c 0x0 /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.init0 0x0000008c 0x0 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
0x0000008c __init
*(.init0)
*(.init1)
*(.init1)
*(.init2)
.init2 0x0000008c 0xc /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.init2 0x0000008c 0xc /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
*(.init2)
*(.init3)
*(.init3)
*(.init4)
.init4 0x00000098 0x1a /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.init4 0x00000098 0x1a /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
0x00000098 __do_copy_data
.init4 0x000000b2 0x10 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
.init4 0x000000b2 0x10 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_clear_bss.o)
0x000000b2 __do_clear_bss
*(.init4)
*(.init5)
167,10 → 167,10
*(.init8)
*(.init8)
*(.init9)
.init9 0x000000c2 0x8 /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.init9 0x000000c2 0x8 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
*(.init9)
*(.text)
.text 0x000000ca 0x4 /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.text 0x000000ca 0x4 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
0x000000ca __vector_22
0x000000ca __vector_28
0x000000ca __vector_1
206,20 → 206,20
0x000000ca __vector_16
0x000000ca __vector_18
0x000000ca __vector_20
.text 0x000000ce 0x38 blik.o
0x000000e6 main
.text 0x000000ce 0x3c blik.o
0x000000e2 main
0x000000ce cekej
.text 0x00000106 0x0 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
.text 0x00000106 0x0 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
0x00000106 . = ALIGN (0x2)
.text 0x0000010a 0x0 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_exit.o)
.text 0x0000010a 0x0 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_clear_bss.o)
0x0000010a . = ALIGN (0x2)
*(.text.*)
.text.libgcc 0x00000106 0x0 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
.text.libgcc 0x00000106 0x0 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
0x00000106 . = ALIGN (0x2)
.text.libgcc 0x0000010a 0x0 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_exit.o)
.text.libgcc 0x0000010a 0x0 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_clear_bss.o)
0x0000010a . = ALIGN (0x2)
*(.fini9)
.fini9 0x00000106 0x0 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
0x00000106 exit
0x00000106 _exit
.fini9 0x0000010a 0x0 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_exit.o)
0x0000010a exit
0x0000010a _exit
*(.fini9)
*(.fini8)
*(.fini8)
238,17 → 238,17
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x00000106 0x2 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
.fini0 0x0000010a 0x4 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_exit.o)
*(.fini0)
0x00000108 _etext = .
0x0000010e _etext = .
 
.data 0x00800100 0x0 load address 0x00000108
.data 0x00800100 0x0 load address 0x0000010e
0x00800100 PROVIDE (__data_start, .)
*(.data)
.data 0x00800100 0x0 /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.data 0x00800100 0x0 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
.data 0x00800100 0x0 blik.o
.data 0x00800100 0x0 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
.data 0x00800100 0x0 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
.data 0x00800100 0x0 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_exit.o)
.data 0x00800100 0x0 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_clear_bss.o)
*(.data*)
*(.rodata)
*(.rodata*)
257,18 → 257,18
0x00800100 _edata = .
0x00800100 PROVIDE (__data_end, .)
 
.bss 0x00800100 0x0 load address 0x00000108
.bss 0x00800100 0x0 load address 0x0000010e
0x00800100 PROVIDE (__bss_start, .)
*(.bss)
.bss 0x00800100 0x0 /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.bss 0x00800100 0x0 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
.bss 0x00800100 0x0 blik.o
.bss 0x00800100 0x0 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
.bss 0x00800100 0x0 /usr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
.bss 0x00800100 0x0 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_exit.o)
.bss 0x00800100 0x0 /usr/lib/gcc/avr/4.3.0/avr51/libgcc.a(_clear_bss.o)
*(.bss*)
*(COMMON)
0x00800100 PROVIDE (__bss_end, .)
0x00000108 __data_load_start = LOADADDR (.data)
0x00000108 __data_load_end = (__data_load_start + SIZEOF (.data))
0x0000010e __data_load_start = LOADADDR (.data)
0x0000010e __data_load_end = (__data_load_start + SIZEOF (.data))
 
.noinit 0x00800100 0x0
0x00800100 PROVIDE (__noinit_start, .)
293,15 → 293,15
.signature
*(.signature*)
 
.stab 0x00000000 0x804
.stab 0x00000000 0xc18
*(.stab)
.stab 0x00000000 0x414 /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.stab 0x00000414 0x3f0 blik.o
0x3fc (size before relaxing)
.stab 0x00000000 0x750 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
.stab 0x00000750 0x4c8 blik.o
0x4d4 (size before relaxing)
 
.stabstr 0x00000000 0x7ef
.stabstr 0x00000000 0x7ea
*(.stabstr)
.stabstr 0x00000000 0x7ef /usr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm128.o
.stabstr 0x00000000 0x7ea /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr51/crtm128.o
 
.stab.excl
*(.stab.excl)
/programy/C/avr/tests/ATmega128/blik.out
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programy/GRC/Sonar/Sonar.py
0,0 → 1,101
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Sonar
# Author: Kaklik
# Description: Sonar waform generator
# Generated: Fri Feb 20 19:31:13 2009
##################################################
 
from gnuradio import audio
from gnuradio import gr
from gnuradio.wxgui import scopesink2
from grc_gnuradio import wxgui as grc_wxgui
import wx
 
class Sonar(grc_wxgui.top_block_gui):
 
def __init__(self):
grc_wxgui.top_block_gui.__init__(
self,
title="GRC - Executing: Sonar",
icon="/usr/local/share/icons/hicolor/32x32/apps/gnuradio-grc.png",
)
 
##################################################
# Variables
##################################################
self.samp_rate = samp_rate = 96000
self.frequency = frequency = 20000
self.ampl = ampl = .4
 
##################################################
# Controls
##################################################
_frequency_control = grc_wxgui.slider_horizontal_control(
window=self.GetWin(),
callback=self.set_frequency,
label='frequency',
value=frequency,
min=5000,
max=30000,
num_steps=1000,
slider_length=500,
)
self.Add(_frequency_control)
_ampl_control = grc_wxgui.slider_horizontal_control(
window=self.GetWin(),
callback=self.set_ampl,
label="Volume",
value=ampl,
min=0,
max=.5,
num_steps=100,
slider_length=200,
)
self.GridAdd(_ampl_control, 0, 0, 1, 2)
 
##################################################
# Blocks
##################################################
self.audio_sink = audio.sink(48000, "hw:1,0", True)
self.audio_source_0 = audio.source(48000, "hw:1,0", True)
self.gr_sig_source_x = gr.sig_source_f(samp_rate, gr.GR_SIN_WAVE, frequency, ampl, 0)
self.wxgui_scopesink2_0 = scopesink2.scope_sink_f(
self.GetWin(),
title="Scope Plot",
sample_rate=samp_rate*2,
frame_decim=15,
v_scale=None,
t_scale=.0001,
num_inputs=2,
)
self.wxgui_scopesink2_0.win.set_format_line()
self.Add(self.wxgui_scopesink2_0.win)
 
##################################################
# Connections
##################################################
self.connect((self.gr_sig_source_x, 0), (self.audio_sink, 0))
self.connect((self.gr_sig_source_x, 0), (self.wxgui_scopesink2_0, 0))
self.connect((self.audio_source_0, 0), (self.wxgui_scopesink2_0, 1))
 
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.gr_sig_source_x.set_sampling_freq(self.samp_rate)
self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate*2)
 
def set_frequency(self, frequency):
self.frequency = frequency
self.gr_sig_source_x.set_frequency(self.frequency)
 
def set_ampl(self, ampl):
self.ampl = ampl
self.gr_sig_source_x.set_amplitude(self.ampl)
 
if __name__ == '__main__':
if gr.enable_realtime_scheduling() != gr.RT_OK:
print "Error: failed to enable realtime scheduling."
tb = Sonar()
tb.Run()
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programy/GRC/Sonar/Sonar_40kHz.py
0,0 → 1,85
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Sonar
# Author: Kaklik
# Description: Sonar waform generator
# Generated: Sat Feb 14 20:14:10 2009
##################################################
 
from gnuradio import audio
from gnuradio import gr
from gnuradio.wxgui import scopesink2
from grc_gnuradio import wxgui as grc_wxgui
import wx
 
class Sonar(grc_wxgui.top_block_gui):
 
def __init__(self):
grc_wxgui.top_block_gui.__init__(
self,
title="GRC - Executing: Sonar",
icon="/usr/local/share/icons/hicolor/32x32/apps/gnuradio-grc.png",
)
 
##################################################
# Variables
##################################################
self.samp_rate = samp_rate = 96000
self.ampl = ampl = .4
 
##################################################
# Controls
##################################################
_ampl_control = grc_wxgui.slider_horizontal_control(
window=self.GetWin(),
callback=self.set_ampl,
label="Volume",
value=ampl,
min=0,
max=.5,
num_steps=100,
slider_length=200,
)
self.GridAdd(_ampl_control, 0, 0, 1, 2)
 
##################################################
# Blocks
##################################################
self.audio_sink = audio.sink(96000, "hw:1,0", True)
self.audio_source_0 = audio.source(96000, "hw:1,0", True)
self.gr_sig_source_x = gr.sig_source_f(samp_rate, gr.GR_SIN_WAVE, 39000, ampl, 0)
self.wxgui_scopesink2_0 = scopesink2.scope_sink_f(
self.GetWin(),
title="Scope Plot",
sample_rate=250000,
frame_decim=15,
v_scale=None,
t_scale=.0001,
num_inputs=2,
)
self.wxgui_scopesink2_0.win.set_format_line()
self.Add(self.wxgui_scopesink2_0.win)
 
##################################################
# Connections
##################################################
self.connect((self.audio_source_0, 0), (self.wxgui_scopesink2_0, 1))
self.connect((self.gr_sig_source_x, 0), (self.audio_sink, 0))
self.connect((self.gr_sig_source_x, 0), (self.wxgui_scopesink2_0, 0))
 
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate)
self.gr_sig_source_x.set_sampling_freq(self.samp_rate)
 
def set_ampl(self, ampl):
self.ampl = ampl
self.gr_sig_source_x.set_amplitude(self.ampl)
 
if __name__ == '__main__':
if gr.enable_realtime_scheduling() != gr.RT_OK:
print "Error: failed to enable realtime scheduling."
tb = Sonar()
tb.Run()
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programy/GRC/Sonar/frequency_response.grc
0,0 → 1,262
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
<timestamp>Fri Feb 20 19:47:38 2009</timestamp>
<block>
<key>audio_sink</key>
<param>
<key>id</key>
<value>audio_sink_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>samp_rate</key>
<value>48000</value>
</param>
<param>
<key>device_name</key>
<value>hw:1,0</value>
</param>
<param>
<key>ok_to_block</key>
<value>True</value>
</param>
<param>
<key>num_inputs</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(653, 387)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>audio_source</key>
<param>
<key>id</key>
<value>audio_source_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>samp_rate</key>
<value>48000</value>
</param>
<param>
<key>device_name</key>
<value>hw:1,0</value>
</param>
<param>
<key>ok_to_block</key>
<value>True</value>
</param>
<param>
<key>num_outputs</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(452, 510)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>variable</key>
<param>
<key>id</key>
<value>samp_rate</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>value</key>
<value>32000</value>
</param>
<param>
<key>_coordinate</key>
<value>(10, 170)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>gr_noise_source_x</key>
<param>
<key>id</key>
<value>gr_noise_source_x_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>float</value>
</param>
<param>
<key>noise_type</key>
<value>gr.GR_UNIFORM</value>
</param>
<param>
<key>amp</key>
<value>1</value>
</param>
<param>
<key>seed</key>
<value>100</value>
</param>
<param>
<key>_coordinate</key>
<value>(450, 388)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>wxgui_fftsink2</key>
<param>
<key>id</key>
<value>wxgui_fftsink2_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>float</value>
</param>
<param>
<key>title</key>
<value>FFT Plot</value>
</param>
<param>
<key>samp_rate</key>
<value>96000</value>
</param>
<param>
<key>baseband_freq</key>
<value>0</value>
</param>
<param>
<key>y_per_div</key>
<value>10</value>
</param>
<param>
<key>y_divs</key>
<value>8</value>
</param>
<param>
<key>ref_level</key>
<value>50</value>
</param>
<param>
<key>fft_size</key>
<value>2048</value>
</param>
<param>
<key>fft_rate</key>
<value>25</value>
</param>
<param>
<key>avg_alpha</key>
<value>0</value>
</param>
<param>
<key>average</key>
<value>True</value>
</param>
<param>
<key>peak_hold</key>
<value>False</value>
</param>
<param>
<key>grid_pos</key>
<value></value>
</param>
<param>
<key>_coordinate</key>
<value>(807, 446)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>options</key>
<param>
<key>id</key>
<value>frequency_response</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>title</key>
<value>untitled</value>
</param>
<param>
<key>author</key>
<value>unknown</value>
</param>
<param>
<key>description</key>
<value>gnuradio flow graph</value>
</param>
<param>
<key>window_size</key>
<value>1280, 1024</value>
</param>
<param>
<key>generate_options</key>
<value>wx_gui</value>
</param>
<param>
<key>category</key>
<value>Custom</value>
</param>
<param>
<key>realtime_scheduling</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(10, 10)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<connection>
<source_block_id>gr_noise_source_x_0</source_block_id>
<sink_block_id>audio_sink_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>audio_source_0</source_block_id>
<sink_block_id>wxgui_fftsink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
</flow_graph>
/programy/GRC/Sonar/frequency_response.py
0,0 → 1,66
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: untitled
# Author: unknown
# Description: gnuradio flow graph
# Generated: Fri Feb 20 19:47:38 2009
##################################################
 
from gnuradio import audio
from gnuradio import gr
from gnuradio.wxgui import fftsink2
from grc_gnuradio import wxgui as grc_wxgui
import wx
 
class frequency_response(grc_wxgui.top_block_gui):
 
def __init__(self):
grc_wxgui.top_block_gui.__init__(
self,
title="GRC - Executing: untitled",
icon="/usr/local/share/icons/hicolor/32x32/apps/gnuradio-grc.png",
)
 
##################################################
# Variables
##################################################
self.samp_rate = samp_rate = 32000
 
##################################################
# Blocks
##################################################
self.audio_sink_0 = audio.sink(48000, "hw:1,0", True)
self.audio_source_0 = audio.source(48000, "hw:1,0", True)
self.gr_noise_source_x_0 = gr.noise_source_f(gr.GR_UNIFORM, 1, 100)
self.wxgui_fftsink2_0 = fftsink2.fft_sink_f(
self.GetWin(),
baseband_freq=0,
y_per_div=10,
y_divs=8,
ref_level=50,
sample_rate=96000,
fft_size=2048,
fft_rate=25,
average=True,
avg_alpha=None,
title="FFT Plot",
peak_hold=False,
)
self.Add(self.wxgui_fftsink2_0.win)
 
##################################################
# Connections
##################################################
self.connect((self.gr_noise_source_x_0, 0), (self.audio_sink_0, 0))
self.connect((self.audio_source_0, 0), (self.wxgui_fftsink2_0, 0))
 
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
 
if __name__ == '__main__':
if gr.enable_realtime_scheduling() != gr.RT_OK:
print "Error: failed to enable realtime scheduling."
tb = frequency_response()
tb.Run()
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programy/GRC/Sonar/sonar.grc
0,0 → 1,362
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
<timestamp>Fri Feb 20 19:31:11 2009</timestamp>
<block>
<key>options</key>
<param>
<key>id</key>
<value>Sonar</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>title</key>
<value>Sonar</value>
</param>
<param>
<key>author</key>
<value>Kaklik</value>
</param>
<param>
<key>description</key>
<value>Sonar waform generator</value>
</param>
<param>
<key>window_size</key>
<value>1280, 1024</value>
</param>
<param>
<key>generate_options</key>
<value>wx_gui</value>
</param>
<param>
<key>category</key>
<value>Custom</value>
</param>
<param>
<key>realtime_scheduling</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(10, 10)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>variable_slider</key>
<param>
<key>id</key>
<value>ampl</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>label</key>
<value>Volume</value>
</param>
<param>
<key>value</key>
<value>.4</value>
</param>
<param>
<key>min</key>
<value>0</value>
</param>
<param>
<key>max</key>
<value>.5</value>
</param>
<param>
<key>num_steps</key>
<value>100</value>
</param>
<param>
<key>slider_length</key>
<value>200</value>
</param>
<param>
<key>slider_type</key>
<value>horizontal</value>
</param>
<param>
<key>grid_pos</key>
<value>0, 0, 1, 2</value>
</param>
<param>
<key>_coordinate</key>
<value>(13, 254)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>audio_sink</key>
<param>
<key>id</key>
<value>audio_sink</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>samp_rate</key>
<value>48000</value>
</param>
<param>
<key>device_name</key>
<value>hw:1,0</value>
</param>
<param>
<key>ok_to_block</key>
<value>True</value>
</param>
<param>
<key>num_inputs</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(771, 132)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>variable</key>
<param>
<key>id</key>
<value>samp_rate</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>value</key>
<value>96000</value>
</param>
<param>
<key>_coordinate</key>
<value>(11, 171)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>gr_sig_source_x</key>
<param>
<key>id</key>
<value>gr_sig_source_x</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>float</value>
</param>
<param>
<key>samp_rate</key>
<value>samp_rate</value>
</param>
<param>
<key>waveform</key>
<value>gr.GR_SIN_WAVE</value>
</param>
<param>
<key>freq</key>
<value>frequency</value>
</param>
<param>
<key>amp</key>
<value>ampl</value>
</param>
<param>
<key>offset</key>
<value>0</value>
</param>
<param>
<key>_coordinate</key>
<value>(310, 197)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>variable_slider</key>
<param>
<key>id</key>
<value>frequency</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>label</key>
<value></value>
</param>
<param>
<key>value</key>
<value>20000</value>
</param>
<param>
<key>min</key>
<value>5000</value>
</param>
<param>
<key>max</key>
<value>30000</value>
</param>
<param>
<key>num_steps</key>
<value>1000</value>
</param>
<param>
<key>slider_length</key>
<value>500</value>
</param>
<param>
<key>slider_type</key>
<value>horizontal</value>
</param>
<param>
<key>grid_pos</key>
<value></value>
</param>
<param>
<key>_coordinate</key>
<value>(16, 419)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>audio_source</key>
<param>
<key>id</key>
<value>audio_source_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>samp_rate</key>
<value>48000</value>
</param>
<param>
<key>device_name</key>
<value>hw:1,0</value>
</param>
<param>
<key>ok_to_block</key>
<value>True</value>
</param>
<param>
<key>num_outputs</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(293, 340)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
<value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>float</value>
</param>
<param>
<key>title</key>
<value>Scope Plot</value>
</param>
<param>
<key>samp_rate</key>
<value>samp_rate*2</value>
</param>
<param>
<key>frame_decim</key>
<value>15</value>
</param>
<param>
<key>v_scale</key>
<value>0</value>
</param>
<param>
<key>t_scale</key>
<value>.0001</value>
</param>
<param>
<key>marker</key>
<value>set_format_line</value>
</param>
<param>
<key>num_inputs</key>
<value>2</value>
</param>
<param>
<key>grid_pos</key>
<value></value>
</param>
<param>
<key>_coordinate</key>
<value>(770, 294)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<connection>
<source_block_id>gr_sig_source_x</source_block_id>
<sink_block_id>audio_sink</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>gr_sig_source_x</source_block_id>
<sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>audio_source_0</source_block_id>
<sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
</flow_graph>