Commit a60abb54d7b055deae20ca40231335c3749d0ca6
1 parent
4cbe368ff5
Exists in
master
prepare to deploy
Showing 18 changed files with 348 additions and 87 deletions Inline Diff
- redpitaya/client/gr_add_const_set_offset.xml
- redpitaya/client/gr_nco_counter_send_conf.xml
- redpitaya/client/gr_rp_blocks/gr_add_const_set_offset.xml
- redpitaya/client/gr_rp_blocks/gr_nco_counter_send_conf.xml
- redpitaya/client/gr_rp_blocks/gr_source_test.xml
- redpitaya/client/gr_rp_blocks/gr_source_test.xml.old
- redpitaya/client/gr_rp_blocks/redpitaya_gnuradio.py
- redpitaya/client/gr_rp_blocks/redpitaya_gnuradio.pyc
- redpitaya/client/gr_source_test.xml
- redpitaya/client/gr_source_test.xml.old
- redpitaya/client/pid_dds.grc
- redpitaya/client/pid_dds.py
- redpitaya/client/pid_vco.grc
- redpitaya/client/pid_vco.py
- redpitaya/client/redpitaya_gnuradio.py
- redpitaya/client/redpitaya_gnuradio.pyc
- redpitaya/client/sourceme.bma
- sdr/fm_radio/fm_radio.py
redpitaya/client/gr_add_const_set_offset.xml
File was created | 1 | <?xml version="1.0"?> | ||
2 | <!-- | |||
3 | # GNU Radio blocks for the Red Pitaya transceiver | |||
4 | # Copyright (C) 2015 Renzo Davoli | |||
5 | # | |||
6 | # This program is free software; you can redistribute it and/or | |||
7 | # modify it under the terms of the GNU General Public License | |||
8 | # as published by the Free Software Foundation; either version 2 | |||
9 | # of the License, or (at your option) any later version. | |||
10 | # | |||
11 | # This program is distributed in the hope that it will be useful, | |||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
14 | # GNU General Public License for more details. | |||
15 | # | |||
16 | # You should have received a copy of the GNU General Public License | |||
17 | # along with this program; if not, write to the Free Software | |||
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
19 | --> | |||
20 | <block> | |||
21 | <name>add_const_set_offset</name> | |||
22 | <key>add_const_set_offset</key> | |||
23 | <category>Red Pitaya</category> | |||
24 | <import>import redpitaya_gnuradio</import> | |||
25 | <make>redpitaya_gnuradio.add_const_set_offset( | |||
26 | addr=$addr, | |||
27 | port=$port, | |||
28 | device=$device, | |||
29 | const=$const, | |||
30 | ) | |||
31 | </make> | |||
32 | <callback>set_const(device=$device, const=$const)</callback> | |||
33 | <param> | |||
34 | <name>Address</name> | |||
35 | <key>addr</key> | |||
36 | <value>192.168.0.201</value> | |||
37 | <type>string</type> | |||
38 | </param> | |||
39 | <param> | |||
40 | <name>Port</name> | |||
41 | <key>port</key> | |||
42 | <value>1001</value> | |||
43 | <type>int</type> | |||
44 | </param> | |||
45 | <param> | |||
46 | <name>Device</name> | |||
47 | <key>device</key> | |||
48 | <value>/dev/add_const_0</value> | |||
49 | <type>string</type> | |||
50 | </param> | |||
51 | <param> | |||
52 | <name>Constant</name> | |||
53 | <key>const</key> | |||
54 | <value>0</value> | |||
55 | <type>int</type> | |||
56 | </param> | |||
57 | </block> |
redpitaya/client/gr_nco_counter_send_conf.xml
File was created | 1 | <?xml version="1.0"?> | ||
2 | <!-- | |||
3 | # GNU Radio blocks for the Red Pitaya transceiver | |||
4 | # Copyright (C) 2015 Renzo Davoli | |||
5 | # | |||
6 | # This program is free software; you can redistribute it and/or | |||
7 | # modify it under the terms of the GNU General Public License | |||
8 | # as published by the Free Software Foundation; either version 2 | |||
9 | # of the License, or (at your option) any later version. | |||
10 | # | |||
11 | # This program is distributed in the hope that it will be useful, | |||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
14 | # GNU General Public License for more details. | |||
15 | # | |||
16 | # You should have received a copy of the GNU General Public License | |||
17 | # along with this program; if not, write to the Free Software | |||
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
19 | --> | |||
20 | <block> | |||
21 | <name>nco_counter_send_conf</name> | |||
22 | <key>nco_counter_send_conf</key> | |||
23 | <category>Red Pitaya</category> | |||
24 | <import>import redpitaya_gnuradio</import> | |||
25 | <make>redpitaya_gnuradio.nco_counter_send_conf( | |||
26 | addr=$addr, | |||
27 | port=$port, | |||
28 | device=$device, | |||
29 | freq_ref=$freq_ref, | |||
30 | freq_dds=$freq_dds, | |||
31 | acc_size=$acc_size, | |||
32 | offset=$offset, | |||
33 | pinc_sw=$pinc_sw, | |||
34 | poff_sw=$poff_sw, | |||
35 | ) | |||
36 | </make> | |||
37 | <callback>set_nco(device=$device, freq_ref=$freq_ref, freq_dds=$freq_dds, acc_size=$acc_size, offset=$offset, pinc_sw=$pinc_sw, poff_sw=$poff_sw)</callback> | |||
38 | <param> | |||
39 | <name>Address</name> | |||
40 | <key>addr</key> | |||
41 | <value>192.168.0.201</value> | |||
42 | <type>string</type> | |||
43 | </param> | |||
44 | <param> | |||
45 | <name>Port</name> | |||
46 | <key>port</key> | |||
47 | <value>1001</value> | |||
48 | <type>int</type> | |||
49 | </param> | |||
50 | <param> | |||
51 | <name>Device</name> | |||
52 | <key>device</key> | |||
53 | <value>/dev/dds1</value> | |||
54 | <type>string</type> | |||
55 | </param> | |||
56 | <param> | |||
57 | <name>Frequency ref</name> | |||
58 | <key>freq_ref</key> | |||
59 | <value>125000000</value> | |||
60 | <type>int</type> | |||
61 | </param> | |||
62 | <param> | |||
63 | <name>Frequency DDS</name> | |||
64 | <key>freq_dds</key> | |||
65 | <value>0</value> | |||
66 | <type>int</type> | |||
67 | </param> | |||
68 | <param> | |||
69 | <name>Accumulator size</name> | |||
70 | <key>acc_size</key> | |||
71 | <value>32</value> | |||
72 | <type>int</type> | |||
73 | </param> | |||
74 | <param> | |||
75 | <name>Offset</name> | |||
76 | <key>offset</key> | |||
77 | <value>0</value> | |||
78 | <type>int</type> | |||
79 | </param> | |||
80 | <param> | |||
81 | <name>Pinc SW</name> | |||
82 | <key>pinc_sw</key> | |||
83 | <value>1</value> | |||
84 | <type>int</type> | |||
85 | </param> | |||
86 | <param> | |||
87 | <name>Poff SW</name> | |||
88 | <key>poff_sw</key> | |||
89 | <value>1</value> | |||
90 | <type>int</type> | |||
91 | </param> | |||
92 | </block> |
redpitaya/client/gr_rp_blocks/gr_add_const_set_offset.xml
<?xml version="1.0"?> | 1 | File was deleted | ||
<!-- | 2 | |||
# GNU Radio blocks for the Red Pitaya transceiver | 3 | |||
# Copyright (C) 2015 Renzo Davoli | 4 | |||
# | 5 | |||
# This program is free software; you can redistribute it and/or | 6 | |||
# modify it under the terms of the GNU General Public License | 7 | |||
# as published by the Free Software Foundation; either version 2 | 8 | |||
# of the License, or (at your option) any later version. | 9 | |||
# | 10 | |||
# This program is distributed in the hope that it will be useful, | 11 | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | |||
# GNU General Public License for more details. | 14 | |||
# | 15 | |||
# You should have received a copy of the GNU General Public License | 16 | |||
# along with this program; if not, write to the Free Software | 17 | |||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | |||
--> | 19 | |||
<block> | 20 | |||
<name>add_const_set_offset</name> | 21 | |||
<key>add_const_set_offset</key> | 22 | |||
<category>Red Pitaya</category> | 23 | |||
<import>import redpitaya_gnuradio</import> | 24 | |||
<make>redpitaya_gnuradio.add_const_set_offset( | 25 | |||
addr=$addr, | 26 | |||
port=$port, | 27 | |||
device=$device, | 28 | |||
const=$const, | 29 | |||
) | 30 | |||
</make> | 31 | |||
<callback>set_const(device=$device, const=$const)</callback> | 32 | |||
<param> | 33 | |||
<name>Address</name> | 34 | |||
<key>addr</key> | 35 | |||
<value>192.168.0.201</value> | 36 | |||
<type>string</type> | 37 | |||
</param> | 38 | |||
<param> | 39 | |||
<name>Port</name> | 40 | |||
<key>port</key> | 41 | |||
<value>1001</value> | 42 | |||
<type>int</type> | 43 | |||
</param> | 44 | |||
<param> | 45 | |||
<name>Device</name> | 46 | |||
<key>device</key> | 47 | |||
<value>/dev/add_const_0</value> | 48 | |||
<type>string</type> | 49 | |||
</param> | 50 | |||
<param> | 51 | |||
<name>Constant</name> | 52 | |||
<key>const</key> | 53 | |||
<value>0</value> | 54 | |||
<type>int</type> | 55 | |||
</param> | 56 | |||
</block> | 57 |
redpitaya/client/gr_rp_blocks/gr_nco_counter_send_conf.xml
<?xml version="1.0"?> | 1 | File was deleted | ||
<!-- | 2 | |||
# GNU Radio blocks for the Red Pitaya transceiver | 3 | |||
# Copyright (C) 2015 Renzo Davoli | 4 | |||
# | 5 | |||
# This program is free software; you can redistribute it and/or | 6 | |||
# modify it under the terms of the GNU General Public License | 7 | |||
# as published by the Free Software Foundation; either version 2 | 8 | |||
# of the License, or (at your option) any later version. | 9 | |||
# | 10 | |||
# This program is distributed in the hope that it will be useful, | 11 | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | |||
# GNU General Public License for more details. | 14 | |||
# | 15 | |||
# You should have received a copy of the GNU General Public License | 16 | |||
# along with this program; if not, write to the Free Software | 17 | |||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | |||
--> | 19 | |||
<block> | 20 | |||
<name>nco_counter_send_conf</name> | 21 | |||
<key>nco_counter_send_conf</key> | 22 | |||
<category>Red Pitaya</category> | 23 | |||
<import>import redpitaya_gnuradio</import> | 24 | |||
<make>redpitaya_gnuradio.nco_counter_send_conf( | 25 | |||
addr=$addr, | 26 | |||
port=$port, | 27 | |||
device=$device, | 28 | |||
freq_ref=$freq_ref, | 29 | |||
freq_dds=$freq_dds, | 30 | |||
acc_size=$acc_size, | 31 | |||
offset=$offset, | 32 | |||
pinc_sw=$pinc_sw, | 33 | |||
poff_sw=$poff_sw, | 34 | |||
) | 35 | |||
</make> | 36 | |||
<callback>set_nco(device=$device, freq_ref=$freq_ref, freq_dds=$freq_dds, acc_size=$acc_size, offset=$offset, pinc_sw=$pinc_sw, poff_sw=$poff_sw)</callback> | 37 | |||
<param> | 38 | |||
<name>Address</name> | 39 | |||
<key>addr</key> | 40 | |||
<value>192.168.0.201</value> | 41 | |||
<type>string</type> | 42 | |||
</param> | 43 | |||
<param> | 44 | |||
<name>Port</name> | 45 | |||
<key>port</key> | 46 | |||
<value>1001</value> | 47 | |||
<type>int</type> | 48 | |||
</param> | 49 | |||
<param> | 50 | |||
<name>Device</name> | 51 | |||
<key>device</key> | 52 | |||
<value>/dev/dds1</value> | 53 | |||
<type>string</type> | 54 | |||
</param> | 55 | |||
<param> | 56 | |||
<name>Frequency ref</name> | 57 | |||
<key>freq_ref</key> | 58 | |||
<value>125000000</value> | 59 | |||
<type>int</type> | 60 | |||
</param> | 61 | |||
<param> | 62 | |||
<name>Frequency DDS</name> | 63 | |||
<key>freq_dds</key> | 64 | |||
<value>0</value> | 65 | |||
<type>int</type> | 66 | |||
</param> | 67 | |||
<param> | 68 | |||
<name>Accumulator size</name> | 69 | |||
<key>acc_size</key> | 70 | |||
<value>32</value> | 71 | |||
<type>int</type> | 72 | |||
</param> | 73 | |||
<param> | 74 | |||
<name>Offset</name> | 75 | |||
<key>offset</key> | 76 | |||
<value>0</value> | 77 | |||
<type>int</type> | 78 | |||
</param> | 79 | |||
<param> | 80 | |||
<name>Pinc SW</name> | 81 | |||
<key>pinc_sw</key> | 82 | |||
<value>1</value> | 83 | |||
<type>int</type> | 84 | |||
</param> | 85 | |||
<param> | 86 | |||
<name>Poff SW</name> | 87 | |||
<key>poff_sw</key> | 88 | |||
<value>1</value> | 89 | |||
<type>int</type> | 90 | |||
</param> | 91 | |||
</block> | 92 |
redpitaya/client/gr_rp_blocks/gr_source_test.xml
<?xml version="1.0"?> | 1 | File was deleted | ||
<!-- | 2 | |||
# GNU Radio blocks for the Red Pitaya transceiver | 3 | |||
# Copyright (C) 2015 Renzo Davoli | 4 | |||
# | 5 | |||
# This program is free software; you can redistribute it and/or | 6 | |||
# modify it under the terms of the GNU General Public License | 7 | |||
# as published by the Free Software Foundation; either version 2 | 8 | |||
# of the License, or (at your option) any later version. | 9 | |||
# | 10 | |||
# This program is distributed in the hope that it will be useful, | 11 | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | |||
# GNU General Public License for more details. | 14 | |||
# | 15 | |||
# You should have received a copy of the GNU General Public License | 16 | |||
# along with this program; if not, write to the Free Software | 17 | |||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | |||
--> | 19 | |||
<block> | 20 | |||
<name>source_test</name> | 21 | |||
<key>source_test</key> | 22 | |||
<category>Red Pitaya</category> | 23 | |||
<import>import redpitaya_gnuradio</import> | 24 | |||
<make>redpitaya_gnuradio.source_test()</make> | 25 | |||
<source> | 26 | |||
<name>out</name> | 27 | |||
<type>complex</type> | 28 | |||
</source> | 29 | |||
</block> | 30 |
redpitaya/client/gr_rp_blocks/gr_source_test.xml.old
<?xml version="1.0"?> | 1 | File was deleted | ||
<!-- | 2 | |||
# GNU Radio blocks for the Red Pitaya transceiver | 3 | |||
# Copyright (C) 2015 Renzo Davoli | 4 | |||
# | 5 | |||
# This program is free software; you can redistribute it and/or | 6 | |||
# modify it under the terms of the GNU General Public License | 7 | |||
# as published by the Free Software Foundation; either version 2 | 8 | |||
# of the License, or (at your option) any later version. | 9 | |||
# | 10 | |||
# This program is distributed in the hope that it will be useful, | 11 | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | |||
# GNU General Public License for more details. | 14 | |||
# | 15 | |||
# You should have received a copy of the GNU General Public License | 16 | |||
# along with this program; if not, write to the Free Software | 17 | |||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | |||
--> | 19 | |||
<block> | 20 | |||
<name>source_test</name> | 21 | |||
<key>source_test</key> | 22 | |||
<category>Red Pitaya</category> | 23 | |||
<import>import redpitaya_gnuradio</import> | 24 | |||
<make>redpitaya_gnuradio.source_test()</make> | 25 | |||
<source> | 26 | |||
<name>out</name> | 27 | |||
<type>complex</type> | 28 | |||
</source> | 29 | |||
</block> | 30 |
redpitaya/client/gr_rp_blocks/redpitaya_gnuradio.py
#!/usr/bin/env python | 1 | File was deleted | ||
2 | ||||
# GNU Radio blocks for the Red Pitaya transceiver | 3 | |||
# Copyright (C) 2015 Renzo Davoli | 4 | |||
# | 5 | |||
# This program is free software; you can redistribute it and/or | 6 | |||
# modify it under the terms of the GNU General Public License | 7 | |||
# as published by the Free Software Foundation; either version 2 | 8 | |||
# of the License, or (at your option) any later version. | 9 | |||
# | 10 | |||
# This program is distributed in the hope that it will be useful, | 11 | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | |||
# GNU General Public License for more details. | 14 | |||
# | 15 | |||
# You should have received a copy of the GNU General Public License | 16 | |||
# along with this program; if not, write to the Free Software | 17 | |||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | |||
19 | ||||
import socket, os | 20 | |||
from gnuradio import gr, blocks | 21 | |||
22 | ||||
class add_const_set_offset(gr.hier_block2): | 23 | |||
def __init__(self, addr, port, device, const): | 24 | |||
self.name = "add_const_set_offset" | 25 | |||
gr.hier_block2.__init__( | 26 | |||
self, | 27 | |||
name = self.name, | 28 | |||
input_signature = gr.io_signature(0, 0, 0), | 29 | |||
output_signature = gr.io_signature(0, 0, 0) | 30 | |||
) | 31 | |||
self.ctrl_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | 32 | |||
self.ctrl_sock.connect((addr, port)) | 33 | |||
self.set_const(device, const) | 34 | |||
35 | ||||
def set_const(self, device, const): | 36 | |||
self.ctrl_sock.send('%s;%s;%i\n'%(self.name, device, const)) | 37 | |||
38 | ||||
39 | ||||
class nco_counter_send_conf(gr.hier_block2): | 40 | |||
def __init__(self, addr, port, device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw): | 41 | |||
self.name = "nco_counter_send_conf" | 42 | |||
gr.hier_block2.__init__( | 43 | |||
self, | 44 | |||
name = self.name, | 45 | |||
input_signature = gr.io_signature(0, 0, 0), | 46 | |||
output_signature = gr.io_signature(0, 0, 0) | 47 | |||
) | 48 | |||
self.ctrl_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | 49 | |||
self.ctrl_sock.connect((addr, port)) | 50 | |||
self.set_nco(device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw) | 51 | |||
52 | ||||
def set_nco(self, device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw): | 53 | |||
self.ctrl_sock.send('%s;%s;%i;%i;%i;%i;%i;%i\n'%(self.name, device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw)) | 54 | |||
55 | ||||
'''~ | 56 | |||
class source_test(gr.hier_block2): | 57 | |||
def __init__(self): | 58 | |||
self.name = "source_test" | 59 | |||
gr.hier_block2.__init__( | 60 | |||
self, | 61 | |||
name = self.name, | 62 | |||
input_signature = gr.io_signature(0, 0, 0), | 63 |
redpitaya/client/gr_rp_blocks/redpitaya_gnuradio.pyc
No preview for this file type
redpitaya/client/gr_source_test.xml
File was created | 1 | <?xml version="1.0"?> | ||
2 | <!-- | |||
3 | # GNU Radio blocks for the Red Pitaya transceiver | |||
4 | # Copyright (C) 2015 Renzo Davoli | |||
5 | # | |||
6 | # This program is free software; you can redistribute it and/or | |||
7 | # modify it under the terms of the GNU General Public License | |||
8 | # as published by the Free Software Foundation; either version 2 | |||
9 | # of the License, or (at your option) any later version. | |||
10 | # | |||
11 | # This program is distributed in the hope that it will be useful, | |||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
14 | # GNU General Public License for more details. | |||
15 | # | |||
16 | # You should have received a copy of the GNU General Public License | |||
17 | # along with this program; if not, write to the Free Software | |||
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
19 | --> | |||
20 | <block> | |||
21 | <name>source_test</name> | |||
22 | <key>source_test</key> | |||
23 | <category>Red Pitaya</category> | |||
24 | <import>import redpitaya_gnuradio</import> | |||
25 | <make>redpitaya_gnuradio.source_test()</make> | |||
26 | <source> | |||
27 | <name>out</name> | |||
28 | <type>complex</type> | |||
29 | </source> | |||
30 | </block> |
redpitaya/client/gr_source_test.xml.old
File was created | 1 | <?xml version="1.0"?> | ||
2 | <!-- | |||
3 | # GNU Radio blocks for the Red Pitaya transceiver | |||
4 | # Copyright (C) 2015 Renzo Davoli | |||
5 | # | |||
6 | # This program is free software; you can redistribute it and/or | |||
7 | # modify it under the terms of the GNU General Public License | |||
8 | # as published by the Free Software Foundation; either version 2 | |||
9 | # of the License, or (at your option) any later version. | |||
10 | # | |||
11 | # This program is distributed in the hope that it will be useful, | |||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
14 | # GNU General Public License for more details. | |||
15 | # | |||
16 | # You should have received a copy of the GNU General Public License | |||
17 | # along with this program; if not, write to the Free Software | |||
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
19 | --> | |||
20 | <block> | |||
21 | <name>source_test</name> | |||
22 | <key>source_test</key> | |||
23 | <category>Red Pitaya</category> | |||
24 | <import>import redpitaya_gnuradio</import> | |||
25 | <make>redpitaya_gnuradio.source_test()</make> | |||
26 | <source> | |||
27 | <name>out</name> | |||
28 | <type>complex</type> | |||
29 | </source> | |||
30 | </block> |
redpitaya/client/pid_dds.grc
<?xml version='1.0' encoding='utf-8'?> | 1 | File was deleted | ||
<?grc format='1' created='3.7.10'?> | 2 | |||
<flow_graph> | 3 | |||
<timestamp>Thu Feb 2 22:54:58 2017</timestamp> | 4 | |||
<block> | 5 | |||
<key>options</key> | 6 | |||
<param> | 7 | |||
<key>author</key> | 8 | |||
<value></value> | 9 | |||
</param> | 10 | |||
<param> | 11 | |||
<key>window_size</key> | 12 | |||
<value></value> | 13 | |||
</param> | 14 | |||
<param> | 15 | |||
<key>category</key> | 16 | |||
<value>[GRC Hier Blocks]</value> | 17 | |||
</param> | 18 | |||
<param> | 19 | |||
<key>comment</key> | 20 | |||
<value></value> | 21 | |||
</param> | 22 | |||
<param> | 23 | |||
<key>description</key> | 24 | |||
<value></value> | 25 | |||
</param> | 26 | |||
<param> | 27 | |||
<key>_enabled</key> | 28 | |||
<value>True</value> | 29 | |||
</param> | 30 | |||
<param> | 31 | |||
<key>_coordinate</key> | 32 | |||
<value>(8, 8)</value> | 33 | |||
</param> | 34 | |||
<param> | 35 | |||
<key>_rotation</key> | 36 | |||
<value>0</value> | 37 | |||
</param> | 38 | |||
<param> | 39 | |||
<key>generate_options</key> | 40 | |||
<value>qt_gui</value> | 41 | |||
</param> | 42 | |||
<param> | 43 | |||
<key>hier_block_src_path</key> | 44 | |||
<value>.:</value> | 45 | |||
</param> | 46 | |||
<param> | 47 | |||
<key>id</key> | 48 | |||
<value>pid_dds</value> | 49 | |||
</param> | 50 | |||
<param> | 51 | |||
<key>max_nouts</key> | 52 | |||
<value>0</value> | 53 | |||
</param> | 54 | |||
<param> | 55 | |||
<key>qt_qss_theme</key> | 56 | |||
<value></value> | 57 | |||
</param> | 58 | |||
<param> | 59 | |||
<key>realtime_scheduling</key> | 60 | |||
<value></value> | 61 | |||
</param> | 62 | |||
<param> | 63 | |||
<key>run_command</key> | 64 | |||
<value>{python} -u {filename}</value> | 65 | |||
</param> | 66 | |||
<param> | 67 | |||
<key>run_options</key> | 68 | |||
<value>prompt</value> | 69 | |||
</param> | 70 | |||
<param> | 71 | |||
<key>run</key> | 72 | |||
<value>True</value> | 73 | |||
</param> | 74 | |||
<param> | 75 | |||
<key>thread_safe_setters</key> | 76 | |||
<value></value> | 77 | |||
</param> | 78 | |||
<param> | 79 | |||
<key>title</key> | 80 | |||
<value></value> | 81 | |||
</param> | 82 | |||
</block> | 83 | |||
<block> | 84 | |||
<key>variable_qtgui_range</key> | 85 | |||
<param> | 86 | |||
<key>comment</key> | 87 | |||
<value></value> | 88 | |||
</param> | 89 | |||
<param> | 90 | |||
<key>value</key> | 91 | |||
<value>0</value> | 92 | |||
</param> | 93 | |||
<param> | 94 | |||
<key>_enabled</key> | 95 | |||
<value>True</value> | 96 | |||
</param> | 97 | |||
<param> | 98 | |||
<key>_coordinate</key> | 99 | |||
<value>(216, 8)</value> | 100 | |||
</param> | 101 | |||
<param> | 102 | |||
<key>gui_hint</key> | 103 | |||
<value>1, 1</value> | 104 | |||
</param> | 105 | |||
<param> | 106 | |||
<key>_rotation</key> | 107 | |||
<value>0</value> | 108 | |||
</param> | 109 | |||
<param> | 110 | |||
<key>id</key> | 111 | |||
<value>adc1_offset</value> | 112 | |||
</param> | 113 | |||
<param> | 114 | |||
<key>label</key> | 115 | |||
<value>adc1_offset</value> | 116 | |||
</param> | 117 | |||
<param> | 118 | |||
<key>min_len</key> | 119 | |||
<value>200</value> | 120 | |||
</param> | 121 | |||
<param> | 122 | |||
<key>orient</key> | 123 | |||
<value>Qt.Horizontal</value> | 124 | |||
</param> | 125 | |||
<param> | 126 | |||
<key>start</key> | 127 | |||
<value>-2**13</value> | 128 | |||
</param> | 129 | |||
<param> | 130 | |||
<key>step</key> | 131 | |||
<value>1</value> | 132 | |||
</param> | 133 | |||
<param> | 134 | |||
<key>stop</key> | 135 | |||
<value>2**13-1</value> | 136 | |||
</param> | 137 | |||
<param> | 138 | |||
<key>rangeType</key> | 139 | |||
<value>int</value> | 140 | |||
</param> | 141 | |||
<param> | 142 | |||
<key>widget</key> | 143 | |||
<value>counter_slider</value> | 144 | |||
</param> | 145 | |||
</block> | 146 | |||
<block> | 147 | |||
<key>variable</key> | 148 | |||
<param> | 149 | |||
<key>comment</key> | 150 | |||
<value></value> | 151 | |||
</param> | 152 | |||
<param> | 153 | |||
<key>_enabled</key> | 154 | |||
<value>True</value> | 155 | |||
</param> | 156 | |||
<param> | 157 | |||
<key>_coordinate</key> | 158 | |||
<value>(8, 104)</value> | 159 | |||
</param> | 160 | |||
<param> | 161 | |||
<key>_rotation</key> | 162 | |||
<value>0</value> | 163 | |||
</param> | 164 | |||
<param> | 165 | |||
<key>id</key> | 166 | |||
<value>addr</value> | 167 | |||
</param> | 168 | |||
<param> | 169 | |||
<key>value</key> | 170 | |||
<value>"192.168.0.202"</value> | 171 | |||
</param> | 172 | |||
</block> | 173 | |||
<block> | 174 | |||
<key>variable_qtgui_range</key> | 175 | |||
<param> | 176 | |||
<key>comment</key> | 177 | |||
<value></value> | 178 | |||
</param> | 179 | |||
<param> | 180 | |||
<key>value</key> | 181 | |||
<value>0</value> | 182 | |||
</param> | 183 | |||
<param> | 184 | |||
<key>_enabled</key> | 185 | |||
<value>True</value> | 186 | |||
</param> | 187 | |||
<param> | 188 | |||
<key>_coordinate</key> | 189 | |||
<value>(400, 8)</value> | 190 | |||
</param> | 191 | |||
<param> | 192 | |||
<key>gui_hint</key> | 193 | |||
<value>1, 2</value> | 194 | |||
</param> | 195 | |||
<param> | 196 | |||
<key>_rotation</key> | 197 | |||
<value>0</value> | 198 | |||
</param> | 199 | |||
<param> | 200 | |||
<key>id</key> | 201 | |||
<value>dac1_offset</value> | 202 | |||
</param> | 203 | |||
<param> | 204 | |||
<key>label</key> | 205 | |||
<value>dac1_offset</value> | 206 | |||
</param> | 207 | |||
<param> | 208 | |||
<key>min_len</key> | 209 | |||
<value>200</value> | 210 | |||
</param> | 211 | |||
<param> | 212 | |||
<key>orient</key> | 213 | |||
<value>Qt.Horizontal</value> | 214 | |||
</param> | 215 | |||
<param> | 216 | |||
<key>start</key> | 217 | |||
<value>-2**13</value> | 218 | |||
</param> | 219 | |||
<param> | 220 | |||
<key>step</key> | 221 | |||
<value>1</value> | 222 | |||
</param> | 223 | |||
<param> | 224 | |||
<key>stop</key> | 225 | |||
<value>2**13-1</value> | 226 | |||
</param> | 227 | |||
<param> | 228 | |||
<key>rangeType</key> | 229 | |||
<value>int</value> | 230 | |||
</param> | 231 | |||
<param> | 232 | |||
<key>widget</key> | 233 | |||
<value>counter_slider</value> | 234 | |||
</param> | 235 | |||
</block> | 236 | |||
<block> | 237 | |||
<key>variable_qtgui_range</key> | 238 | |||
<param> | 239 | |||
<key>comment</key> | 240 | |||
<value></value> | 241 | |||
</param> | 242 | |||
<param> | 243 | |||
<key>value</key> | 244 | |||
<value>0</value> | 245 | |||
</param> | 246 | |||
<param> | 247 | |||
<key>_enabled</key> | 248 | |||
<value>True</value> | 249 | |||
</param> | 250 | |||
<param> | 251 | |||
<key>_coordinate</key> | 252 | |||
<value>(704, 8)</value> | 253 | |||
</param> | 254 | |||
<param> | 255 | |||
<key>gui_hint</key> | 256 | |||
<value>1, 3</value> | 257 | |||
</param> | 258 | |||
<param> | 259 | |||
<key>_rotation</key> | 260 | |||
<value>0</value> | 261 | |||
</param> | 262 | |||
<param> | 263 | |||
<key>id</key> | 264 | |||
<value>dds_ampl</value> | 265 | |||
</param> | 266 | |||
<param> | 267 | |||
<key>label</key> | 268 | |||
<value>dds_ampl</value> | 269 | |||
</param> | 270 | |||
<param> | 271 | |||
<key>min_len</key> | 272 | |||
<value>200</value> | 273 | |||
</param> | 274 | |||
<param> | 275 | |||
<key>orient</key> | 276 | |||
<value>Qt.Horizontal</value> | 277 | |||
</param> | 278 | |||
<param> | 279 | |||
<key>start</key> | 280 | |||
<value>0</value> | 281 | |||
</param> | 282 | |||
<param> | 283 | |||
<key>step</key> | 284 | |||
<value>1</value> | 285 | |||
</param> | 286 | |||
<param> | 287 | |||
<key>stop</key> | 288 | |||
<value>2**14-1</value> | 289 | |||
</param> | 290 | |||
<param> | 291 | |||
<key>rangeType</key> | 292 | |||
<value>int</value> | 293 | |||
</param> | 294 | |||
<param> | 295 | |||
<key>widget</key> | 296 | |||
<value>counter_slider</value> | 297 | |||
</param> | 298 | |||
</block> | 299 | |||
<block> | 300 | |||
<key>variable_qtgui_range</key> | 301 | |||
<param> | 302 | |||
<key>comment</key> | 303 | |||
<value></value> | 304 | |||
</param> | 305 | |||
<param> | 306 | |||
<key>value</key> | 307 | |||
<value>0</value> | 308 | |||
</param> | 309 | |||
<param> | 310 | |||
<key>_enabled</key> | 311 | |||
<value>True</value> | 312 | |||
</param> | 313 | |||
<param> | 314 | |||
<key>_coordinate</key> | 315 | |||
<value>(696, 784)</value> | 316 | |||
</param> | 317 | |||
<param> | 318 | |||
<key>gui_hint</key> | 319 | |||
<value>4, 3</value> | 320 | |||
</param> | 321 | |||
<param> | 322 | |||
<key>_rotation</key> | 323 | |||
<value>0</value> | 324 | |||
</param> | 325 | |||
<param> | 326 | |||
<key>id</key> | 327 | |||
<value>dds_f0</value> | 328 | |||
</param> | 329 | |||
<param> | 330 | |||
<key>label</key> | 331 | |||
<value>dds_f0</value> | 332 | |||
</param> | 333 | |||
<param> | 334 | |||
<key>min_len</key> | 335 | |||
<value>200</value> | 336 | |||
</param> | 337 | |||
<param> | 338 | |||
<key>orient</key> | 339 | |||
<value>Qt.Horizontal</value> | 340 | |||
</param> | 341 | |||
<param> | 342 | |||
<key>start</key> | 343 | |||
<value>0</value> | 344 | |||
</param> | 345 | |||
<param> | 346 | |||
<key>step</key> | 347 | |||
<value>1</value> | 348 | |||
</param> | 349 | |||
<param> | 350 | |||
<key>stop</key> | 351 | |||
<value>2**14-1</value> | 352 | |||
</param> | 353 | |||
<param> | 354 | |||
<key>rangeType</key> | 355 | |||
<value>int</value> | 356 | |||
</param> | 357 | |||
<param> | 358 | |||
<key>widget</key> | 359 | |||
<value>counter_slider</value> | 360 | |||
</param> | 361 | |||
</block> | 362 | |||
<block> | 363 | |||
<key>variable_qtgui_range</key> | 364 | |||
<param> | 365 | |||
<key>comment</key> | 366 | |||
<value></value> | 367 | |||
</param> | 368 | |||
<param> | 369 | |||
<key>value</key> | 370 | |||
<value>0</value> | 371 | |||
</param> | 372 | |||
<param> | 373 | |||
<key>_enabled</key> | 374 | |||
<value>True</value> | 375 | |||
</param> | 376 | |||
<param> | 377 | |||
<key>_coordinate</key> | 378 | |||
<value>(696, 272)</value> | 379 | |||
</param> | 380 | |||
<param> | 381 | |||
<key>gui_hint</key> | 382 | |||
<value>2, 3</value> | 383 | |||
</param> | 384 | |||
<param> | 385 | |||
<key>_rotation</key> | 386 | |||
<value>0</value> | 387 | |||
</param> | 388 | |||
<param> | 389 | |||
<key>id</key> | 390 | |||
<value>dds_nco</value> | 391 | |||
</param> | 392 | |||
<param> | 393 | |||
<key>label</key> | 394 | |||
<value>dds_nco</value> | 395 | |||
</param> | 396 | |||
<param> | 397 | |||
<key>min_len</key> | 398 | |||
<value>200</value> | 399 | |||
</param> | 400 | |||
<param> | 401 | |||
<key>orient</key> | 402 | |||
<value>Qt.Horizontal</value> | 403 | |||
</param> | 404 | |||
<param> | 405 | |||
<key>start</key> | 406 | |||
<value>0</value> | 407 | |||
</param> | 408 | |||
<param> | 409 | |||
<key>step</key> | 410 | |||
<value>1</value> | 411 | |||
</param> | 412 | |||
<param> | 413 | |||
<key>stop</key> | 414 | |||
<value>60000000</value> | 415 | |||
</param> | 416 | |||
<param> | 417 | |||
<key>rangeType</key> | 418 | |||
<value>int</value> | 419 | |||
</param> | 420 | |||
<param> | 421 | |||
<key>widget</key> | 422 | |||
<value>counter_slider</value> | 423 | |||
</param> | 424 | |||
</block> | 425 | |||
<block> | 426 | |||
<key>variable_qtgui_range</key> | 427 | |||
<param> | 428 | |||
<key>comment</key> | 429 | |||
<value></value> | 430 | |||
</param> | 431 | |||
<param> | 432 | |||
<key>value</key> | 433 | |||
<value>0</value> | 434 | |||
</param> | 435 | |||
<param> | 436 | |||
<key>_enabled</key> | 437 | |||
<value>True</value> | 438 | |||
</param> | 439 | |||
<param> | 440 | |||
<key>_coordinate</key> | 441 | |||
<value>(704, 536)</value> | 442 | |||
</param> | 443 | |||
<param> | 444 | |||
<key>gui_hint</key> | 445 | |||
<value>3, 3</value> | 446 | |||
</param> | 447 | |||
<param> | 448 | |||
<key>_rotation</key> | 449 | |||
<value>0</value> | 450 | |||
</param> | 451 | |||
<param> | 452 | |||
<key>id</key> | 453 | |||
<value>dds_offset</value> | 454 | |||
</param> | 455 | |||
<param> | 456 | |||
<key>label</key> | 457 | |||
<value>dds_offset</value> | 458 | |||
</param> | 459 | |||
<param> | 460 | |||
<key>min_len</key> | 461 | |||
<value>200</value> | 462 | |||
</param> | 463 | |||
<param> | 464 | |||
<key>orient</key> | 465 | |||
<value>Qt.Horizontal</value> | 466 | |||
</param> | 467 | |||
<param> | 468 | |||
<key>start</key> | 469 | |||
<value>-2**13</value> | 470 | |||
</param> | 471 | |||
<param> | 472 | |||
<key>step</key> | 473 | |||
<value>1</value> | 474 | |||
</param> | 475 | |||
<param> | 476 | |||
<key>stop</key> | 477 | |||
<value>2**13-1</value> | 478 | |||
</param> | 479 | |||
<param> | 480 | |||
<key>rangeType</key> | 481 | |||
<value>int</value> | 482 | |||
</param> | 483 | |||
<param> | 484 | |||
<key>widget</key> | 485 | |||
<value>counter_slider</value> | 486 | |||
</param> | 487 | |||
</block> | 488 | |||
<block> | 489 | |||
<key>variable_qtgui_push_button</key> | 490 | |||
<param> | 491 | |||
<key>comment</key> | 492 | |||
<value></value> | 493 | |||
</param> | 494 | |||
<param> | 495 | |||
<key>value</key> | 496 | |||
<value>0</value> | 497 | |||
</param> | 498 | |||
<param> | 499 | |||
<key>_enabled</key> | 500 | |||
<value>True</value> | 501 | |||
</param> | 502 | |||
<param> | 503 | |||
<key>_coordinate</key> | 504 | |||
<value>(392, 800)</value> | 505 | |||
</param> | 506 | |||
<param> | 507 | |||
<key>gui_hint</key> | 508 | |||
<value>4, 2</value> | 509 | |||
</param> | 510 | |||
<param> | 511 | |||
<key>_rotation</key> | 512 | |||
<value>0</value> | 513 | |||
</param> | 514 | |||
<param> | 515 | |||
<key>id</key> | 516 | |||
<value>pid_int_rst</value> | 517 | |||
</param> | 518 | |||
<param> | 519 | |||
<key>label</key> | 520 | |||
<value>pid_int_rst</value> | 521 | |||
</param> | 522 | |||
<param> | 523 | |||
<key>pressed</key> | 524 | |||
<value>1</value> | 525 | |||
</param> | 526 | |||
<param> | 527 | |||
<key>released</key> | 528 | |||
<value>0</value> | 529 | |||
</param> | 530 | |||
<param> | 531 | |||
<key>type</key> | 532 | |||
<value>int</value> | 533 | |||
</param> | 534 | |||
</block> | 535 | |||
<block> | 536 | |||
<key>variable_qtgui_range</key> | 537 | |||
<param> | 538 | |||
<key>comment</key> | 539 | |||
<value></value> | 540 | |||
</param> | 541 | |||
<param> | 542 | |||
<key>value</key> | 543 | |||
<value>0</value> | 544 | |||
</param> | 545 | |||
<param> | 546 | |||
<key>_enabled</key> | 547 | |||
<value>True</value> | 548 | |||
</param> | 549 | |||
<param> | 550 | |||
<key>_coordinate</key> | 551 | |||
<value>(192, 784)</value> | 552 | |||
</param> | 553 | |||
<param> | 554 | |||
<key>gui_hint</key> | 555 | |||
<value>4, 1</value> | 556 | |||
</param> | 557 | |||
<param> | 558 | |||
<key>_rotation</key> | 559 | |||
<value>0</value> | 560 | |||
</param> | 561 | |||
<param> | 562 | |||
<key>id</key> | 563 | |||
<value>pid_kd</value> | 564 | |||
</param> | 565 | |||
<param> | 566 | |||
<key>label</key> | 567 | |||
<value>pid_kd</value> | 568 | |||
</param> | 569 | |||
<param> | 570 | |||
<key>min_len</key> | 571 | |||
<value>200</value> | 572 | |||
</param> | 573 | |||
<param> | 574 | |||
<key>orient</key> | 575 | |||
<value>Qt.Horizontal</value> | 576 | |||
</param> | 577 | |||
<param> | 578 | |||
<key>start</key> | 579 | |||
<value>0</value> | 580 | |||
</param> | 581 | |||
<param> | 582 | |||
<key>step</key> | 583 | |||
<value>1</value> | 584 | |||
</param> | 585 | |||
<param> | 586 | |||
<key>stop</key> | 587 | |||
<value>2**14-1</value> | 588 | |||
</param> | 589 | |||
<param> | 590 | |||
<key>rangeType</key> | 591 | |||
<value>int</value> | 592 | |||
</param> | 593 | |||
<param> | 594 | |||
<key>widget</key> | 595 | |||
<value>counter_slider</value> | 596 | |||
</param> | 597 | |||
</block> | 598 | |||
<block> | 599 | |||
<key>variable_qtgui_range</key> | 600 | |||
<param> | 601 | |||
<key>comment</key> | 602 | |||
<value></value> | 603 | |||
</param> | 604 | |||
<param> | 605 | |||
<key>value</key> | 606 | |||
<value>0</value> | 607 | |||
</param> | 608 | |||
<param> | 609 | |||
<key>_enabled</key> | 610 | |||
<value>True</value> | 611 | |||
</param> | 612 | |||
<param> | 613 | |||
<key>_coordinate</key> | 614 | |||
<value>(192, 536)</value> | 615 | |||
</param> | 616 | |||
<param> | 617 | |||
<key>gui_hint</key> | 618 | |||
<value>3, 1</value> | 619 | |||
</param> | 620 | |||
<param> | 621 | |||
<key>_rotation</key> | 622 | |||
<value>0</value> | 623 | |||
</param> | 624 | |||
<param> | 625 | |||
<key>id</key> | 626 | |||
<value>pid_ki</value> | 627 | |||
</param> | 628 | |||
<param> | 629 | |||
<key>label</key> | 630 | |||
<value>pid_ki</value> | 631 | |||
</param> | 632 | |||
<param> | 633 | |||
<key>min_len</key> | 634 | |||
<value>200</value> | 635 | |||
</param> | 636 | |||
<param> | 637 | |||
<key>orient</key> | 638 | |||
<value>Qt.Horizontal</value> | 639 | |||
</param> | 640 | |||
<param> | 641 | |||
<key>start</key> | 642 | |||
<value>0</value> | 643 | |||
</param> | 644 | |||
<param> | 645 | |||
<key>step</key> | 646 | |||
<value>1</value> | 647 | |||
</param> | 648 | |||
<param> | 649 | |||
<key>stop</key> | 650 | |||
<value>2**14-1</value> | 651 | |||
</param> | 652 | |||
<param> | 653 | |||
<key>rangeType</key> | 654 | |||
<value>int</value> | 655 | |||
</param> | 656 | |||
<param> | 657 | |||
<key>widget</key> | 658 | |||
<value>counter_slider</value> | 659 | |||
</param> | 660 | |||
</block> | 661 | |||
<block> | 662 | |||
<key>variable_qtgui_range</key> | 663 | |||
<param> | 664 | |||
<key>comment</key> | 665 | |||
<value></value> | 666 | |||
</param> | 667 | |||
<param> | 668 | |||
<key>value</key> | 669 | |||
<value>0</value> | 670 | |||
</param> | 671 | |||
<param> | 672 | |||
<key>_enabled</key> | 673 | |||
<value>True</value> | 674 | |||
</param> | 675 | |||
<param> | 676 | |||
<key>_coordinate</key> | 677 | |||
<value>(200, 272)</value> | 678 | |||
</param> | 679 | |||
<param> | 680 | |||
<key>gui_hint</key> | 681 | |||
<value>2, 1</value> | 682 | |||
</param> | 683 | |||
<param> | 684 | |||
<key>_rotation</key> | 685 | |||
<value>0</value> | 686 | |||
</param> | 687 | |||
<param> | 688 | |||
<key>id</key> | 689 | |||
<value>pid_kp</value> | 690 | |||
</param> | 691 | |||
<param> | 692 | |||
<key>label</key> | 693 | |||
<value>pid_kp</value> | 694 | |||
</param> | 695 | |||
<param> | 696 | |||
<key>min_len</key> | 697 | |||
<value>200</value> | 698 | |||
</param> | 699 | |||
<param> | 700 | |||
<key>orient</key> | 701 | |||
<value>Qt.Horizontal</value> | 702 | |||
</param> | 703 | |||
<param> | 704 | |||
<key>start</key> | 705 | |||
<value>0</value> | 706 | |||
</param> | 707 | |||
<param> | 708 | |||
<key>step</key> | 709 | |||
<value>1</value> | 710 | |||
</param> | 711 | |||
<param> | 712 | |||
<key>stop</key> | 713 | |||
<value>2**14-1</value> | 714 | |||
</param> | 715 | |||
<param> | 716 | |||
<key>rangeType</key> | 717 | |||
<value>int</value> | 718 | |||
</param> | 719 | |||
<param> | 720 | |||
<key>widget</key> | 721 | |||
<value>counter_slider</value> | 722 | |||
</param> | 723 | |||
</block> | 724 | |||
<block> | 725 | |||
<key>variable_qtgui_check_box</key> | 726 | |||
<param> | 727 | |||
<key>comment</key> | 728 | |||
<value></value> | 729 | |||
</param> | 730 | |||
<param> | 731 | |||
<key>value</key> | 732 | |||
<value>0</value> | 733 | |||
</param> | 734 | |||
<param> | 735 | |||
<key>_enabled</key> | 736 | |||
<value>True</value> | 737 | |||
</param> | 738 | |||
<param> | 739 | |||
<key>false</key> | 740 | |||
<value>0</value> | 741 | |||
</param> | 742 | |||
<param> | 743 | |||
<key>_coordinate</key> | 744 | |||
<value>(400, 544)</value> | 745 | |||
</param> | 746 | |||
<param> | 747 | |||
<key>gui_hint</key> | 748 | |||
<value>3, 2</value> | 749 | |||
</param> | 750 | |||
<param> | 751 | |||
<key>_rotation</key> | 752 | |||
<value>0</value> | 753 | |||
</param> | 754 | |||
<param> | 755 | |||
<key>id</key> | 756 | |||
<value>pid_sign</value> | 757 | |||
</param> | 758 | |||
<param> | 759 | |||
<key>label</key> | 760 | |||
<value>pid_sign</value> | 761 | |||
</param> | 762 | |||
<param> | 763 | |||
<key>true</key> | 764 | |||
<value>1</value> | 765 | |||
</param> | 766 | |||
<param> | 767 | |||
<key>type</key> | 768 | |||
<value>int</value> | 769 | |||
</param> | 770 | |||
</block> | 771 | |||
<block> | 772 | |||
<key>variable_qtgui_range</key> | 773 | |||
<param> | 774 | |||
<key>comment</key> | 775 | |||
<value></value> | 776 | |||
</param> | 777 | |||
<param> | 778 | |||
<key>value</key> | 779 | |||
<value>0</value> | 780 | |||
</param> | 781 | |||
<param> | 782 | |||
<key>_enabled</key> | 783 | |||
<value>True</value> | 784 | |||
</param> | 785 | |||
<param> | 786 | |||
<key>_coordinate</key> | 787 | |||
<value>(400, 272)</value> | 788 | |||
</param> | 789 | |||
<param> | 790 | |||
<key>gui_hint</key> | 791 | |||
<value>2, 2</value> | 792 | |||
</param> | 793 | |||
<param> | 794 | |||
<key>_rotation</key> | 795 | |||
<value>0</value> | 796 | |||
</param> | 797 | |||
<param> | 798 | |||
<key>id</key> | 799 | |||
<value>pid_sp</value> | 800 | |||
</param> | 801 | |||
<param> | 802 | |||
<key>label</key> | 803 | |||
<value>pid_sp</value> | 804 | |||
</param> | 805 | |||
<param> | 806 | |||
<key>min_len</key> | 807 | |||
<value>200</value> | 808 | |||
</param> | 809 | |||
<param> | 810 | |||
<key>orient</key> | 811 | |||
<value>Qt.Horizontal</value> | 812 | |||
</param> | 813 | |||
<param> | 814 | |||
<key>start</key> | 815 | |||
<value>-2**13</value> | 816 | |||
</param> | 817 | |||
<param> | 818 | |||
<key>step</key> | 819 | |||
<value>1</value> | 820 | |||
</param> | 821 | |||
<param> | 822 | |||
<key>stop</key> | 823 | |||
<value>2**13-1</value> | 824 | |||
</param> | 825 | |||
<param> | 826 | |||
<key>rangeType</key> | 827 | |||
<value>int</value> | 828 | |||
</param> | 829 | |||
<param> | 830 | |||
<key>widget</key> | 831 | |||
<value>counter_slider</value> | 832 | |||
</param> | 833 | |||
</block> | 834 | |||
<block> | 835 | |||
<key>variable</key> | 836 | |||
<param> | 837 | |||
<key>comment</key> | 838 | |||
<value></value> | 839 | |||
</param> | 840 | |||
<param> | 841 | |||
<key>_enabled</key> | 842 | |||
<value>True</value> | 843 | |||
</param> | 844 | |||
<param> | 845 | |||
<key>_coordinate</key> | 846 | |||
<value>(8, 176)</value> | 847 | |||
</param> | 848 | |||
<param> | 849 | |||
<key>_rotation</key> | 850 | |||
<value>0</value> | 851 | |||
</param> | 852 | |||
<param> | 853 | |||
<key>id</key> | 854 | |||
<value>port</value> | 855 | |||
</param> | 856 | |||
<param> | 857 | |||
<key>value</key> | 858 | |||
<value>1001</value> | 859 | |||
</param> | 860 | |||
</block> | 861 | |||
<block> | 862 | |||
<key>add_const_set_offset</key> | 863 | |||
<param> | 864 | |||
<key>addr</key> | 865 | |||
<value>addr</value> | 866 | |||
</param> | 867 | |||
<param> | 868 | |||
<key>alias</key> | 869 | |||
<value></value> | 870 | |||
</param> | 871 | |||
<param> | 872 | |||
<key>comment</key> | 873 | |||
<value></value> | 874 | |||
</param> | 875 | |||
<param> | 876 | |||
<key>const</key> | 877 | |||
<value>adc1_offset</value> | 878 | |||
</param> | 879 | |||
<param> | 880 | |||
<key>device</key> | 881 | |||
<value>/dev/adc1_offset</value> | 882 | |||
</param> | 883 | |||
<param> | 884 | |||
<key>_enabled</key> | 885 | |||
<value>True</value> | 886 | |||
</param> | 887 | |||
<param> | 888 | |||
<key>_coordinate</key> | 889 | |||
<value>(200, 144)</value> | 890 | |||
</param> | 891 | |||
<param> | 892 | |||
<key>_rotation</key> | 893 | |||
<value>0</value> | 894 | |||
</param> | 895 | |||
<param> | 896 | |||
<key>id</key> | 897 | |||
<value>add_const_set_offset_0_0_0</value> | 898 | |||
</param> | 899 | |||
<param> | 900 | |||
<key>port</key> | 901 | |||
<value>port</value> | 902 | |||
</param> | 903 | |||
</block> | 904 | |||
<block> | 905 | |||
<key>add_const_set_offset</key> | 906 | |||
<param> | 907 | |||
<key>addr</key> | 908 | |||
<value>addr</value> | 909 | |||
</param> | 910 | |||
<param> | 911 | |||
<key>alias</key> | 912 | |||
<value></value> | 913 | |||
</param> | 914 | |||
<param> | 915 | |||
<key>comment</key> | 916 | |||
<value></value> | 917 | |||
</param> | 918 | |||
<param> | 919 | |||
<key>const</key> | 920 | |||
<value>dac1_offset</value> | 921 | |||
</param> | 922 | |||
<param> | 923 | |||
<key>device</key> | 924 | |||
<value>/dev/dac1_offset</value> | 925 | |||
</param> | 926 | |||
<param> | 927 | |||
<key>_enabled</key> | 928 | |||
<value>True</value> | 929 | |||
</param> | 930 | |||
<param> | 931 | |||
<key>_coordinate</key> | 932 | |||
<value>(384, 144)</value> | 933 | |||
</param> | 934 | |||
<param> | 935 | |||
<key>_rotation</key> | 936 | |||
<value>0</value> | 937 | |||
</param> | 938 | |||
<param> | 939 | |||
<key>id</key> | 940 | |||
<value>add_const_set_offset_0_0_0_0</value> | 941 | |||
</param> | 942 | |||
<param> | 943 | |||
<key>port</key> | 944 | |||
<value>port</value> | 945 | |||
</param> | 946 | |||
</block> | 947 | |||
<block> | 948 | |||
<key>add_const_set_offset</key> | 949 | |||
<param> | 950 | |||
<key>addr</key> | 951 | |||
<value>addr</value> | 952 | |||
</param> | 953 | |||
<param> | 954 | |||
<key>alias</key> | 955 | |||
<value></value> | 956 | |||
</param> | 957 | |||
<param> | 958 | |||
<key>comment</key> | 959 | |||
<value></value> | 960 | |||
</param> | 961 | |||
<param> | 962 | |||
<key>const</key> | 963 | |||
<value>dds_ampl</value> | 964 | |||
</param> | 965 | |||
<param> | 966 | |||
<key>device</key> | 967 | |||
<value>/dev/dds_ampl</value> | 968 | |||
</param> | 969 | |||
<param> | 970 | |||
<key>_enabled</key> | 971 | |||
<value>True</value> | 972 | |||
</param> | 973 | |||
<param> | 974 | |||
<key>_coordinate</key> | 975 | |||
<value>(688, 144)</value> | 976 | |||
</param> | 977 | |||
<param> | 978 | |||
<key>_rotation</key> | 979 | |||
<value>0</value> | 980 | |||
</param> | 981 | |||
<param> | 982 | |||
<key>id</key> | 983 | |||
<value>add_const_set_offset_0_0_0_0_0</value> | 984 | |||
</param> | 985 | |||
<param> | 986 | |||
<key>port</key> | 987 | |||
<value>port</value> | 988 | |||
</param> | 989 | |||
</block> | 990 | |||
<block> | 991 | |||
<key>add_const_set_offset</key> | 992 | |||
<param> | 993 | |||
<key>addr</key> | 994 | |||
<value>addr</value> | 995 | |||
</param> | 996 | |||
<param> | 997 | |||
<key>alias</key> | 998 | |||
<value></value> | 999 | |||
</param> | 1000 | |||
<param> | 1001 | |||
<key>comment</key> | 1002 | |||
<value></value> | 1003 | |||
</param> | 1004 | |||
<param> | 1005 | |||
<key>const</key> | 1006 | |||
<value>dds_offset</value> | 1007 | |||
</param> | 1008 | |||
<param> | 1009 | |||
<key>device</key> | 1010 | |||
<value>/dev/dds_offset</value> | 1011 | |||
</param> | 1012 | |||
<param> | 1013 | |||
<key>_enabled</key> | 1014 | |||
<value>True</value> | 1015 | |||
</param> | 1016 | |||
<param> | 1017 | |||
<key>_coordinate</key> | 1018 | |||
<value>(688, 672)</value> | 1019 | |||
</param> | 1020 | |||
<param> | 1021 | |||
<key>_rotation</key> | 1022 | |||
<value>0</value> | 1023 | |||
</param> | 1024 | |||
<param> | 1025 | |||
<key>id</key> | 1026 | |||
<value>add_const_set_offset_0_0_0_0_1</value> | 1027 | |||
</param> | 1028 | |||
<param> | 1029 | |||
<key>port</key> | 1030 | |||
<value>port</value> | 1031 | |||
</param> | 1032 | |||
</block> | 1033 | |||
<block> | 1034 | |||
<key>add_const_set_offset</key> | 1035 | |||
<param> | 1036 | |||
<key>addr</key> | 1037 | |||
<value>addr</value> | 1038 | |||
</param> | 1039 | |||
<param> | 1040 | |||
<key>alias</key> | 1041 | |||
<value></value> | 1042 | |||
</param> | 1043 | |||
<param> | 1044 | |||
<key>comment</key> | 1045 | |||
<value></value> | 1046 | |||
</param> | 1047 | |||
<param> | 1048 | |||
<key>const</key> | 1049 | |||
<value>dds_f0</value> | 1050 | |||
</param> | 1051 | |||
<param> | 1052 | |||
<key>device</key> | 1053 | |||
<value>/dev/dds_f0</value> | 1054 | |||
</param> | 1055 | |||
<param> | 1056 | |||
<key>_enabled</key> | 1057 | |||
<value>True</value> | 1058 | |||
</param> | 1059 | |||
<param> | 1060 | |||
<key>_coordinate</key> | 1061 | |||
<value>(680, 920)</value> | 1062 | |||
</param> | 1063 | |||
<param> | 1064 | |||
<key>_rotation</key> | 1065 | |||
<value>0</value> | 1066 | |||
</param> | 1067 | |||
<param> | 1068 | |||
<key>id</key> | 1069 | |||
<value>add_const_set_offset_0_0_0_0_1_0</value> | 1070 | |||
</param> | 1071 | |||
<param> | 1072 | |||
<key>port</key> | 1073 | |||
<value>port</value> | 1074 | |||
</param> | 1075 | |||
</block> | 1076 | |||
<block> | 1077 | |||
<key>add_const_set_offset</key> | 1078 | |||
<param> | 1079 | |||
<key>addr</key> | 1080 | |||
<value>addr</value> | 1081 | |||
</param> | 1082 | |||
<param> | 1083 | |||
<key>alias</key> | 1084 | |||
<value></value> | 1085 | |||
</param> | 1086 | |||
<param> | 1087 | |||
<key>comment</key> | 1088 | |||
<value></value> | 1089 | |||
</param> | 1090 | |||
<param> | 1091 | |||
<key>const</key> | 1092 | |||
<value>pid_sp</value> | 1093 | |||
</param> | 1094 | |||
<param> | 1095 | |||
<key>device</key> | 1096 | |||
<value>/dev/pid_sp</value> | 1097 | |||
</param> | 1098 | |||
<param> | 1099 | |||
<key>_enabled</key> | 1100 | |||
<value>True</value> | 1101 | |||
</param> | 1102 | |||
<param> | 1103 | |||
<key>_coordinate</key> | 1104 | |||
<value>(384, 408)</value> | 1105 | |||
</param> | 1106 | |||
<param> | 1107 | |||
<key>_rotation</key> | 1108 | |||
<value>0</value> | 1109 | |||
</param> | 1110 | |||
<param> | 1111 | |||
<key>id</key> | 1112 | |||
<value>add_const_set_offset_0_0_0_1</value> | 1113 | |||
</param> | 1114 | |||
<param> | 1115 | |||
<key>port</key> | 1116 | |||
<value>port</value> | 1117 | |||
</param> | 1118 | |||
</block> | 1119 | |||
<block> | 1120 | |||
<key>add_const_set_offset</key> | 1121 | |||
<param> | 1122 | |||
<key>addr</key> | 1123 | |||
<value>addr</value> | 1124 | |||
</param> | 1125 | |||
<param> | 1126 | |||
<key>alias</key> | 1127 | |||
<value></value> | 1128 | |||
</param> | 1129 | |||
<param> | 1130 | |||
<key>comment</key> | 1131 | |||
<value></value> | 1132 | |||
</param> | 1133 | |||
<param> | 1134 | |||
<key>const</key> | 1135 | |||
<value>pid_kp</value> | 1136 | |||
</param> | 1137 | |||
<param> | 1138 | |||
<key>device</key> | 1139 | |||
<value>/dev/pid_kp</value> | 1140 | |||
</param> | 1141 | |||
<param> | 1142 | |||
<key>_enabled</key> | 1143 | |||
<value>True</value> | 1144 | |||
</param> | 1145 | |||
<param> | 1146 | |||
<key>_coordinate</key> | 1147 | |||
<value>(184, 408)</value> | 1148 | |||
</param> | 1149 | |||
<param> | 1150 | |||
<key>_rotation</key> | 1151 | |||
<value>0</value> | 1152 | |||
</param> | 1153 | |||
<param> | 1154 | |||
<key>id</key> | 1155 | |||
<value>add_const_set_offset_0_0_0_1_0</value> | 1156 | |||
</param> | 1157 | |||
<param> | 1158 | |||
<key>port</key> | 1159 | |||
<value>port</value> | 1160 | |||
</param> | 1161 | |||
</block> | 1162 | |||
<block> | 1163 | |||
<key>add_const_set_offset</key> | 1164 | |||
<param> | 1165 | |||
<key>addr</key> | 1166 | |||
<value>addr</value> | 1167 | |||
</param> | 1168 | |||
<param> | 1169 | |||
<key>alias</key> | 1170 | |||
<value></value> | 1171 | |||
</param> | 1172 | |||
<param> | 1173 | |||
<key>comment</key> | 1174 | |||
<value></value> | 1175 | |||
</param> | 1176 | |||
<param> | 1177 | |||
<key>const</key> | 1178 | |||
<value>pid_ki</value> | 1179 | |||
</param> | 1180 | |||
<param> | 1181 | |||
<key>device</key> | 1182 | |||
<value>/dev/pid_ki</value> | 1183 | |||
</param> | 1184 | |||
<param> | 1185 | |||
<key>_enabled</key> | 1186 | |||
<value>True</value> | 1187 | |||
</param> | 1188 | |||
<param> | 1189 | |||
<key>_coordinate</key> | 1190 | |||
<value>(176, 672)</value> | 1191 | |||
</param> | 1192 | |||
<param> | 1193 | |||
<key>_rotation</key> | 1194 | |||
<value>0</value> | 1195 | |||
</param> | 1196 | |||
<param> | 1197 | |||
<key>id</key> | 1198 | |||
<value>add_const_set_offset_0_0_0_1_0_0</value> | 1199 | |||
</param> | 1200 | |||
<param> | 1201 | |||
<key>port</key> | 1202 | |||
<value>port</value> | 1203 | |||
</param> | 1204 | |||
</block> | 1205 | |||
<block> | 1206 | |||
<key>add_const_set_offset</key> | 1207 | |||
<param> | 1208 | |||
<key>addr</key> | 1209 | |||
<value>addr</value> | 1210 | |||
</param> | 1211 | |||
<param> | 1212 | |||
<key>alias</key> | 1213 | |||
<value></value> | 1214 | |||
</param> | 1215 | |||
<param> | 1216 | |||
<key>comment</key> | 1217 | |||
<value></value> | 1218 | |||
</param> | 1219 | |||
<param> | 1220 | |||
<key>const</key> | 1221 | |||
<value>pid_kd</value> | 1222 | |||
</param> | 1223 | |||
<param> | 1224 | |||
<key>device</key> | 1225 | |||
<value>/dev/pid_kd</value> | 1226 | |||
</param> | 1227 | |||
<param> | 1228 | |||
<key>_enabled</key> | 1229 | |||
<value>True</value> | 1230 | |||
</param> | 1231 | |||
<param> | 1232 | |||
<key>_coordinate</key> | 1233 | |||
<value>(176, 920)</value> | 1234 | |||
</param> | 1235 | |||
<param> | 1236 | |||
<key>_rotation</key> | 1237 | |||
<value>0</value> | 1238 | |||
</param> | 1239 | |||
<param> | 1240 | |||
<key>id</key> | 1241 | |||
<value>add_const_set_offset_0_0_0_1_0_0_0</value> | 1242 | |||
</param> | 1243 | |||
<param> | 1244 | |||
<key>port</key> | 1245 | |||
<value>port</value> | 1246 | |||
</param> | 1247 | |||
</block> | 1248 | |||
<block> | 1249 | |||
<key>add_const_set_offset</key> | 1250 | |||
<param> | 1251 | |||
<key>addr</key> | 1252 | |||
<value>addr</value> | 1253 | |||
</param> | 1254 | |||
<param> | 1255 | |||
<key>alias</key> | 1256 | |||
<value></value> | 1257 | |||
</param> | 1258 | |||
<param> | 1259 | |||
<key>comment</key> | 1260 | |||
<value></value> | 1261 | |||
</param> | 1262 | |||
<param> | 1263 | |||
<key>const</key> | 1264 | |||
<value>pid_sign</value> | 1265 | |||
</param> | 1266 | |||
<param> | 1267 | |||
<key>device</key> | 1268 | |||
<value>/dev/pid_sign</value> | 1269 | |||
</param> | 1270 | |||
<param> | 1271 | |||
<key>_enabled</key> | 1272 | |||
<value>True</value> | 1273 | |||
</param> | 1274 | |||
<param> | 1275 | |||
<key>_coordinate</key> | 1276 | |||
<value>(392, 672)</value> | 1277 | |||
</param> | 1278 | |||
<param> | 1279 | |||
<key>_rotation</key> | 1280 | |||
<value>0</value> | 1281 | |||
</param> | 1282 | |||
<param> | 1283 | |||
<key>id</key> | 1284 | |||
<value>add_const_set_offset_0_0_0_1_0_0_0_0</value> | 1285 | |||
</param> | 1286 | |||
<param> | 1287 | |||
<key>port</key> | 1288 | |||
<value>port</value> | 1289 | |||
</param> | 1290 | |||
</block> | 1291 | |||
<block> | 1292 | |||
<key>add_const_set_offset</key> | 1293 | |||
<param> | 1294 | |||
<key>addr</key> | 1295 | |||
<value>addr</value> | 1296 | |||
</param> | 1297 | |||
<param> | 1298 | |||
<key>alias</key> | 1299 | |||
<value></value> | 1300 | |||
</param> | 1301 | |||
<param> | 1302 | |||
<key>comment</key> | 1303 | |||
<value></value> | 1304 | |||
</param> | 1305 | |||
<param> | 1306 | |||
<key>const</key> | 1307 | |||
<value>pid_int_rst</value> | 1308 | |||
</param> | 1309 | |||
<param> | 1310 | |||
<key>device</key> | 1311 | |||
<value>/dev/pid_int_rst</value> | 1312 | |||
</param> | 1313 | |||
<param> | 1314 | |||
<key>_enabled</key> | 1315 | |||
<value>True</value> | 1316 | |||
</param> | 1317 | |||
<param> | 1318 | |||
<key>_coordinate</key> | 1319 | |||
<value>(392, 920)</value> | 1320 | |||
</param> | 1321 | |||
<param> | 1322 | |||
<key>_rotation</key> | 1323 | |||
<value>0</value> | 1324 | |||
</param> | 1325 | |||
<param> | 1326 | |||
<key>id</key> | 1327 | |||
<value>add_const_set_offset_0_0_0_1_0_0_0_0_0</value> | 1328 | |||
</param> | 1329 | |||
<param> | 1330 | |||
<key>port</key> | 1331 | |||
<value>port</value> | 1332 | |||
</param> | 1333 | |||
</block> | 1334 | |||
<block> | 1335 | |||
<key>nco_counter_send_conf</key> | 1336 | |||
<param> | 1337 | |||
<key>acc_size</key> | 1338 | |||
<value>28</value> | 1339 | |||
</param> | 1340 | |||
<param> | 1341 | |||
<key>addr</key> | 1342 | |||
<value>addr</value> | 1343 | |||
</param> | 1344 | |||
<param> | 1345 | |||
<key>alias</key> | 1346 | |||
<value></value> | 1347 | |||
</param> | 1348 | |||
<param> | 1349 | |||
<key>comment</key> | 1350 | |||
<value></value> | 1351 | |||
</param> | 1352 | |||
<param> | 1353 | |||
<key>device</key> | 1354 | |||
<value>/dev/dds_nco</value> | 1355 | |||
</param> | 1356 | |||
<param> | 1357 | |||
<key>_enabled</key> | 1358 | |||
<value>True</value> | 1359 | |||
</param> | 1360 | |||
<param> | 1361 | |||
<key>freq_dds</key> | 1362 | |||
<value>dds_nco</value> | 1363 | |||
</param> | 1364 | |||
<param> | 1365 | |||
<key>freq_ref</key> | 1366 | |||
<value>125000000</value> | 1367 | |||
</param> | 1368 | |||
<param> | 1369 | |||
<key>_coordinate</key> | 1370 | |||
<value>(672, 384)</value> | 1371 | |||
</param> | 1372 | |||
<param> | 1373 | |||
<key>_rotation</key> | 1374 | |||
<value>0</value> | 1375 | |||
</param> | 1376 | |||
<param> | 1377 | |||
<key>id</key> | 1378 | |||
<value>nco_counter_send_conf_0</value> | 1379 | |||
</param> | 1380 | |||
<param> | 1381 | |||
<key>offset</key> | 1382 | |||
<value>0</value> | 1383 | |||
</param> | 1384 | |||
<param> | 1385 | |||
<key>port</key> | 1386 | |||
<value>port</value> | 1387 | |||
</param> | 1388 | |||
</block> | 1389 | |||
</flow_graph> | 1390 |
redpitaya/client/pid_dds.py
#!/usr/bin/env python2 | 1 | File was deleted | ||
# -*- coding: utf-8 -*- | 2 | |||
################################################## | 3 | |||
# GNU Radio Python Flow Graph | 4 | |||
# Title: Pid Dds | 5 | |||
# Generated: Fri Mar 31 15:49:11 2017 | 6 | |||
################################################## | 7 | |||
8 | ||||
if __name__ == '__main__': | 9 | |||
import ctypes | 10 | |||
import sys | 11 | |||
if sys.platform.startswith('linux'): | 12 | |||
try: | 13 | |||
x11 = ctypes.cdll.LoadLibrary('libX11.so') | 14 | |||
x11.XInitThreads() | 15 | |||
except: | 16 | |||
print "Warning: failed to XInitThreads()" | 17 | |||
18 | ||||
from PyQt4 import Qt | 19 | |||
from gnuradio import eng_notation | 20 | |||
from gnuradio import gr | 21 | |||
from gnuradio.eng_option import eng_option | 22 | |||
from gnuradio.filter import firdes | 23 | |||
from gnuradio.qtgui import Range, RangeWidget | 24 | |||
from optparse import OptionParser | 25 | |||
import redpitaya_gnuradio | 26 | |||
import sys | 27 | |||
28 | ||||
29 | ||||
class pid_dds(gr.top_block, Qt.QWidget): | 30 | |||
31 | ||||
def __init__(self): | 32 | |||
gr.top_block.__init__(self, "Pid Dds") | 33 | |||
Qt.QWidget.__init__(self) | 34 | |||
self.setWindowTitle("Pid Dds") | 35 | |||
try: | 36 | |||
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) | 37 | |||
except: | 38 | |||
pass | 39 | |||
self.top_scroll_layout = Qt.QVBoxLayout() | 40 | |||
self.setLayout(self.top_scroll_layout) | 41 | |||
self.top_scroll = Qt.QScrollArea() | 42 | |||
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) | 43 | |||
self.top_scroll_layout.addWidget(self.top_scroll) | 44 | |||
self.top_scroll.setWidgetResizable(True) | 45 | |||
self.top_widget = Qt.QWidget() | 46 | |||
self.top_scroll.setWidget(self.top_widget) | 47 | |||
self.top_layout = Qt.QVBoxLayout(self.top_widget) | 48 | |||
self.top_grid_layout = Qt.QGridLayout() | 49 | |||
self.top_layout.addLayout(self.top_grid_layout) | 50 | |||
51 | ||||
self.settings = Qt.QSettings("GNU Radio", "pid_dds") | 52 | |||
self.restoreGeometry(self.settings.value("geometry").toByteArray()) | 53 | |||
54 | ||||
################################################## | 55 | |||
# Variables | 56 | |||
################################################## | 57 | |||
self.port = port = 1001 | 58 | |||
self.pid_sp = pid_sp = 0 | 59 | |||
self.pid_sign = pid_sign = 0 | 60 | |||
self.pid_kp = pid_kp = 0 | 61 | |||
self.pid_ki = pid_ki = 0 | 62 | |||
self.pid_kd = pid_kd = 0 | 63 | |||
self.pid_int_rst = pid_int_rst = 0 | 64 | |||
self.dds_offset = dds_offset = 0 | 65 | |||
self.dds_nco = dds_nco = 0 | 66 | |||
self.dds_f0 = dds_f0 = 0 | 67 | |||
self.dds_ampl = dds_ampl = 0 | 68 | |||
self.dac1_offset = dac1_offset = 0 | 69 | |||
self.addr = addr = "192.168.0.202" | 70 | |||
self.adc1_offset = adc1_offset = 0 | 71 | |||
72 | ||||
################################################## | 73 | |||
# Blocks | 74 | |||
################################################## | 75 | |||
self._pid_sp_range = Range(-2**13, 2**13-1, 1, 0, 200) | 76 | |||
self._pid_sp_win = RangeWidget(self._pid_sp_range, self.set_pid_sp, 'pid_sp', "counter_slider", int) | 77 | |||
self.top_grid_layout.addWidget(self._pid_sp_win, 2, 2) | 78 | |||
_pid_sign_check_box = Qt.QCheckBox('pid_sign') | 79 | |||
self._pid_sign_choices = {True: 1, False: 0} | 80 | |||
self._pid_sign_choices_inv = dict((v,k) for k,v in self._pid_sign_choices.iteritems()) | 81 | |||
self._pid_sign_callback = lambda i: Qt.QMetaObject.invokeMethod(_pid_sign_check_box, "setChecked", Qt.Q_ARG("bool", self._pid_sign_choices_inv[i])) | 82 | |||
self._pid_sign_callback(self.pid_sign) | 83 | |||
_pid_sign_check_box.stateChanged.connect(lambda i: self.set_pid_sign(self._pid_sign_choices[bool(i)])) | 84 | |||
self.top_grid_layout.addWidget(_pid_sign_check_box, 3, 2) | 85 | |||
self._pid_kp_range = Range(0, 2**14-1, 1, 0, 200) | 86 | |||
self._pid_kp_win = RangeWidget(self._pid_kp_range, self.set_pid_kp, 'pid_kp', "counter_slider", int) | 87 | |||
self.top_grid_layout.addWidget(self._pid_kp_win, 2, 1) | 88 | |||
self._pid_ki_range = Range(0, 2**14-1, 1, 0, 200) | 89 | |||
self._pid_ki_win = RangeWidget(self._pid_ki_range, self.set_pid_ki, 'pid_ki', "counter_slider", int) | 90 | |||
self.top_grid_layout.addWidget(self._pid_ki_win, 3, 1) | 91 | |||
self._pid_kd_range = Range(0, 2**14-1, 1, 0, 200) | 92 | |||
self._pid_kd_win = RangeWidget(self._pid_kd_range, self.set_pid_kd, 'pid_kd', "counter_slider", int) | 93 | |||
self.top_grid_layout.addWidget(self._pid_kd_win, 4, 1) | 94 | |||
_pid_int_rst_push_button = Qt.QPushButton('pid_int_rst') | 95 | |||
self._pid_int_rst_choices = {'Pressed': 1, 'Released': 0} | 96 | |||
_pid_int_rst_push_button.pressed.connect(lambda: self.set_pid_int_rst(self._pid_int_rst_choices['Pressed'])) | 97 | |||
_pid_int_rst_push_button.released.connect(lambda: self.set_pid_int_rst(self._pid_int_rst_choices['Released'])) | 98 | |||
self.top_grid_layout.addWidget(_pid_int_rst_push_button, 4, 2) | 99 | |||
self._dds_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) | 100 | |||
self._dds_offset_win = RangeWidget(self._dds_offset_range, self.set_dds_offset, 'dds_offset', "counter_slider", int) | 101 | |||
self.top_grid_layout.addWidget(self._dds_offset_win, 3, 3) | 102 | |||
self._dds_nco_range = Range(0, 60000000, 1, 0, 200) | 103 | |||
self._dds_nco_win = RangeWidget(self._dds_nco_range, self.set_dds_nco, 'dds_nco', "counter_slider", int) | 104 | |||
self.top_grid_layout.addWidget(self._dds_nco_win, 2, 3) | 105 | |||
self._dds_f0_range = Range(0, 2**14-1, 1, 0, 200) | 106 | |||
self._dds_f0_win = RangeWidget(self._dds_f0_range, self.set_dds_f0, 'dds_f0', "counter_slider", int) | 107 | |||
self.top_grid_layout.addWidget(self._dds_f0_win, 4, 3) | 108 | |||
self._dds_ampl_range = Range(0, 2**14-1, 1, 0, 200) | 109 | |||
self._dds_ampl_win = RangeWidget(self._dds_ampl_range, self.set_dds_ampl, 'dds_ampl', "counter_slider", int) | 110 | |||
self.top_grid_layout.addWidget(self._dds_ampl_win, 1, 3) | 111 | |||
self._dac1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) | 112 | |||
self._dac1_offset_win = RangeWidget(self._dac1_offset_range, self.set_dac1_offset, 'dac1_offset', "counter_slider", int) | 113 | |||
self.top_grid_layout.addWidget(self._dac1_offset_win, 1, 2) | 114 | |||
self._adc1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) | 115 | |||
self._adc1_offset_win = RangeWidget(self._adc1_offset_range, self.set_adc1_offset, 'adc1_offset', "counter_slider", int) | 116 | |||
self.top_grid_layout.addWidget(self._adc1_offset_win, 1, 1) | 117 | |||
self.nco_counter_send_conf_0 = redpitaya_gnuradio.nco_counter_send_conf( | 118 | |||
addr=addr, | 119 | |||
port=port, | 120 | |||
device='/dev/dds_nco', | 121 | |||
freq_ref=125000000, | 122 | |||
freq_dds=dds_nco, | 123 | |||
acc_size=28, | 124 | |||
offset=0, | 125 | |||
) | 126 | |||
127 | ||||
self.add_const_set_offset_0_0_0_1_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | 128 | |||
addr=addr, | 129 | |||
port=port, | 130 | |||
device='/dev/pid_int_rst', | 131 | |||
const=pid_int_rst, | 132 | |||
) | 133 | |||
134 | ||||
self.add_const_set_offset_0_0_0_1_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | 135 | |||
addr=addr, | 136 | |||
port=port, | 137 | |||
device='/dev/pid_sign', | 138 | |||
const=pid_sign, | 139 | |||
) | 140 | |||
141 | ||||
self.add_const_set_offset_0_0_0_1_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | 142 | |||
addr=addr, | 143 | |||
port=port, | 144 | |||
device='/dev/pid_kd', | 145 | |||
const=pid_kd, | 146 | |||
) | 147 | |||
148 | ||||
self.add_const_set_offset_0_0_0_1_0_0 = redpitaya_gnuradio.add_const_set_offset( | 149 | |||
addr=addr, | 150 | |||
port=port, | 151 | |||
device='/dev/pid_ki', | 152 | |||
const=pid_ki, | 153 | |||
) | 154 | |||
155 | ||||
self.add_const_set_offset_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset( | 156 | |||
addr=addr, | 157 | |||
port=port, | 158 | |||
device='/dev/pid_kp', | 159 | |||
const=pid_kp, | 160 | |||
) | 161 | |||
162 | ||||
self.add_const_set_offset_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset( | 163 | |||
addr=addr, | 164 | |||
port=port, | 165 | |||
device='/dev/pid_sp', | 166 | |||
const=pid_sp, | 167 | |||
) | 168 | |||
169 | ||||
self.add_const_set_offset_0_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset( | 170 | |||
addr=addr, | 171 | |||
port=port, | 172 | |||
device='/dev/dds_f0', | 173 | |||
const=dds_f0, | 174 | |||
) | 175 | |||
176 | ||||
self.add_const_set_offset_0_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset( | 177 | |||
addr=addr, | 178 | |||
port=port, | 179 | |||
device='/dev/dds_offset', | 180 | |||
const=dds_offset, | 181 | |||
) | 182 | |||
183 | ||||
self.add_const_set_offset_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | 184 | |||
addr=addr, | 185 | |||
port=port, | 186 | |||
device='/dev/dds_ampl', | 187 | |||
const=dds_ampl, | 188 | |||
) | 189 | |||
190 | ||||
self.add_const_set_offset_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | 191 | |||
addr=addr, | 192 | |||
port=port, | 193 | |||
device='/dev/dac1_offset', | 194 | |||
const=dac1_offset, | 195 | |||
) | 196 | |||
197 | ||||
self.add_const_set_offset_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | 198 | |||
addr=addr, | 199 | |||
port=port, | 200 | |||
device='/dev/adc1_offset', | 201 | |||
const=adc1_offset, | 202 | |||
) | 203 | |||
204 | ||||
205 | ||||
def closeEvent(self, event): | 206 | |||
self.settings = Qt.QSettings("GNU Radio", "pid_dds") | 207 | |||
self.settings.setValue("geometry", self.saveGeometry()) | 208 | |||
event.accept() | 209 | |||
210 | ||||
def get_port(self): | 211 | |||
return self.port | 212 | |||
213 | ||||
def set_port(self, port): | 214 | |||
self.port = port | 215 | |||
216 | ||||
def get_pid_sp(self): | 217 | |||
return self.pid_sp | 218 | |||
219 | ||||
def set_pid_sp(self, pid_sp): | 220 | |||
self.pid_sp = pid_sp | 221 | |||
self.add_const_set_offset_0_0_0_1.set_const(device='/dev/pid_sp', const=self.pid_sp) | 222 | |||
223 | ||||
def get_pid_sign(self): | 224 | |||
return self.pid_sign | 225 | |||
226 | ||||
def set_pid_sign(self, pid_sign): | 227 | |||
self.pid_sign = pid_sign | 228 | |||
self._pid_sign_callback(self.pid_sign) | 229 | |||
self.add_const_set_offset_0_0_0_1_0_0_0_0.set_const(device='/dev/pid_sign', const=self.pid_sign) | 230 | |||
231 | ||||
def get_pid_kp(self): | 232 | |||
return self.pid_kp | 233 | |||
234 | ||||
def set_pid_kp(self, pid_kp): | 235 | |||
self.pid_kp = pid_kp | 236 | |||
self.add_const_set_offset_0_0_0_1_0.set_const(device='/dev/pid_kp', const=self.pid_kp) | 237 | |||
238 | ||||
def get_pid_ki(self): | 239 | |||
return self.pid_ki | 240 | |||
241 | ||||
def set_pid_ki(self, pid_ki): | 242 | |||
self.pid_ki = pid_ki | 243 | |||
self.add_const_set_offset_0_0_0_1_0_0.set_const(device='/dev/pid_ki', const=self.pid_ki) | 244 | |||
245 | ||||
def get_pid_kd(self): | 246 | |||
return self.pid_kd | 247 | |||
248 | ||||
def set_pid_kd(self, pid_kd): | 249 | |||
self.pid_kd = pid_kd | 250 | |||
self.add_const_set_offset_0_0_0_1_0_0_0.set_const(device='/dev/pid_kd', const=self.pid_kd) | 251 | |||
252 | ||||
def get_pid_int_rst(self): | 253 | |||
return self.pid_int_rst | 254 | |||
255 | ||||
def set_pid_int_rst(self, pid_int_rst): | 256 | |||
self.pid_int_rst = pid_int_rst | 257 | |||
self.add_const_set_offset_0_0_0_1_0_0_0_0_0.set_const(device='/dev/pid_int_rst', const=self.pid_int_rst) | 258 | |||
259 | ||||
def get_dds_offset(self): | 260 | |||
return self.dds_offset | 261 | |||
262 | ||||
def set_dds_offset(self, dds_offset): | 263 | |||
self.dds_offset = dds_offset | 264 | |||
self.add_const_set_offset_0_0_0_0_1.set_const(device='/dev/dds_offset', const=self.dds_offset) | 265 | |||
266 | ||||
def get_dds_nco(self): | 267 | |||
return self.dds_nco | 268 | |||
269 | ||||
def set_dds_nco(self, dds_nco): | 270 | |||
self.dds_nco = dds_nco | 271 | |||
self.nco_counter_send_conf_0.set_nco(device='/dev/dds_nco', freq_ref=125000000, freq_dds=self.dds_nco, acc_size=28, offset=0) | 272 | |||
273 |
redpitaya/client/pid_vco.grc
File was created | 1 | <?xml version='1.0' encoding='utf-8'?> | ||
2 | <?grc format='1' created='3.7.10'?> | |||
3 | <flow_graph> | |||
4 | <timestamp>Thu Feb 2 22:54:58 2017</timestamp> | |||
5 | <block> | |||
6 | <key>options</key> | |||
7 | <param> | |||
8 | <key>author</key> | |||
9 | <value></value> | |||
10 | </param> | |||
11 | <param> | |||
12 | <key>window_size</key> | |||
13 | <value></value> | |||
14 | </param> | |||
15 | <param> | |||
16 | <key>category</key> | |||
17 | <value>[GRC Hier Blocks]</value> | |||
18 | </param> | |||
19 | <param> | |||
20 | <key>comment</key> | |||
21 | <value></value> | |||
22 | </param> | |||
23 | <param> | |||
24 | <key>description</key> | |||
25 | <value></value> | |||
26 | </param> | |||
27 | <param> | |||
28 | <key>_enabled</key> | |||
29 | <value>True</value> | |||
30 | </param> | |||
31 | <param> | |||
32 | <key>_coordinate</key> | |||
33 | <value>(8, 8)</value> | |||
34 | </param> | |||
35 | <param> | |||
36 | <key>_rotation</key> | |||
37 | <value>0</value> | |||
38 | </param> | |||
39 | <param> | |||
40 | <key>generate_options</key> | |||
41 | <value>qt_gui</value> | |||
42 | </param> | |||
43 | <param> | |||
44 | <key>hier_block_src_path</key> | |||
45 | <value>.:</value> | |||
46 | </param> | |||
47 | <param> | |||
48 | <key>id</key> | |||
49 | <value>pid_vco</value> | |||
50 | </param> | |||
51 | <param> | |||
52 | <key>max_nouts</key> | |||
53 | <value>0</value> | |||
54 | </param> | |||
55 | <param> | |||
56 | <key>qt_qss_theme</key> | |||
57 | <value></value> | |||
58 | </param> | |||
59 | <param> | |||
60 | <key>realtime_scheduling</key> | |||
61 | <value></value> | |||
62 | </param> | |||
63 | <param> | |||
64 | <key>run_command</key> | |||
65 | <value>{python} -u {filename}</value> | |||
66 | </param> | |||
67 | <param> | |||
68 | <key>run_options</key> | |||
69 | <value>prompt</value> | |||
70 | </param> | |||
71 | <param> | |||
72 | <key>run</key> | |||
73 | <value>True</value> | |||
74 | </param> | |||
75 | <param> | |||
76 | <key>thread_safe_setters</key> | |||
77 | <value></value> | |||
78 | </param> | |||
79 | <param> | |||
80 | <key>title</key> | |||
81 | <value></value> | |||
82 | </param> | |||
83 | </block> | |||
84 | <block> | |||
85 | <key>variable_qtgui_range</key> | |||
86 | <param> | |||
87 | <key>comment</key> | |||
88 | <value></value> | |||
89 | </param> | |||
90 | <param> | |||
91 | <key>value</key> | |||
92 | <value>0</value> | |||
93 | </param> | |||
94 | <param> | |||
95 | <key>_enabled</key> | |||
96 | <value>True</value> | |||
97 | </param> | |||
98 | <param> | |||
99 | <key>_coordinate</key> | |||
100 | <value>(216, 8)</value> | |||
101 | </param> | |||
102 | <param> | |||
103 | <key>gui_hint</key> | |||
104 | <value>1, 1</value> | |||
105 | </param> | |||
106 | <param> | |||
107 | <key>_rotation</key> | |||
108 | <value>0</value> | |||
109 | </param> | |||
110 | <param> | |||
111 | <key>id</key> | |||
112 | <value>adc1_offset</value> | |||
113 | </param> | |||
114 | <param> | |||
115 | <key>label</key> | |||
116 | <value>adc1_offset</value> | |||
117 | </param> | |||
118 | <param> | |||
119 | <key>min_len</key> | |||
120 | <value>200</value> | |||
121 | </param> | |||
122 | <param> | |||
123 | <key>orient</key> | |||
124 | <value>Qt.Horizontal</value> | |||
125 | </param> | |||
126 | <param> | |||
127 | <key>start</key> | |||
128 | <value>-2**13</value> | |||
129 | </param> | |||
130 | <param> | |||
131 | <key>step</key> | |||
132 | <value>1</value> | |||
133 | </param> | |||
134 | <param> | |||
135 | <key>stop</key> | |||
136 | <value>2**13-1</value> | |||
137 | </param> | |||
138 | <param> | |||
139 | <key>rangeType</key> | |||
140 | <value>int</value> | |||
141 | </param> | |||
142 | <param> | |||
143 | <key>widget</key> | |||
144 | <value>counter_slider</value> | |||
145 | </param> | |||
146 | </block> | |||
147 | <block> | |||
148 | <key>variable</key> | |||
149 | <param> | |||
150 | <key>comment</key> | |||
151 | <value></value> | |||
152 | </param> | |||
153 | <param> | |||
154 | <key>_enabled</key> | |||
155 | <value>True</value> | |||
156 | </param> | |||
157 | <param> | |||
158 | <key>_coordinate</key> | |||
159 | <value>(8, 104)</value> | |||
160 | </param> | |||
161 | <param> | |||
162 | <key>_rotation</key> | |||
163 | <value>0</value> | |||
164 | </param> | |||
165 | <param> | |||
166 | <key>id</key> | |||
167 | <value>addr</value> | |||
168 | </param> | |||
169 | <param> | |||
170 | <key>value</key> | |||
171 | <value>"192.168.0.203"</value> | |||
172 | </param> | |||
173 | </block> | |||
174 | <block> | |||
175 | <key>variable_qtgui_range</key> | |||
176 | <param> | |||
177 | <key>comment</key> | |||
178 | <value></value> | |||
179 | </param> | |||
180 | <param> | |||
181 | <key>value</key> | |||
182 | <value>0</value> | |||
183 | </param> | |||
184 | <param> | |||
185 | <key>_enabled</key> | |||
186 | <value>True</value> | |||
187 | </param> | |||
188 | <param> | |||
189 | <key>_coordinate</key> | |||
190 | <value>(400, 8)</value> | |||
191 | </param> | |||
192 | <param> | |||
193 | <key>gui_hint</key> | |||
194 | <value>1, 2</value> | |||
195 | </param> | |||
196 | <param> | |||
197 | <key>_rotation</key> | |||
198 | <value>0</value> | |||
199 | </param> | |||
200 | <param> | |||
201 | <key>id</key> | |||
202 | <value>dac1_offset</value> | |||
203 | </param> | |||
204 | <param> | |||
205 | <key>label</key> | |||
206 | <value>dac1_offset</value> | |||
207 | </param> | |||
208 | <param> | |||
209 | <key>min_len</key> | |||
210 | <value>200</value> | |||
211 | </param> | |||
212 | <param> | |||
213 | <key>orient</key> | |||
214 | <value>Qt.Horizontal</value> | |||
215 | </param> | |||
216 | <param> | |||
217 | <key>start</key> | |||
218 | <value>-2**13</value> | |||
219 | </param> | |||
220 | <param> | |||
221 | <key>step</key> | |||
222 | <value>1</value> | |||
223 | </param> | |||
224 | <param> | |||
225 | <key>stop</key> | |||
226 | <value>2**13-1</value> | |||
227 | </param> | |||
228 | <param> | |||
229 | <key>rangeType</key> | |||
230 | <value>int</value> | |||
231 | </param> | |||
232 | <param> | |||
233 | <key>widget</key> | |||
234 | <value>counter_slider</value> | |||
235 | </param> | |||
236 | </block> | |||
237 | <block> | |||
238 | <key>variable_qtgui_range</key> | |||
239 | <param> | |||
240 | <key>comment</key> | |||
241 | <value></value> | |||
242 | </param> | |||
243 | <param> | |||
244 | <key>value</key> | |||
245 | <value>0</value> | |||
246 | </param> | |||
247 | <param> | |||
248 | <key>_enabled</key> | |||
249 | <value>True</value> | |||
250 | </param> | |||
251 | <param> | |||
252 | <key>_coordinate</key> | |||
253 | <value>(704, 8)</value> | |||
254 | </param> | |||
255 | <param> | |||
256 | <key>gui_hint</key> | |||
257 | <value>1, 3</value> | |||
258 | </param> | |||
259 | <param> | |||
260 | <key>_rotation</key> | |||
261 | <value>0</value> | |||
262 | </param> | |||
263 | <param> | |||
264 | <key>id</key> | |||
265 | <value>dds_ampl</value> | |||
266 | </param> | |||
267 | <param> | |||
268 | <key>label</key> | |||
269 | <value>dds_ampl</value> | |||
270 | </param> | |||
271 | <param> | |||
272 | <key>min_len</key> | |||
273 | <value>200</value> | |||
274 | </param> | |||
275 | <param> | |||
276 | <key>orient</key> | |||
277 | <value>Qt.Horizontal</value> | |||
278 | </param> | |||
279 | <param> | |||
280 | <key>start</key> | |||
281 | <value>0</value> | |||
282 | </param> | |||
283 | <param> | |||
284 | <key>step</key> | |||
285 | <value>1</value> | |||
286 | </param> | |||
287 | <param> | |||
288 | <key>stop</key> | |||
289 | <value>2**13-1</value> | |||
290 | </param> | |||
291 | <param> | |||
292 | <key>rangeType</key> | |||
293 | <value>int</value> | |||
294 | </param> | |||
295 | <param> | |||
296 | <key>widget</key> | |||
297 | <value>counter_slider</value> | |||
298 | </param> | |||
299 | </block> | |||
300 | <block> | |||
301 | <key>variable_qtgui_range</key> | |||
302 | <param> | |||
303 | <key>comment</key> | |||
304 | <value></value> | |||
305 | </param> | |||
306 | <param> | |||
307 | <key>value</key> | |||
308 | <value>0</value> | |||
309 | </param> | |||
310 | <param> | |||
311 | <key>_enabled</key> | |||
312 | <value>True</value> | |||
313 | </param> | |||
314 | <param> | |||
315 | <key>_coordinate</key> | |||
316 | <value>(696, 668)</value> | |||
317 | </param> | |||
318 | <param> | |||
319 | <key>gui_hint</key> | |||
320 | <value>4, 3</value> | |||
321 | </param> | |||
322 | <param> | |||
323 | <key>_rotation</key> | |||
324 | <value>0</value> | |||
325 | </param> | |||
326 | <param> | |||
327 | <key>id</key> | |||
328 | <value>dds_f0</value> | |||
329 | </param> | |||
330 | <param> | |||
331 | <key>label</key> | |||
332 | <value>dds_f0</value> | |||
333 | </param> | |||
334 | <param> | |||
335 | <key>min_len</key> | |||
336 | <value>200</value> | |||
337 | </param> | |||
338 | <param> | |||
339 | <key>orient</key> | |||
340 | <value>Qt.Horizontal</value> | |||
341 | </param> | |||
342 | <param> | |||
343 | <key>start</key> | |||
344 | <value>0</value> | |||
345 | </param> | |||
346 | <param> | |||
347 | <key>step</key> | |||
348 | <value>1</value> | |||
349 | </param> | |||
350 | <param> | |||
351 | <key>stop</key> | |||
352 | <value>60000000</value> | |||
353 | </param> | |||
354 | <param> | |||
355 | <key>rangeType</key> | |||
356 | <value>int</value> | |||
357 | </param> | |||
358 | <param> | |||
359 | <key>widget</key> | |||
360 | <value>counter_slider</value> | |||
361 | </param> | |||
362 | </block> | |||
363 | <block> | |||
364 | <key>variable_qtgui_range</key> | |||
365 | <param> | |||
366 | <key>comment</key> | |||
367 | <value></value> | |||
368 | </param> | |||
369 | <param> | |||
370 | <key>value</key> | |||
371 | <value>0</value> | |||
372 | </param> | |||
373 | <param> | |||
374 | <key>_enabled</key> | |||
375 | <value>True</value> | |||
376 | </param> | |||
377 | <param> | |||
378 | <key>_coordinate</key> | |||
379 | <value>(696, 236)</value> | |||
380 | </param> | |||
381 | <param> | |||
382 | <key>gui_hint</key> | |||
383 | <value>2, 3</value> | |||
384 | </param> | |||
385 | <param> | |||
386 | <key>_rotation</key> | |||
387 | <value>0</value> | |||
388 | </param> | |||
389 | <param> | |||
390 | <key>id</key> | |||
391 | <value>dds_nco</value> | |||
392 | </param> | |||
393 | <param> | |||
394 | <key>label</key> | |||
395 | <value>dds_nco</value> | |||
396 | </param> | |||
397 | <param> | |||
398 | <key>min_len</key> | |||
399 | <value>200</value> | |||
400 | </param> | |||
401 | <param> | |||
402 | <key>orient</key> | |||
403 | <value>Qt.Horizontal</value> | |||
404 | </param> | |||
405 | <param> | |||
406 | <key>start</key> | |||
407 | <value>0</value> | |||
408 | </param> | |||
409 | <param> | |||
410 | <key>step</key> | |||
411 | <value>1</value> | |||
412 | </param> | |||
413 | <param> | |||
414 | <key>stop</key> | |||
415 | <value>60000000</value> | |||
416 | </param> | |||
417 | <param> | |||
418 | <key>rangeType</key> | |||
419 | <value>int</value> | |||
420 | </param> | |||
421 | <param> | |||
422 | <key>widget</key> | |||
423 | <value>counter_slider</value> | |||
424 | </param> | |||
425 | </block> | |||
426 | <block> | |||
427 | <key>variable_qtgui_range</key> | |||
428 | <param> | |||
429 | <key>comment</key> | |||
430 | <value></value> | |||
431 | </param> | |||
432 | <param> | |||
433 | <key>value</key> | |||
434 | <value>0</value> | |||
435 | </param> | |||
436 | <param> | |||
437 | <key>_enabled</key> | |||
438 | <value>True</value> | |||
439 | </param> | |||
440 | <param> | |||
441 | <key>_coordinate</key> | |||
442 | <value>(704, 460)</value> | |||
443 | </param> | |||
444 | <param> | |||
445 | <key>gui_hint</key> | |||
446 | <value>3, 3</value> | |||
447 | </param> | |||
448 | <param> | |||
449 | <key>_rotation</key> | |||
450 | <value>0</value> | |||
451 | </param> | |||
452 | <param> | |||
453 | <key>id</key> | |||
454 | <value>dds_offset</value> | |||
455 | </param> | |||
456 | <param> | |||
457 | <key>label</key> | |||
458 | <value>dds_offset</value> | |||
459 | </param> | |||
460 | <param> | |||
461 | <key>min_len</key> | |||
462 | <value>200</value> | |||
463 | </param> | |||
464 | <param> | |||
465 | <key>orient</key> | |||
466 | <value>Qt.Horizontal</value> | |||
467 | </param> | |||
468 | <param> | |||
469 | <key>start</key> | |||
470 | <value>-2**13</value> | |||
471 | </param> | |||
472 | <param> | |||
473 | <key>step</key> | |||
474 | <value>1</value> | |||
475 | </param> | |||
476 | <param> | |||
477 | <key>stop</key> | |||
478 | <value>2**13-1</value> | |||
479 | </param> | |||
480 | <param> | |||
481 | <key>rangeType</key> | |||
482 | <value>int</value> | |||
483 | </param> | |||
484 | <param> | |||
485 | <key>widget</key> | |||
486 | <value>counter_slider</value> | |||
487 | </param> | |||
488 | </block> | |||
489 | <block> | |||
490 | <key>variable_qtgui_range</key> | |||
491 | <param> | |||
492 | <key>comment</key> | |||
493 | <value></value> | |||
494 | </param> | |||
495 | <param> | |||
496 | <key>value</key> | |||
497 | <value>0</value> | |||
498 | </param> | |||
499 | <param> | |||
500 | <key>_enabled</key> | |||
501 | <value>True</value> | |||
502 | </param> | |||
503 | <param> | |||
504 | <key>_coordinate</key> | |||
505 | <value>(672, 868)</value> | |||
506 | </param> | |||
507 | <param> | |||
508 | <key>gui_hint</key> | |||
509 | <value>5, 3</value> | |||
510 | </param> | |||
511 | <param> | |||
512 | <key>_rotation</key> | |||
513 | <value>0</value> | |||
514 | </param> | |||
515 | <param> | |||
516 | <key>id</key> | |||
517 | <value>dds_range</value> | |||
518 | </param> | |||
519 | <param> | |||
520 | <key>label</key> | |||
521 | <value>dds_range</value> | |||
522 | </param> | |||
523 | <param> | |||
524 | <key>min_len</key> | |||
525 | <value>200</value> | |||
526 | </param> | |||
527 | <param> | |||
528 | <key>orient</key> | |||
529 | <value>Qt.Horizontal</value> | |||
530 | </param> | |||
531 | <param> | |||
532 | <key>start</key> | |||
533 | <value>-2**13</value> | |||
534 | </param> | |||
535 | <param> | |||
536 | <key>step</key> | |||
537 | <value>1</value> | |||
538 | </param> | |||
539 | <param> | |||
540 | <key>stop</key> | |||
541 | <value>2**13-1</value> | |||
542 | </param> | |||
543 | <param> | |||
544 | <key>rangeType</key> | |||
545 | <value>int</value> | |||
546 | </param> | |||
547 | <param> | |||
548 | <key>widget</key> | |||
549 | <value>counter_slider</value> | |||
550 | </param> | |||
551 | </block> | |||
552 | <block> | |||
553 | <key>variable_qtgui_range</key> | |||
554 | <param> | |||
555 | <key>comment</key> | |||
556 | <value></value> | |||
557 | </param> | |||
558 | <param> | |||
559 | <key>value</key> | |||
560 | <value>0</value> | |||
561 | </param> | |||
562 | <param> | |||
563 | <key>_enabled</key> | |||
564 | <value>True</value> | |||
565 | </param> | |||
566 | <param> | |||
567 | <key>_coordinate</key> | |||
568 | <value>(192, 668)</value> | |||
569 | </param> | |||
570 | <param> | |||
571 | <key>gui_hint</key> | |||
572 | <value>4, 1</value> | |||
573 | </param> | |||
574 | <param> | |||
575 | <key>_rotation</key> | |||
576 | <value>0</value> | |||
577 | </param> | |||
578 | <param> | |||
579 | <key>id</key> | |||
580 | <value>pid_kd</value> | |||
581 | </param> | |||
582 | <param> | |||
583 | <key>label</key> | |||
584 | <value>pid_kd</value> | |||
585 | </param> | |||
586 | <param> | |||
587 | <key>min_len</key> | |||
588 | <value>200</value> | |||
589 | </param> | |||
590 | <param> | |||
591 | <key>orient</key> | |||
592 | <value>Qt.Horizontal</value> | |||
593 | </param> | |||
594 | <param> | |||
595 | <key>start</key> | |||
596 | <value>0</value> | |||
597 | </param> | |||
598 | <param> | |||
599 | <key>step</key> | |||
600 | <value>1</value> | |||
601 | </param> | |||
602 | <param> | |||
603 | <key>stop</key> | |||
604 | <value>2**14-1</value> | |||
605 | </param> | |||
606 | <param> | |||
607 | <key>rangeType</key> | |||
608 | <value>int</value> | |||
609 | </param> | |||
610 | <param> | |||
611 | <key>widget</key> | |||
612 | <value>counter_slider</value> | |||
613 | </param> | |||
614 | </block> | |||
615 | <block> | |||
616 | <key>variable_qtgui_range</key> | |||
617 | <param> | |||
618 | <key>comment</key> | |||
619 | <value></value> | |||
620 | </param> | |||
621 | <param> | |||
622 | <key>value</key> | |||
623 | <value>0</value> | |||
624 | </param> | |||
625 | <param> | |||
626 | <key>_enabled</key> | |||
627 | <value>True</value> | |||
628 | </param> | |||
629 | <param> | |||
630 | <key>_coordinate</key> | |||
631 | <value>(192, 460)</value> | |||
632 | </param> | |||
633 | <param> | |||
634 | <key>gui_hint</key> | |||
635 | <value>3, 1</value> | |||
636 | </param> | |||
637 | <param> | |||
638 | <key>_rotation</key> | |||
639 | <value>0</value> | |||
640 | </param> | |||
641 | <param> | |||
642 | <key>id</key> | |||
643 | <value>pid_ki</value> | |||
644 | </param> | |||
645 | <param> | |||
646 | <key>label</key> | |||
647 | <value>pid_ki</value> | |||
648 | </param> | |||
649 | <param> | |||
650 | <key>min_len</key> | |||
651 | <value>200</value> | |||
652 | </param> | |||
653 | <param> | |||
654 | <key>orient</key> | |||
655 | <value>Qt.Horizontal</value> | |||
656 | </param> | |||
657 | <param> | |||
658 | <key>start</key> | |||
659 | <value>0</value> | |||
660 | </param> | |||
661 | <param> | |||
662 | <key>step</key> | |||
663 | <value>1</value> | |||
664 | </param> | |||
665 | <param> | |||
666 | <key>stop</key> | |||
667 | <value>2**14-1</value> | |||
668 | </param> | |||
669 | <param> | |||
670 | <key>rangeType</key> | |||
671 | <value>int</value> | |||
672 | </param> | |||
673 | <param> | |||
674 | <key>widget</key> | |||
675 | <value>counter_slider</value> | |||
676 | </param> | |||
677 | </block> | |||
678 | <block> | |||
679 | <key>variable_qtgui_range</key> | |||
680 | <param> | |||
681 | <key>comment</key> | |||
682 | <value></value> | |||
683 | </param> | |||
684 | <param> | |||
685 | <key>value</key> | |||
686 | <value>0</value> | |||
687 | </param> | |||
688 | <param> | |||
689 | <key>_enabled</key> | |||
690 | <value>True</value> | |||
691 | </param> | |||
692 | <param> | |||
693 | <key>_coordinate</key> | |||
694 | <value>(200, 236)</value> | |||
695 | </param> | |||
696 | <param> | |||
697 | <key>gui_hint</key> | |||
698 | <value>2, 1</value> | |||
699 | </param> | |||
700 | <param> | |||
701 | <key>_rotation</key> | |||
702 | <value>0</value> | |||
703 | </param> | |||
704 | <param> | |||
705 | <key>id</key> | |||
706 | <value>pid_kp</value> | |||
707 | </param> | |||
708 | <param> | |||
709 | <key>label</key> | |||
710 | <value>pid_kp</value> | |||
711 | </param> | |||
712 | <param> | |||
713 | <key>min_len</key> | |||
714 | <value>200</value> | |||
715 | </param> | |||
716 | <param> | |||
717 | <key>orient</key> | |||
718 | <value>Qt.Horizontal</value> | |||
719 | </param> | |||
720 | <param> | |||
721 | <key>start</key> | |||
722 | <value>0</value> | |||
723 | </param> | |||
724 | <param> | |||
725 | <key>step</key> | |||
726 | <value>1</value> | |||
727 | </param> | |||
728 | <param> | |||
729 | <key>stop</key> | |||
730 | <value>2**14-1</value> | |||
731 | </param> | |||
732 | <param> | |||
733 | <key>rangeType</key> | |||
734 | <value>int</value> | |||
735 | </param> | |||
736 | <param> | |||
737 | <key>widget</key> | |||
738 | <value>counter_slider</value> | |||
739 | </param> | |||
740 | </block> | |||
741 | <block> | |||
742 | <key>variable_qtgui_push_button</key> | |||
743 | <param> | |||
744 | <key>comment</key> | |||
745 | <value></value> | |||
746 | </param> | |||
747 | <param> | |||
748 | <key>value</key> | |||
749 | <value>0</value> | |||
750 | </param> | |||
751 | <param> | |||
752 | <key>_enabled</key> | |||
753 | <value>True</value> | |||
754 | </param> | |||
755 | <param> | |||
756 | <key>_coordinate</key> | |||
757 | <value>(392, 684)</value> | |||
758 | </param> | |||
759 | <param> | |||
760 | <key>gui_hint</key> | |||
761 | <value>4, 2</value> | |||
762 | </param> | |||
763 | <param> | |||
764 | <key>_rotation</key> | |||
765 | <value>0</value> | |||
766 | </param> | |||
767 | <param> | |||
768 | <key>id</key> | |||
769 | <value>pid_rst_int</value> | |||
770 | </param> | |||
771 | <param> | |||
772 | <key>label</key> | |||
773 | <value>pid_rst_int</value> | |||
774 | </param> | |||
775 | <param> | |||
776 | <key>pressed</key> | |||
777 | <value>1</value> | |||
778 | </param> | |||
779 | <param> | |||
780 | <key>released</key> | |||
781 | <value>0</value> | |||
782 | </param> | |||
783 | <param> | |||
784 | <key>type</key> | |||
785 | <value>int</value> | |||
786 | </param> | |||
787 | </block> | |||
788 | <block> | |||
789 | <key>variable_qtgui_range</key> | |||
790 | <param> | |||
791 | <key>comment</key> | |||
792 | <value></value> | |||
793 | </param> | |||
794 | <param> | |||
795 | <key>value</key> | |||
796 | <value>0</value> | |||
797 | </param> | |||
798 | <param> | |||
799 | <key>_enabled</key> | |||
800 | <value>True</value> | |||
801 | </param> | |||
802 | <param> | |||
803 | <key>_coordinate</key> | |||
804 | <value>(400, 236)</value> | |||
805 | </param> | |||
806 | <param> | |||
807 | <key>gui_hint</key> | |||
808 | <value>2, 2</value> | |||
809 | </param> | |||
810 | <param> | |||
811 | <key>_rotation</key> | |||
812 | <value>0</value> | |||
813 | </param> | |||
814 | <param> | |||
815 | <key>id</key> | |||
816 | <value>pid_setpoint</value> | |||
817 | </param> | |||
818 | <param> | |||
819 | <key>label</key> | |||
820 | <value>pid_setpoint</value> | |||
821 | </param> | |||
822 | <param> | |||
823 | <key>min_len</key> | |||
824 | <value>200</value> | |||
825 | </param> | |||
826 | <param> | |||
827 | <key>orient</key> | |||
828 | <value>Qt.Horizontal</value> | |||
829 | </param> | |||
830 | <param> | |||
831 | <key>start</key> | |||
832 | <value>-2**13</value> | |||
833 | </param> | |||
834 | <param> | |||
835 | <key>step</key> | |||
836 | <value>1</value> | |||
837 | </param> | |||
838 | <param> | |||
839 | <key>stop</key> | |||
840 | <value>2**13-1</value> | |||
841 | </param> | |||
842 | <param> | |||
843 | <key>rangeType</key> | |||
844 | <value>int</value> | |||
845 | </param> | |||
846 | <param> | |||
847 | <key>widget</key> | |||
848 | <value>counter_slider</value> | |||
849 | </param> | |||
850 | </block> | |||
851 | <block> | |||
852 | <key>variable_qtgui_check_box</key> | |||
853 | <param> | |||
854 | <key>comment</key> | |||
855 | <value></value> | |||
856 | </param> | |||
857 | <param> | |||
858 | <key>value</key> | |||
859 | <value>0</value> | |||
860 | </param> | |||
861 | <param> | |||
862 | <key>_enabled</key> | |||
863 | <value>True</value> | |||
864 | </param> | |||
865 | <param> | |||
866 | <key>false</key> | |||
867 | <value>0</value> | |||
868 | </param> | |||
869 | <param> | |||
870 | <key>_coordinate</key> | |||
871 | <value>(400, 468)</value> | |||
872 | </param> | |||
873 | <param> | |||
874 | <key>gui_hint</key> | |||
875 | <value>3, 2</value> | |||
876 | </param> | |||
877 | <param> | |||
878 | <key>_rotation</key> | |||
879 | <value>0</value> | |||
880 | </param> | |||
881 | <param> | |||
882 | <key>id</key> | |||
883 | <value>pid_sign</value> | |||
884 | </param> | |||
885 | <param> | |||
886 | <key>label</key> | |||
887 | <value>pid_sign</value> | |||
888 | </param> | |||
889 | <param> | |||
890 | <key>true</key> | |||
891 | <value>1</value> | |||
892 | </param> | |||
893 | <param> | |||
894 | <key>type</key> | |||
895 | <value>int</value> | |||
896 | </param> | |||
897 | </block> | |||
898 | <block> | |||
899 | <key>variable_qtgui_check_box</key> | |||
900 | <param> | |||
901 | <key>comment</key> | |||
902 | <value></value> | |||
903 | </param> | |||
904 | <param> | |||
905 | <key>value</key> | |||
906 | <value>0</value> | |||
907 | </param> | |||
908 | <param> | |||
909 | <key>_enabled</key> | |||
910 | <value>True</value> | |||
911 | </param> | |||
912 | <param> | |||
913 | <key>false</key> | |||
914 | <value>0</value> | |||
915 | </param> | |||
916 | <param> | |||
917 | <key>_coordinate</key> | |||
918 | <value>(960, 12)</value> | |||
919 | </param> | |||
920 | <param> | |||
921 | <key>gui_hint</key> | |||
922 | <value>1, 4</value> | |||
923 | </param> | |||
924 | <param> | |||
925 | <key>_rotation</key> | |||
926 | <value>0</value> | |||
927 | </param> | |||
928 | <param> | |||
929 | <key>id</key> | |||
930 | <value>pinc</value> | |||
931 | </param> | |||
932 | <param> | |||
933 | <key>label</key> | |||
934 | <value>pinc</value> | |||
935 | </param> | |||
936 | <param> | |||
937 | <key>true</key> | |||
938 | <value>1</value> | |||
939 | </param> | |||
940 | <param> | |||
941 | <key>type</key> | |||
942 | <value>int</value> | |||
943 | </param> | |||
944 | </block> | |||
945 | <block> | |||
946 | <key>variable_qtgui_check_box</key> | |||
947 | <param> | |||
948 | <key>comment</key> | |||
949 | <value></value> | |||
950 | </param> | |||
951 | <param> | |||
952 | <key>value</key> | |||
953 | <value>0</value> | |||
954 | </param> | |||
955 | <param> | |||
956 | <key>_enabled</key> | |||
957 | <value>True</value> | |||
958 | </param> | |||
959 | <param> | |||
960 | <key>false</key> | |||
961 | <value>0</value> | |||
962 | </param> | |||
963 | <param> | |||
964 | <key>_coordinate</key> | |||
965 | <value>(952, 164)</value> | |||
966 | </param> | |||
967 | <param> | |||
968 | <key>gui_hint</key> | |||
969 | <value>2, 4</value> | |||
970 | </param> | |||
971 | <param> | |||
972 | <key>_rotation</key> | |||
973 | <value>0</value> | |||
974 | </param> | |||
975 | <param> | |||
976 | <key>id</key> | |||
977 | <value>poff</value> | |||
978 | </param> | |||
979 | <param> | |||
980 | <key>label</key> | |||
981 | <value>poff</value> | |||
982 | </param> | |||
983 | <param> | |||
984 | <key>true</key> | |||
985 | <value>1</value> | |||
986 | </param> | |||
987 | <param> | |||
988 | <key>type</key> | |||
989 | <value>int</value> | |||
990 | </param> | |||
991 | </block> | |||
992 | <block> | |||
993 | <key>variable</key> | |||
994 | <param> | |||
995 | <key>comment</key> | |||
996 | <value></value> | |||
997 | </param> | |||
998 | <param> | |||
999 | <key>_enabled</key> | |||
1000 | <value>True</value> | |||
1001 | </param> | |||
1002 | <param> | |||
1003 | <key>_coordinate</key> | |||
1004 | <value>(8, 176)</value> | |||
1005 | </param> | |||
1006 | <param> | |||
1007 | <key>_rotation</key> | |||
1008 | <value>0</value> | |||
1009 | </param> | |||
1010 | <param> | |||
1011 | <key>id</key> | |||
1012 | <value>port</value> | |||
1013 | </param> | |||
1014 | <param> | |||
1015 | <key>value</key> | |||
1016 | <value>1001</value> | |||
1017 | </param> | |||
1018 | </block> | |||
1019 | <block> | |||
1020 | <key>add_const_set_offset</key> | |||
1021 | <param> | |||
1022 | <key>addr</key> | |||
1023 | <value>addr</value> | |||
1024 | </param> | |||
1025 | <param> | |||
1026 | <key>alias</key> | |||
1027 | <value></value> | |||
1028 | </param> | |||
1029 | <param> | |||
1030 | <key>comment</key> | |||
1031 | <value></value> | |||
1032 | </param> | |||
1033 | <param> | |||
1034 | <key>const</key> | |||
1035 | <value>adc1_offset</value> | |||
1036 | </param> | |||
1037 | <param> | |||
1038 | <key>device</key> | |||
1039 | <value>/dev/adc1_offset</value> | |||
1040 | </param> | |||
1041 | <param> | |||
1042 | <key>_enabled</key> | |||
1043 | <value>True</value> | |||
1044 | </param> | |||
1045 | <param> | |||
1046 | <key>_coordinate</key> | |||
1047 | <value>(200, 144)</value> | |||
1048 | </param> | |||
1049 | <param> | |||
1050 | <key>_rotation</key> | |||
1051 | <value>0</value> | |||
1052 | </param> | |||
1053 | <param> | |||
1054 | <key>id</key> | |||
1055 | <value>add_const_set_offset_0_0_0</value> | |||
1056 | </param> | |||
1057 | <param> | |||
1058 | <key>port</key> | |||
1059 | <value>port</value> | |||
1060 | </param> | |||
1061 | </block> | |||
1062 | <block> | |||
1063 | <key>add_const_set_offset</key> | |||
1064 | <param> | |||
1065 | <key>addr</key> | |||
1066 | <value>addr</value> | |||
1067 | </param> | |||
1068 | <param> | |||
1069 | <key>alias</key> | |||
1070 | <value></value> | |||
1071 | </param> | |||
1072 | <param> | |||
1073 | <key>comment</key> | |||
1074 | <value></value> | |||
1075 | </param> | |||
1076 | <param> | |||
1077 | <key>const</key> | |||
1078 | <value>dac1_offset</value> | |||
1079 | </param> | |||
1080 | <param> | |||
1081 | <key>device</key> | |||
1082 | <value>/dev/dac1_offset</value> | |||
1083 | </param> | |||
1084 | <param> | |||
1085 | <key>_enabled</key> | |||
1086 | <value>True</value> | |||
1087 | </param> | |||
1088 | <param> | |||
1089 | <key>_coordinate</key> | |||
1090 | <value>(384, 144)</value> | |||
1091 | </param> | |||
1092 | <param> | |||
1093 | <key>_rotation</key> | |||
1094 | <value>0</value> | |||
1095 | </param> | |||
1096 | <param> | |||
1097 | <key>id</key> | |||
1098 | <value>add_const_set_offset_0_0_0_0</value> | |||
1099 | </param> | |||
1100 | <param> | |||
1101 | <key>port</key> | |||
1102 | <value>port</value> | |||
1103 | </param> | |||
1104 | </block> | |||
1105 | <block> | |||
1106 | <key>add_const_set_offset</key> | |||
1107 | <param> | |||
1108 | <key>addr</key> | |||
1109 | <value>addr</value> | |||
1110 | </param> | |||
1111 | <param> | |||
1112 | <key>alias</key> | |||
1113 | <value></value> | |||
1114 | </param> | |||
1115 | <param> | |||
1116 | <key>comment</key> | |||
1117 | <value></value> | |||
1118 | </param> | |||
1119 | <param> | |||
1120 | <key>const</key> | |||
1121 | <value>dds_ampl</value> | |||
1122 | </param> | |||
1123 | <param> | |||
1124 | <key>device</key> | |||
1125 | <value>/dev/dds_ampl</value> | |||
1126 | </param> | |||
1127 | <param> | |||
1128 | <key>_enabled</key> | |||
1129 | <value>True</value> | |||
1130 | </param> | |||
1131 | <param> | |||
1132 | <key>_coordinate</key> | |||
1133 | <value>(688, 144)</value> | |||
1134 | </param> | |||
1135 | <param> | |||
1136 | <key>_rotation</key> | |||
1137 | <value>0</value> | |||
1138 | </param> | |||
1139 | <param> | |||
1140 | <key>id</key> | |||
1141 | <value>add_const_set_offset_0_0_0_0_0</value> | |||
1142 | </param> | |||
1143 | <param> | |||
1144 | <key>port</key> | |||
1145 | <value>port</value> | |||
1146 | </param> | |||
1147 | </block> | |||
1148 | <block> | |||
1149 | <key>add_const_set_offset</key> | |||
1150 | <param> | |||
1151 | <key>addr</key> | |||
1152 | <value>addr</value> | |||
1153 | </param> | |||
1154 | <param> | |||
1155 | <key>alias</key> | |||
1156 | <value></value> | |||
1157 | </param> | |||
1158 | <param> | |||
1159 | <key>comment</key> | |||
1160 | <value></value> | |||
1161 | </param> | |||
1162 | <param> | |||
1163 | <key>const</key> | |||
1164 | <value>dds_offset</value> | |||
1165 | </param> | |||
1166 | <param> | |||
1167 | <key>device</key> | |||
1168 | <value>/dev/dds_offset</value> | |||
1169 | </param> | |||
1170 | <param> | |||
1171 | <key>_enabled</key> | |||
1172 | <value>True</value> | |||
1173 | </param> | |||
1174 | <param> | |||
1175 | <key>_coordinate</key> | |||
1176 | <value>(688, 596)</value> | |||
1177 | </param> | |||
1178 | <param> | |||
1179 | <key>_rotation</key> | |||
1180 | <value>0</value> | |||
1181 | </param> | |||
1182 | <param> | |||
1183 | <key>id</key> | |||
1184 | <value>add_const_set_offset_0_0_0_0_1</value> | |||
1185 | </param> | |||
1186 | <param> | |||
1187 | <key>port</key> | |||
1188 | <value>port</value> | |||
1189 | </param> | |||
1190 | </block> | |||
1191 | <block> | |||
1192 | <key>add_const_set_offset</key> | |||
1193 | <param> | |||
1194 | <key>addr</key> | |||
1195 | <value>addr</value> | |||
1196 | </param> | |||
1197 | <param> | |||
1198 | <key>alias</key> | |||
1199 | <value></value> | |||
1200 | </param> | |||
1201 | <param> | |||
1202 | <key>comment</key> | |||
1203 | <value></value> | |||
1204 | </param> | |||
1205 | <param> | |||
1206 | <key>const</key> | |||
1207 | <value>int(dds_f0/(125e6/2**32))</value> | |||
1208 | </param> | |||
1209 | <param> | |||
1210 | <key>device</key> | |||
1211 | <value>/dev/dds_f0</value> | |||
1212 | </param> | |||
1213 | <param> | |||
1214 | <key>_enabled</key> | |||
1215 | <value>True</value> | |||
1216 | </param> | |||
1217 | <param> | |||
1218 | <key>_coordinate</key> | |||
1219 | <value>(680, 804)</value> | |||
1220 | </param> | |||
1221 | <param> | |||
1222 | <key>_rotation</key> | |||
1223 | <value>0</value> | |||
1224 | </param> | |||
1225 | <param> | |||
1226 | <key>id</key> | |||
1227 | <value>add_const_set_offset_0_0_0_0_1_0</value> | |||
1228 | </param> | |||
1229 | <param> | |||
1230 | <key>port</key> | |||
1231 | <value>port</value> | |||
1232 | </param> | |||
1233 | </block> | |||
1234 | <block> | |||
1235 | <key>add_const_set_offset</key> | |||
1236 | <param> | |||
1237 | <key>addr</key> | |||
1238 | <value>addr</value> | |||
1239 | </param> | |||
1240 | <param> | |||
1241 | <key>alias</key> | |||
1242 | <value></value> | |||
1243 | </param> | |||
1244 | <param> | |||
1245 | <key>comment</key> | |||
1246 | <value></value> | |||
1247 | </param> | |||
1248 | <param> | |||
1249 | <key>const</key> | |||
1250 | <value>dds_range</value> | |||
1251 | </param> | |||
1252 | <param> | |||
1253 | <key>device</key> | |||
1254 | <value>/dev/dds_range</value> | |||
1255 | </param> | |||
1256 | <param> | |||
1257 | <key>_enabled</key> | |||
1258 | <value>True</value> | |||
1259 | </param> | |||
1260 | <param> | |||
1261 | <key>_coordinate</key> | |||
1262 | <value>(712, 924)</value> | |||
1263 | </param> | |||
1264 | <param> | |||
1265 | <key>_rotation</key> | |||
1266 | <value>0</value> | |||
1267 | </param> | |||
1268 | <param> | |||
1269 | <key>id</key> | |||
1270 | <value>add_const_set_offset_0_0_0_0_1_0_0</value> | |||
1271 | </param> | |||
1272 | <param> | |||
1273 | <key>port</key> | |||
1274 | <value>port</value> | |||
1275 | </param> | |||
1276 | </block> | |||
1277 | <block> | |||
1278 | <key>add_const_set_offset</key> | |||
1279 | <param> | |||
1280 | <key>addr</key> | |||
1281 | <value>addr</value> | |||
1282 | </param> | |||
1283 | <param> | |||
1284 | <key>alias</key> | |||
1285 | <value></value> | |||
1286 | </param> | |||
1287 | <param> | |||
1288 | <key>comment</key> | |||
1289 | <value></value> | |||
1290 | </param> | |||
1291 | <param> | |||
1292 | <key>const</key> | |||
1293 | <value>pid_setpoint</value> | |||
1294 | </param> | |||
1295 | <param> | |||
1296 | <key>device</key> | |||
1297 | <value>/dev/pid_setpoint</value> | |||
1298 | </param> | |||
1299 | <param> | |||
1300 | <key>_enabled</key> | |||
1301 | <value>True</value> | |||
1302 | </param> | |||
1303 | <param> | |||
1304 | <key>_coordinate</key> | |||
1305 | <value>(384, 372)</value> | |||
1306 | </param> | |||
1307 | <param> | |||
1308 | <key>_rotation</key> | |||
1309 | <value>0</value> | |||
1310 | </param> | |||
1311 | <param> | |||
1312 | <key>id</key> | |||
1313 | <value>add_const_set_offset_0_0_0_1</value> | |||
1314 | </param> | |||
1315 | <param> | |||
1316 | <key>port</key> | |||
1317 | <value>port</value> | |||
1318 | </param> | |||
1319 | </block> | |||
1320 | <block> | |||
1321 | <key>add_const_set_offset</key> | |||
1322 | <param> | |||
1323 | <key>addr</key> | |||
1324 | <value>addr</value> | |||
1325 | </param> | |||
1326 | <param> | |||
1327 | <key>alias</key> | |||
1328 | <value></value> | |||
1329 | </param> | |||
1330 | <param> | |||
1331 | <key>comment</key> | |||
1332 | <value></value> | |||
1333 | </param> | |||
1334 | <param> | |||
1335 | <key>const</key> | |||
1336 | <value>pid_kp</value> | |||
1337 | </param> | |||
1338 | <param> | |||
1339 | <key>device</key> | |||
1340 | <value>/dev/pid_kp</value> | |||
1341 | </param> | |||
1342 | <param> | |||
1343 | <key>_enabled</key> | |||
1344 | <value>True</value> | |||
1345 | </param> | |||
1346 | <param> | |||
1347 | <key>_coordinate</key> | |||
1348 | <value>(184, 372)</value> | |||
1349 | </param> | |||
1350 | <param> | |||
1351 | <key>_rotation</key> | |||
1352 | <value>0</value> | |||
1353 | </param> | |||
1354 | <param> | |||
1355 | <key>id</key> | |||
1356 | <value>add_const_set_offset_0_0_0_1_0</value> | |||
1357 | </param> | |||
1358 | <param> | |||
1359 | <key>port</key> | |||
1360 | <value>port</value> | |||
1361 | </param> | |||
1362 | </block> | |||
1363 | <block> | |||
1364 | <key>add_const_set_offset</key> | |||
1365 | <param> | |||
1366 | <key>addr</key> | |||
1367 | <value>addr</value> | |||
1368 | </param> | |||
1369 | <param> | |||
1370 | <key>alias</key> | |||
1371 | <value></value> | |||
1372 | </param> | |||
1373 | <param> | |||
1374 | <key>comment</key> | |||
1375 | <value></value> | |||
1376 | </param> | |||
1377 | <param> | |||
1378 | <key>const</key> | |||
1379 | <value>pid_ki</value> | |||
1380 | </param> | |||
1381 | <param> | |||
1382 | <key>device</key> | |||
1383 | <value>/dev/pid_ki</value> | |||
1384 | </param> | |||
1385 | <param> | |||
1386 | <key>_enabled</key> | |||
1387 | <value>True</value> | |||
1388 | </param> | |||
1389 | <param> | |||
1390 | <key>_coordinate</key> | |||
1391 | <value>(176, 596)</value> | |||
1392 | </param> | |||
1393 | <param> | |||
1394 | <key>_rotation</key> | |||
1395 | <value>0</value> | |||
1396 | </param> | |||
1397 | <param> | |||
1398 | <key>id</key> | |||
1399 | <value>add_const_set_offset_0_0_0_1_0_0</value> | |||
1400 | </param> | |||
1401 | <param> | |||
1402 | <key>port</key> | |||
1403 | <value>port</value> | |||
1404 | </param> | |||
1405 | </block> | |||
1406 | <block> | |||
1407 | <key>add_const_set_offset</key> | |||
1408 | <param> | |||
1409 | <key>addr</key> | |||
1410 | <value>addr</value> | |||
1411 | </param> | |||
1412 | <param> | |||
1413 | <key>alias</key> | |||
1414 | <value></value> | |||
1415 | </param> | |||
1416 | <param> | |||
1417 | <key>comment</key> | |||
1418 | <value></value> | |||
1419 | </param> | |||
1420 | <param> | |||
1421 | <key>const</key> | |||
1422 | <value>pid_kd</value> | |||
1423 | </param> | |||
1424 | <param> | |||
1425 | <key>device</key> | |||
1426 | <value>/dev/pid_kd</value> | |||
1427 | </param> | |||
1428 | <param> | |||
1429 | <key>_enabled</key> | |||
1430 | <value>True</value> | |||
1431 | </param> | |||
1432 | <param> | |||
1433 | <key>_coordinate</key> | |||
1434 | <value>(176, 804)</value> | |||
1435 | </param> | |||
1436 | <param> | |||
1437 | <key>_rotation</key> | |||
1438 | <value>0</value> | |||
1439 | </param> | |||
1440 | <param> | |||
1441 | <key>id</key> | |||
1442 | <value>add_const_set_offset_0_0_0_1_0_0_0</value> | |||
1443 | </param> | |||
1444 | <param> | |||
1445 | <key>port</key> | |||
1446 | <value>port</value> | |||
1447 | </param> | |||
1448 | </block> | |||
1449 | <block> | |||
1450 | <key>add_const_set_offset</key> | |||
1451 | <param> | |||
1452 | <key>addr</key> | |||
1453 | <value>addr</value> | |||
1454 | </param> | |||
1455 | <param> | |||
1456 | <key>alias</key> | |||
1457 | <value></value> | |||
1458 | </param> | |||
1459 | <param> | |||
1460 | <key>comment</key> | |||
1461 | <value></value> | |||
1462 | </param> | |||
1463 | <param> | |||
1464 | <key>const</key> | |||
1465 | <value>pid_sign</value> | |||
1466 | </param> | |||
1467 | <param> | |||
1468 | <key>device</key> | |||
1469 | <value>/dev/pid_sign</value> | |||
1470 | </param> | |||
1471 | <param> | |||
1472 | <key>_enabled</key> | |||
1473 | <value>True</value> | |||
1474 | </param> | |||
1475 | <param> | |||
1476 | <key>_coordinate</key> | |||
1477 | <value>(392, 596)</value> | |||
1478 | </param> | |||
1479 | <param> | |||
1480 | <key>_rotation</key> | |||
1481 | <value>0</value> | |||
1482 | </param> | |||
1483 | <param> | |||
1484 | <key>id</key> | |||
1485 | <value>add_const_set_offset_0_0_0_1_0_0_0_0</value> | |||
1486 | </param> | |||
1487 | <param> | |||
1488 | <key>port</key> | |||
1489 | <value>port</value> | |||
1490 | </param> | |||
1491 | </block> | |||
1492 | <block> | |||
1493 | <key>add_const_set_offset</key> | |||
1494 | <param> | |||
1495 | <key>addr</key> | |||
1496 | <value>addr</value> | |||
1497 | </param> | |||
1498 | <param> | |||
1499 | <key>alias</key> | |||
1500 | <value></value> | |||
1501 | </param> | |||
1502 | <param> | |||
1503 | <key>comment</key> | |||
1504 | <value></value> | |||
1505 | </param> | |||
1506 | <param> | |||
1507 | <key>const</key> | |||
1508 | <value>pid_rst_int</value> | |||
1509 | </param> | |||
1510 | <param> | |||
1511 | <key>device</key> | |||
1512 | <value>/dev/pid_rst_int</value> | |||
1513 | </param> | |||
1514 | <param> | |||
1515 | <key>_enabled</key> | |||
1516 | <value>True</value> | |||
1517 | </param> | |||
1518 | <param> | |||
1519 | <key>_coordinate</key> | |||
1520 | <value>(392, 804)</value> | |||
1521 | </param> | |||
1522 | <param> | |||
1523 | <key>_rotation</key> | |||
1524 | <value>0</value> | |||
1525 | </param> | |||
1526 | <param> | |||
1527 | <key>id</key> | |||
1528 | <value>add_const_set_offset_0_0_0_1_0_0_0_0_0</value> | |||
1529 | </param> | |||
1530 | <param> | |||
1531 | <key>port</key> | |||
1532 | <value>port</value> | |||
1533 | </param> | |||
1534 | </block> | |||
1535 | <block> | |||
1536 | <key>nco_counter_send_conf</key> | |||
1537 | <param> | |||
1538 | <key>acc_size</key> | |||
1539 | <value>32</value> | |||
1540 | </param> | |||
1541 | <param> | |||
1542 | <key>addr</key> | |||
1543 | <value>addr</value> | |||
1544 | </param> | |||
1545 | <param> | |||
1546 | <key>alias</key> | |||
1547 | <value></value> | |||
1548 | </param> | |||
1549 | <param> | |||
1550 | <key>comment</key> | |||
1551 | <value></value> | |||
1552 | </param> | |||
1553 | <param> | |||
1554 | <key>device</key> | |||
1555 | <value>/dev/dds_nco</value> | |||
1556 | </param> | |||
1557 | <param> | |||
1558 | <key>_enabled</key> | |||
1559 | <value>True</value> | |||
1560 | </param> | |||
1561 | <param> | |||
1562 | <key>freq_dds</key> | |||
1563 | <value>dds_nco</value> | |||
1564 | </param> | |||
1565 | <param> | |||
1566 | <key>freq_ref</key> | |||
1567 | <value>125000000</value> | |||
1568 | </param> | |||
1569 | <param> | |||
1570 | <key>_coordinate</key> | |||
1571 | <value>(672, 344)</value> | |||
1572 | </param> | |||
1573 | <param> | |||
1574 | <key>_rotation</key> | |||
1575 | <value>0</value> | |||
1576 | </param> | |||
1577 | <param> | |||
1578 | <key>id</key> | |||
1579 | <value>nco_counter_send_conf_0</value> | |||
1580 | </param> | |||
1581 | <param> | |||
1582 | <key>offset</key> | |||
1583 | <value>0</value> | |||
1584 | </param> | |||
1585 | <param> | |||
1586 | <key>pinc_sw</key> | |||
1587 | <value>pinc</value> | |||
1588 | </param> | |||
1589 | <param> | |||
1590 | <key>poff_sw</key> | |||
1591 | <value>poff</value> | |||
1592 | </param> | |||
1593 | <param> | |||
1594 | <key>port</key> | |||
1595 | <value>port</value> | |||
1596 | </param> | |||
1597 | </block> | |||
1598 | </flow_graph> |
redpitaya/client/pid_vco.py
File was created | 1 | #!/usr/bin/env python2 | ||
2 | # -*- coding: utf-8 -*- | |||
3 | ################################################## | |||
4 | # GNU Radio Python Flow Graph | |||
5 | # Title: Pid Vco | |||
6 | # Generated: Tue Apr 11 15:32:11 2017 | |||
7 | ################################################## | |||
8 | ||||
9 | if __name__ == '__main__': | |||
10 | import ctypes | |||
11 | import sys | |||
12 | if sys.platform.startswith('linux'): | |||
13 | try: | |||
14 | x11 = ctypes.cdll.LoadLibrary('libX11.so') | |||
15 | x11.XInitThreads() | |||
16 | except: | |||
17 | print "Warning: failed to XInitThreads()" | |||
18 | ||||
19 | from PyQt4 import Qt | |||
20 | from gnuradio import eng_notation | |||
21 | from gnuradio import gr | |||
22 | from gnuradio.eng_option import eng_option | |||
23 | from gnuradio.filter import firdes | |||
24 | from gnuradio.qtgui import Range, RangeWidget | |||
25 | from optparse import OptionParser | |||
26 | import redpitaya_gnuradio | |||
27 | import sys | |||
28 | ||||
29 | ||||
30 | class pid_vco(gr.top_block, Qt.QWidget): | |||
31 | ||||
32 | def __init__(self): | |||
33 | gr.top_block.__init__(self, "Pid Vco") | |||
34 | Qt.QWidget.__init__(self) | |||
35 | self.setWindowTitle("Pid Vco") | |||
36 | try: | |||
37 | self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) | |||
38 | except: | |||
39 | pass | |||
40 | self.top_scroll_layout = Qt.QVBoxLayout() | |||
41 | self.setLayout(self.top_scroll_layout) | |||
42 | self.top_scroll = Qt.QScrollArea() | |||
43 | self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) | |||
44 | self.top_scroll_layout.addWidget(self.top_scroll) | |||
45 | self.top_scroll.setWidgetResizable(True) | |||
46 | self.top_widget = Qt.QWidget() | |||
47 | self.top_scroll.setWidget(self.top_widget) | |||
48 | self.top_layout = Qt.QVBoxLayout(self.top_widget) | |||
49 | self.top_grid_layout = Qt.QGridLayout() | |||
50 | self.top_layout.addLayout(self.top_grid_layout) | |||
51 | ||||
52 | self.settings = Qt.QSettings("GNU Radio", "pid_vco") | |||
53 | self.restoreGeometry(self.settings.value("geometry").toByteArray()) | |||
54 | ||||
55 | ################################################## | |||
56 | # Variables | |||
57 | ################################################## | |||
58 | self.port = port = 1001 | |||
59 | self.poff = poff = 0 | |||
60 | self.pinc = pinc = 0 | |||
61 | self.pid_sign = pid_sign = 0 | |||
62 | self.pid_setpoint = pid_setpoint = 0 | |||
63 | self.pid_rst_int = pid_rst_int = 0 | |||
64 | self.pid_kp = pid_kp = 0 | |||
65 | self.pid_ki = pid_ki = 0 | |||
66 | self.pid_kd = pid_kd = 0 | |||
67 | self.dds_range = dds_range = 0 | |||
68 | self.dds_offset = dds_offset = 0 | |||
69 | self.dds_nco = dds_nco = 0 | |||
70 | self.dds_f0 = dds_f0 = 0 | |||
71 | self.dds_ampl = dds_ampl = 0 | |||
72 | self.dac1_offset = dac1_offset = 0 | |||
73 | self.addr = addr = "192.168.0.203" | |||
74 | self.adc1_offset = adc1_offset = 0 | |||
75 | ||||
76 | ################################################## | |||
77 | # Blocks | |||
78 | ################################################## | |||
79 | _poff_check_box = Qt.QCheckBox('poff') | |||
80 | self._poff_choices = {True: 1, False: 0} | |||
81 | self._poff_choices_inv = dict((v,k) for k,v in self._poff_choices.iteritems()) | |||
82 | self._poff_callback = lambda i: Qt.QMetaObject.invokeMethod(_poff_check_box, "setChecked", Qt.Q_ARG("bool", self._poff_choices_inv[i])) | |||
83 | self._poff_callback(self.poff) | |||
84 | _poff_check_box.stateChanged.connect(lambda i: self.set_poff(self._poff_choices[bool(i)])) | |||
85 | self.top_grid_layout.addWidget(_poff_check_box, 2, 4) | |||
86 | _pinc_check_box = Qt.QCheckBox('pinc') | |||
87 | self._pinc_choices = {True: 1, False: 0} | |||
88 | self._pinc_choices_inv = dict((v,k) for k,v in self._pinc_choices.iteritems()) | |||
89 | self._pinc_callback = lambda i: Qt.QMetaObject.invokeMethod(_pinc_check_box, "setChecked", Qt.Q_ARG("bool", self._pinc_choices_inv[i])) | |||
90 | self._pinc_callback(self.pinc) | |||
91 | _pinc_check_box.stateChanged.connect(lambda i: self.set_pinc(self._pinc_choices[bool(i)])) | |||
92 | self.top_grid_layout.addWidget(_pinc_check_box, 1, 4) | |||
93 | _pid_sign_check_box = Qt.QCheckBox('pid_sign') | |||
94 | self._pid_sign_choices = {True: 1, False: 0} | |||
95 | self._pid_sign_choices_inv = dict((v,k) for k,v in self._pid_sign_choices.iteritems()) | |||
96 | self._pid_sign_callback = lambda i: Qt.QMetaObject.invokeMethod(_pid_sign_check_box, "setChecked", Qt.Q_ARG("bool", self._pid_sign_choices_inv[i])) | |||
97 | self._pid_sign_callback(self.pid_sign) | |||
98 | _pid_sign_check_box.stateChanged.connect(lambda i: self.set_pid_sign(self._pid_sign_choices[bool(i)])) | |||
99 | self.top_grid_layout.addWidget(_pid_sign_check_box, 3, 2) | |||
100 | self._pid_setpoint_range = Range(-2**13, 2**13-1, 1, 0, 200) | |||
101 | self._pid_setpoint_win = RangeWidget(self._pid_setpoint_range, self.set_pid_setpoint, 'pid_setpoint', "counter_slider", int) | |||
102 | self.top_grid_layout.addWidget(self._pid_setpoint_win, 2, 2) | |||
103 | _pid_rst_int_push_button = Qt.QPushButton('pid_rst_int') | |||
104 | self._pid_rst_int_choices = {'Pressed': 1, 'Released': 0} | |||
105 | _pid_rst_int_push_button.pressed.connect(lambda: self.set_pid_rst_int(self._pid_rst_int_choices['Pressed'])) | |||
106 | _pid_rst_int_push_button.released.connect(lambda: self.set_pid_rst_int(self._pid_rst_int_choices['Released'])) | |||
107 | self.top_grid_layout.addWidget(_pid_rst_int_push_button, 4, 2) | |||
108 | self._pid_kp_range = Range(0, 2**14-1, 1, 0, 200) | |||
109 | self._pid_kp_win = RangeWidget(self._pid_kp_range, self.set_pid_kp, 'pid_kp', "counter_slider", int) | |||
110 | self.top_grid_layout.addWidget(self._pid_kp_win, 2, 1) | |||
111 | self._pid_ki_range = Range(0, 2**14-1, 1, 0, 200) | |||
112 | self._pid_ki_win = RangeWidget(self._pid_ki_range, self.set_pid_ki, 'pid_ki', "counter_slider", int) | |||
113 | self.top_grid_layout.addWidget(self._pid_ki_win, 3, 1) | |||
114 | self._pid_kd_range = Range(0, 2**14-1, 1, 0, 200) | |||
115 | self._pid_kd_win = RangeWidget(self._pid_kd_range, self.set_pid_kd, 'pid_kd', "counter_slider", int) | |||
116 | self.top_grid_layout.addWidget(self._pid_kd_win, 4, 1) | |||
117 | self._dds_range_range = Range(-2**13, 2**13-1, 1, 0, 200) | |||
118 | self._dds_range_win = RangeWidget(self._dds_range_range, self.set_dds_range, 'dds_range', "counter_slider", int) | |||
119 | self.top_grid_layout.addWidget(self._dds_range_win, 5, 3) | |||
120 | self._dds_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) | |||
121 | self._dds_offset_win = RangeWidget(self._dds_offset_range, self.set_dds_offset, 'dds_offset', "counter_slider", int) | |||
122 | self.top_grid_layout.addWidget(self._dds_offset_win, 3, 3) | |||
123 | self._dds_nco_range = Range(0, 60000000, 1, 0, 200) | |||
124 | self._dds_nco_win = RangeWidget(self._dds_nco_range, self.set_dds_nco, 'dds_nco', "counter_slider", int) | |||
125 | self.top_grid_layout.addWidget(self._dds_nco_win, 2, 3) | |||
126 | self._dds_f0_range = Range(0, 60000000, 1, 0, 200) | |||
127 | self._dds_f0_win = RangeWidget(self._dds_f0_range, self.set_dds_f0, 'dds_f0', "counter_slider", int) | |||
128 | self.top_grid_layout.addWidget(self._dds_f0_win, 4, 3) | |||
129 | self._dds_ampl_range = Range(0, 2**13-1, 1, 0, 200) | |||
130 | self._dds_ampl_win = RangeWidget(self._dds_ampl_range, self.set_dds_ampl, 'dds_ampl', "counter_slider", int) | |||
131 | self.top_grid_layout.addWidget(self._dds_ampl_win, 1, 3) | |||
132 | self._dac1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) | |||
133 | self._dac1_offset_win = RangeWidget(self._dac1_offset_range, self.set_dac1_offset, 'dac1_offset', "counter_slider", int) | |||
134 | self.top_grid_layout.addWidget(self._dac1_offset_win, 1, 2) | |||
135 | self._adc1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) | |||
136 | self._adc1_offset_win = RangeWidget(self._adc1_offset_range, self.set_adc1_offset, 'adc1_offset', "counter_slider", int) | |||
137 | self.top_grid_layout.addWidget(self._adc1_offset_win, 1, 1) | |||
138 | self.nco_counter_send_conf_0 = redpitaya_gnuradio.nco_counter_send_conf( | |||
139 | addr=addr, | |||
140 | port=port, | |||
141 | device='/dev/dds_nco', | |||
142 | freq_ref=125000000, | |||
143 | freq_dds=dds_nco, | |||
144 | acc_size=32, | |||
145 | offset=0, | |||
146 | pinc_sw=pinc, | |||
147 | poff_sw=poff, | |||
148 | ) | |||
149 | ||||
150 | self.add_const_set_offset_0_0_0_1_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | |||
151 | addr=addr, | |||
152 | port=port, | |||
153 | device='/dev/pid_rst_int', | |||
154 | const=pid_rst_int, | |||
155 | ) | |||
156 | ||||
157 | self.add_const_set_offset_0_0_0_1_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | |||
158 | addr=addr, | |||
159 | port=port, | |||
160 | device='/dev/pid_sign', | |||
161 | const=pid_sign, | |||
162 | ) | |||
163 | ||||
164 | self.add_const_set_offset_0_0_0_1_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | |||
165 | addr=addr, | |||
166 | port=port, | |||
167 | device='/dev/pid_kd', | |||
168 | const=pid_kd, | |||
169 | ) | |||
170 | ||||
171 | self.add_const_set_offset_0_0_0_1_0_0 = redpitaya_gnuradio.add_const_set_offset( | |||
172 | addr=addr, | |||
173 | port=port, | |||
174 | device='/dev/pid_ki', | |||
175 | const=pid_ki, | |||
176 | ) | |||
177 | ||||
178 | self.add_const_set_offset_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset( | |||
179 | addr=addr, | |||
180 | port=port, | |||
181 | device='/dev/pid_kp', | |||
182 | const=pid_kp, | |||
183 | ) | |||
184 | ||||
185 | self.add_const_set_offset_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset( | |||
186 | addr=addr, | |||
187 | port=port, | |||
188 | device='/dev/pid_setpoint', | |||
189 | const=pid_setpoint, | |||
190 | ) | |||
191 | ||||
192 | self.add_const_set_offset_0_0_0_0_1_0_0 = redpitaya_gnuradio.add_const_set_offset( | |||
193 | addr=addr, | |||
194 | port=port, | |||
195 | device='/dev/dds_range', | |||
196 | const=dds_range, | |||
197 | ) | |||
198 | ||||
199 | self.add_const_set_offset_0_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset( | |||
200 | addr=addr, | |||
201 | port=port, | |||
202 | device='/dev/dds_f0', | |||
203 | const=int(dds_f0/(125e6/2**32)), | |||
204 | ) | |||
205 | ||||
206 | self.add_const_set_offset_0_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset( | |||
207 | addr=addr, | |||
208 | port=port, | |||
209 | device='/dev/dds_offset', | |||
210 | const=dds_offset, | |||
211 | ) | |||
212 | ||||
213 | self.add_const_set_offset_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | |||
214 | addr=addr, | |||
215 | port=port, | |||
216 | device='/dev/dds_ampl', | |||
217 | const=dds_ampl, | |||
218 | ) | |||
219 | ||||
220 | self.add_const_set_offset_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | |||
221 | addr=addr, | |||
222 | port=port, | |||
223 | device='/dev/dac1_offset', | |||
224 | const=dac1_offset, | |||
225 | ) | |||
226 | ||||
227 | self.add_const_set_offset_0_0_0 = redpitaya_gnuradio.add_const_set_offset( | |||
228 | addr=addr, | |||
229 | port=port, | |||
230 | device='/dev/adc1_offset', | |||
231 | const=adc1_offset, | |||
232 | ) | |||
233 | ||||
234 | ||||
235 | def closeEvent(self, event): | |||
236 | self.settings = Qt.QSettings("GNU Radio", "pid_vco") | |||
237 | self.settings.setValue("geometry", self.saveGeometry()) | |||
238 | event.accept() | |||
239 | ||||
240 | def get_port(self): | |||
241 | return self.port | |||
242 | ||||
243 | def set_port(self, port): | |||
244 | self.port = port | |||
245 | ||||
246 | def get_poff(self): | |||
247 | return self.poff | |||
248 | ||||
249 | def set_poff(self, poff): | |||
250 | self.poff = poff | |||
251 | self._poff_callback(self.poff) | |||
252 | self.nco_counter_send_conf_0.set_nco(device='/dev/dds_nco', freq_ref=125000000, freq_dds=self.dds_nco, acc_size=32, offset=0, pinc_sw=self.pinc, poff_sw=self.poff) | |||
253 | ||||
254 | def get_pinc(self): | |||
255 | return self.pinc | |||
256 | ||||
257 | def set_pinc(self, pinc): | |||
258 | self.pinc = pinc | |||
259 | self._pinc_callback(self.pinc) | |||
260 | self.nco_counter_send_conf_0.set_nco(device='/dev/dds_nco', freq_ref=125000000, freq_dds=self.dds_nco, acc_size=32, offset=0, pinc_sw=self.pinc, poff_sw=self.poff) | |||
261 | ||||
262 | def get_pid_sign(self): | |||
263 | return self.pid_sign | |||
264 | ||||
265 | def set_pid_sign(self, pid_sign): | |||
266 | self.pid_sign = pid_sign | |||
267 | self._pid_sign_callback(self.pid_sign) | |||
268 | self.add_const_set_offset_0_0_0_1_0_0_0_0.set_const(device='/dev/pid_sign', const=self.pid_sign) | |||
269 | ||||
270 | def get_pid_setpoint(self): | |||
271 | return self.pid_setpoint | |||
272 | ||||
273 | def set_pid_setpoint(self, pid_setpoint): | |||
274 | self.pid_setpoint = pid_setpoint | |||
275 | self.add_const_set_offset_0_0_0_1.set_const(device='/dev/pid_setpoint', const=self.pid_setpoint) | |||
276 | ||||
277 | def get_pid_rst_int(self): | |||
278 | return self.pid_rst_int | |||
279 | ||||
280 | def set_pid_rst_int(self, pid_rst_int): | |||
281 | self.pid_rst_int = pid_rst_int | |||
282 | self.add_const_set_offset_0_0_0_1_0_0_0_0_0.set_const(device='/dev/pid_rst_int', const=self.pid_rst_int) | |||
283 | ||||
284 | def get_pid_kp(self): | |||
285 | return self.pid_kp | |||
286 | ||||
287 | def set_pid_kp(self, pid_kp): | |||
288 | self.pid_kp = pid_kp | |||
289 | self.add_const_set_offset_0_0_0_1_0.set_const(device='/dev/pid_kp', const=self.pid_kp) | |||
290 | ||||
291 | def get_pid_ki(self): | |||
292 | return self.pid_ki | |||
293 | ||||
294 | def set_pid_ki(self, pid_ki): | |||
295 | self.pid_ki = pid_ki | |||
296 | self.add_const_set_offset_0_0_0_1_0_0.set_const(device='/dev/pid_ki', const=self.pid_ki) | |||
297 | ||||
298 | def get_pid_kd(self): | |||
299 | return self.pid_kd | |||
300 | ||||
301 | def set_pid_kd(self, pid_kd): | |||
302 | self.pid_kd = pid_kd | |||
303 | self.add_const_set_offset_0_0_0_1_0_0_0.set_const(device='/dev/pid_kd', const=self.pid_kd) | |||
304 | ||||
305 | def get_dds_range(self): | |||
306 | return self.dds_range | |||
307 | ||||
308 | def set_dds_range(self, dds_range): | |||
309 | self.dds_range = dds_range | |||
310 | self.add_const_set_offset_0_0_0_0_1_0_0.set_const(device='/dev/dds_range', const=self.dds_range) | |||
311 | ||||
312 | def get_dds_offset(self): | |||
313 | return self.dds_offset | |||
314 | ||||
315 | def set_dds_offset(self, dds_offset): | |||
316 | self.dds_offset = dds_offset | |||
317 | self.add_const_set_offset_0_0_0_0_1.set_const(device='/dev/dds_offset', const=self.dds_offset) | |||
318 |
redpitaya/client/redpitaya_gnuradio.py
File was created | 1 | #!/usr/bin/env python | ||
2 | ||||
3 | # GNU Radio blocks for the Red Pitaya transceiver | |||
4 | # Copyright (C) 2015 Renzo Davoli | |||
5 | # | |||
6 | # This program is free software; you can redistribute it and/or | |||
7 | # modify it under the terms of the GNU General Public License | |||
8 | # as published by the Free Software Foundation; either version 2 | |||
9 | # of the License, or (at your option) any later version. | |||
10 | # | |||
11 | # This program is distributed in the hope that it will be useful, | |||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
14 | # GNU General Public License for more details. | |||
15 | # | |||
16 | # You should have received a copy of the GNU General Public License | |||
17 | # along with this program; if not, write to the Free Software | |||
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
19 | ||||
20 | import socket, os | |||
21 | from gnuradio import gr, blocks | |||
22 | ||||
23 | class add_const_set_offset(gr.hier_block2): | |||
24 | def __init__(self, addr, port, device, const): | |||
25 | self.name = "add_const_set_offset" | |||
26 | gr.hier_block2.__init__( | |||
27 | self, | |||
28 | name = self.name, | |||
29 | input_signature = gr.io_signature(0, 0, 0), | |||
30 | output_signature = gr.io_signature(0, 0, 0) | |||
31 | ) | |||
32 | self.ctrl_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |||
33 | self.ctrl_sock.connect((addr, port)) | |||
34 | self.set_const(device, const) | |||
35 | ||||
36 | def set_const(self, device, const): | |||
37 | self.ctrl_sock.send('%s;%s;%i\n'%(self.name, device, const)) | |||
38 | ||||
39 | ||||
40 | class nco_counter_send_conf(gr.hier_block2): | |||
41 | def __init__(self, addr, port, device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw): | |||
42 | self.name = "nco_counter_send_conf" | |||
43 | gr.hier_block2.__init__( | |||
44 | self, | |||
45 | name = self.name, | |||
46 | input_signature = gr.io_signature(0, 0, 0), | |||
47 | output_signature = gr.io_signature(0, 0, 0) | |||
48 | ) | |||
49 | self.ctrl_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |||
50 | self.ctrl_sock.connect((addr, port)) | |||
51 | self.set_nco(device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw) | |||
52 | ||||
53 | def set_nco(self, device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw): | |||
54 | self.ctrl_sock.send('%s;%s;%i;%i;%i;%i;%i;%i\n'%(self.name, device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw)) | |||
55 | ||||
56 | '''~ | |||
57 | class source_test(gr.hier_block2): | |||
58 | def __init__(self): | |||
59 | self.name = "source_test" | |||
60 | gr.hier_block2.__init__( | |||
61 | self, | |||
62 | name = self.name, | |||
63 | input_signature = gr.io_signature(0, 0, 0), |
redpitaya/client/redpitaya_gnuradio.pyc
No preview for this file type
redpitaya/client/sourceme.bma
File was created | 1 | export GRC_BLOCKS_PATH=. |
sdr/fm_radio/fm_radio.py
#!/usr/bin/env python2 | 1 | 1 | #!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | 2 | 2 | # -*- coding: utf-8 -*- | |
################################################## | 3 | 3 | ################################################## | |
# GNU Radio Python Flow Graph | 4 | 4 | # GNU Radio Python Flow Graph | |
# Title: Fm Radio | 5 | 5 | # Title: Fm Radio | |
# Generated: Sat Apr 8 11:09:28 2017 | 6 | 6 | # Generated: Tue Apr 11 17:29:18 2017 | |
################################################## | 7 | 7 | ################################################## | |
8 | 8 | |||
if __name__ == '__main__': | 9 | 9 | if __name__ == '__main__': | |
import ctypes | 10 | 10 | import ctypes | |
import sys | 11 | 11 | import sys | |
if sys.platform.startswith('linux'): | 12 | 12 | if sys.platform.startswith('linux'): | |
try: | 13 | 13 | try: | |
x11 = ctypes.cdll.LoadLibrary('libX11.so') | 14 | 14 | x11 = ctypes.cdll.LoadLibrary('libX11.so') | |
x11.XInitThreads() | 15 | 15 | x11.XInitThreads() | |
except: | 16 | 16 | except: | |
print "Warning: failed to XInitThreads()" | 17 | 17 | print "Warning: failed to XInitThreads()" | |
18 | 18 | |||
from PyQt4 import Qt | 19 | 19 | from PyQt4 import Qt | |
from gnuradio import analog | 20 | 20 | from gnuradio import analog | |
from gnuradio import audio | 21 | 21 | from gnuradio import audio | |
from gnuradio import eng_notation | 22 | 22 | from gnuradio import eng_notation | |
from gnuradio import filter | 23 | 23 | from gnuradio import filter | |
from gnuradio import gr | 24 | 24 | from gnuradio import gr | |
from gnuradio import qtgui | 25 | 25 | from gnuradio import qtgui | |
from gnuradio.eng_option import eng_option | 26 | 26 | from gnuradio.eng_option import eng_option | |
from gnuradio.filter import firdes | 27 | 27 | from gnuradio.filter import firdes | |
from gnuradio.qtgui import Range, RangeWidget | 28 | 28 | from gnuradio.qtgui import Range, RangeWidget | |
from optparse import OptionParser | 29 | 29 | from optparse import OptionParser | |
import osmosdr | 30 | 30 | import osmosdr | |
import sip | 31 | 31 | import sip | |
import sys | 32 | 32 | import sys | |
import time | 33 | 33 | import time | |
34 | 34 | |||
35 | 35 | |||
class fm_radio(gr.top_block, Qt.QWidget): | 36 | 36 | class fm_radio(gr.top_block, Qt.QWidget): | |
37 | 37 | |||
def __init__(self): | 38 | 38 | def __init__(self): | |
gr.top_block.__init__(self, "Fm Radio") | 39 | 39 | gr.top_block.__init__(self, "Fm Radio") | |
Qt.QWidget.__init__(self) | 40 | 40 | Qt.QWidget.__init__(self) | |
self.setWindowTitle("Fm Radio") | 41 | 41 | self.setWindowTitle("Fm Radio") | |
try: | 42 | 42 | try: | |
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) | 43 | 43 | self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) | |
except: | 44 | 44 | except: | |
pass | 45 | 45 | pass | |
self.top_scroll_layout = Qt.QVBoxLayout() | 46 | 46 | self.top_scroll_layout = Qt.QVBoxLayout() | |
self.setLayout(self.top_scroll_layout) | 47 | 47 | self.setLayout(self.top_scroll_layout) | |
self.top_scroll = Qt.QScrollArea() | 48 | 48 | self.top_scroll = Qt.QScrollArea() | |
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) | 49 | 49 | self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) | |
self.top_scroll_layout.addWidget(self.top_scroll) | 50 | 50 | self.top_scroll_layout.addWidget(self.top_scroll) | |
self.top_scroll.setWidgetResizable(True) | 51 | 51 | self.top_scroll.setWidgetResizable(True) | |
self.top_widget = Qt.QWidget() | 52 | 52 | self.top_widget = Qt.QWidget() | |
self.top_scroll.setWidget(self.top_widget) | 53 | 53 | self.top_scroll.setWidget(self.top_widget) | |
self.top_layout = Qt.QVBoxLayout(self.top_widget) | 54 | 54 | self.top_layout = Qt.QVBoxLayout(self.top_widget) | |
self.top_grid_layout = Qt.QGridLayout() | 55 | 55 | self.top_grid_layout = Qt.QGridLayout() | |
self.top_layout.addLayout(self.top_grid_layout) | 56 | 56 | self.top_layout.addLayout(self.top_grid_layout) | |
57 | 57 | |||
self.settings = Qt.QSettings("GNU Radio", "fm_radio") | 58 | 58 | self.settings = Qt.QSettings("GNU Radio", "fm_radio") | |
self.restoreGeometry(self.settings.value("geometry").toByteArray()) | 59 | 59 | self.restoreGeometry(self.settings.value("geometry").toByteArray()) | |
60 | 60 | |||
################################################## | 61 | 61 | ################################################## | |
# Variables | 62 | 62 | # Variables | |
################################################## | 63 | 63 | ################################################## | |
self.samp_rate = samp_rate = 48e3 | 64 | 64 | self.samp_rate = samp_rate = 48e3 | |
self.freq = freq = 160011000 | 65 | 65 | self.freq = freq = 160011000 | |
66 | 66 | |||
################################################## | 67 | 67 | ################################################## | |
# Blocks | 68 | 68 | # Blocks | |
################################################## | 69 | 69 | ################################################## | |
self._freq_range = Range(52e6, 2e9, 1e3, 160011000, 200) | 70 | 70 | self._freq_range = Range(52e6, 2e9, 1e3, 160011000, 200) | |
self._freq_win = RangeWidget(self._freq_range, self.set_freq, "freq", "counter_slider", float) | 71 | 71 | self._freq_win = RangeWidget(self._freq_range, self.set_freq, "freq", "counter_slider", float) | |
self.top_grid_layout.addWidget(self._freq_win, 0,0) | 72 | 72 | self.top_grid_layout.addWidget(self._freq_win, 0,0) | |
self.rtlsdr_source_0 = osmosdr.source( args="numchan=" + str(1) + " " + '' ) | 73 | 73 | self.rtlsdr_source_0 = osmosdr.source( args="numchan=" + str(1) + " " + '' ) | |
self.rtlsdr_source_0.set_sample_rate(samp_rate*10*4) | 74 | 74 | self.rtlsdr_source_0.set_sample_rate(samp_rate*10*4) | |
self.rtlsdr_source_0.set_center_freq(freq, 0) | 75 | 75 | self.rtlsdr_source_0.set_center_freq(freq, 0) | |
self.rtlsdr_source_0.set_freq_corr(0, 0) | 76 | 76 | self.rtlsdr_source_0.set_freq_corr(0, 0) | |
self.rtlsdr_source_0.set_dc_offset_mode(0, 0) | 77 | 77 | self.rtlsdr_source_0.set_dc_offset_mode(0, 0) | |
self.rtlsdr_source_0.set_iq_balance_mode(0, 0) | 78 | 78 | self.rtlsdr_source_0.set_iq_balance_mode(0, 0) | |
self.rtlsdr_source_0.set_gain_mode(False, 0) | 79 | 79 | self.rtlsdr_source_0.set_gain_mode(False, 0) | |
self.rtlsdr_source_0.set_gain(20, 0) | 80 | 80 | self.rtlsdr_source_0.set_gain(20, 0) | |
self.rtlsdr_source_0.set_if_gain(20, 0) | 81 | 81 | self.rtlsdr_source_0.set_if_gain(20, 0) | |
self.rtlsdr_source_0.set_bb_gain(20, 0) | 82 | 82 | self.rtlsdr_source_0.set_bb_gain(20, 0) | |
self.rtlsdr_source_0.set_antenna('', 0) | 83 | 83 | self.rtlsdr_source_0.set_antenna('', 0) | |
self.rtlsdr_source_0.set_bandwidth(0, 0) | 84 | 84 | self.rtlsdr_source_0.set_bandwidth(0, 0) | |
85 | 85 | |||
self.qtgui_sink_x_1 = qtgui.sink_f( | 86 | 86 | self.qtgui_sink_x_1 = qtgui.sink_f( | |
1024, #fftsize | 87 | 87 | 1024, #fftsize | |
firdes.WIN_BLACKMAN_hARRIS, #wintype | 88 | 88 | firdes.WIN_BLACKMAN_hARRIS, #wintype | |
0, #fc | 89 | 89 | 0, #fc | |
samp_rate*10, #bw | 90 | 90 | samp_rate*10, #bw | |
"", #name | 91 | 91 | "", #name | |
True, #plotfreq | 92 | 92 | True, #plotfreq | |
True, #plotwaterfall | 93 | 93 | True, #plotwaterfall | |
True, #plottime | 94 | 94 | True, #plottime | |
True, #plotconst | 95 | 95 | True, #plotconst | |
) | 96 | 96 | ) | |
self.qtgui_sink_x_1.set_update_time(1.0/10) | 97 | 97 | self.qtgui_sink_x_1.set_update_time(1.0/10) | |
self._qtgui_sink_x_1_win = sip.wrapinstance(self.qtgui_sink_x_1.pyqwidget(), Qt.QWidget) | 98 | 98 | self._qtgui_sink_x_1_win = sip.wrapinstance(self.qtgui_sink_x_1.pyqwidget(), Qt.QWidget) | |
self.top_grid_layout.addWidget(self._qtgui_sink_x_1_win, 10,0) | 99 | 99 | self.top_grid_layout.addWidget(self._qtgui_sink_x_1_win, 10,0) | |
100 | 100 | |||
self.qtgui_sink_x_1.enable_rf_freq(False) | 101 | 101 | self.qtgui_sink_x_1.enable_rf_freq(False) | |
102 | 102 | |||
103 | 103 | |||
104 | 104 | |||
self.qtgui_sink_x_0 = qtgui.sink_c( | 105 | 105 | self.qtgui_sink_x_0 = qtgui.sink_c( | |
1024, #fftsize | 106 | 106 | 1024, #fftsize | |
firdes.WIN_BLACKMAN_hARRIS, #wintype | 107 | 107 | firdes.WIN_BLACKMAN_hARRIS, #wintype | |
0, #fc | 108 | 108 | 0, #fc | |
samp_rate*10*4, #bw | 109 | 109 | samp_rate*10*4, #bw | |
"", #name | 110 | 110 | "", #name | |
True, #plotfreq | 111 | 111 | True, #plotfreq | |
True, #plotwaterfall | 112 | 112 | True, #plotwaterfall | |
True, #plottime | 113 | 113 | True, #plottime | |
True, #plotconst | 114 | 114 | True, #plotconst | |
) | 115 | 115 | ) | |
self.qtgui_sink_x_0.set_update_time(1.0/10) | 116 | 116 | self.qtgui_sink_x_0.set_update_time(1.0/10) | |
self._qtgui_sink_x_0_win = sip.wrapinstance(self.qtgui_sink_x_0.pyqwidget(), Qt.QWidget) | 117 | 117 | self._qtgui_sink_x_0_win = sip.wrapinstance(self.qtgui_sink_x_0.pyqwidget(), Qt.QWidget) | |
self.top_grid_layout.addWidget(self._qtgui_sink_x_0_win, 9,0) | 118 | 118 | self.top_grid_layout.addWidget(self._qtgui_sink_x_0_win, 9,0) | |
119 | 119 | |||
self.qtgui_sink_x_0.enable_rf_freq(False) | 120 | 120 | self.qtgui_sink_x_0.enable_rf_freq(False) | |
121 | 121 | |||
122 | 122 | |||
123 | 123 | |||
self.low_pass_filter_0_0 = filter.fir_filter_fff(10, firdes.low_pass( | 124 | 124 | self.low_pass_filter_0_0 = filter.fir_filter_fff(10, firdes.low_pass( | |
1, samp_rate*10, samp_rate*2, 1e4, firdes.WIN_HAMMING, 6.76)) | 125 | 125 | 1, samp_rate*10, samp_rate*2, 1e4, firdes.WIN_HAMMING, 6.76)) | |
self.low_pass_filter_0 = filter.fir_filter_ccf(4, firdes.low_pass( | 126 | 126 | self.low_pass_filter_0 = filter.fir_filter_ccf(4, firdes.low_pass( | |
1, samp_rate*10*4, 500e3, 10e3, firdes.WIN_HAMMING, 6.76)) | 127 | 127 | 1, samp_rate*10*4, 500e3, 10e3, firdes.WIN_HAMMING, 6.76)) | |
self.audio_sink_0 = audio.sink(int(samp_rate), '', True) | 128 | 128 | self.audio_sink_0 = audio.sink(int(samp_rate), '', True) | |
self.analog_wfm_rcv_0 = analog.wfm_rcv( | 129 | 129 | self.analog_wfm_rcv_0 = analog.wfm_rcv( | |
quad_rate=samp_rate*10, | 130 | 130 | quad_rate=samp_rate*10, | |
audio_decimation=1, | 131 | 131 | audio_decimation=1, | |
) | 132 | 132 | ) | |
133 | 133 | |||
################################################## | 134 | 134 | ################################################## | |
# Connections | 135 | 135 | # Connections | |
################################################## | 136 | 136 | ################################################## | |
self.connect((self.analog_wfm_rcv_0, 0), (self.low_pass_filter_0_0, 0)) | 137 | 137 | self.connect((self.analog_wfm_rcv_0, 0), (self.low_pass_filter_0_0, 0)) | |
self.connect((self.analog_wfm_rcv_0, 0), (self.qtgui_sink_x_1, 0)) | 138 | 138 | self.connect((self.analog_wfm_rcv_0, 0), (self.qtgui_sink_x_1, 0)) | |
self.connect((self.low_pass_filter_0, 0), (self.analog_wfm_rcv_0, 0)) | 139 | 139 | self.connect((self.low_pass_filter_0, 0), (self.analog_wfm_rcv_0, 0)) | |
self.connect((self.low_pass_filter_0_0, 0), (self.audio_sink_0, 0)) | 140 | 140 | self.connect((self.low_pass_filter_0_0, 0), (self.audio_sink_0, 0)) | |
self.connect((self.rtlsdr_source_0, 0), (self.low_pass_filter_0, 0)) | 141 | 141 | self.connect((self.rtlsdr_source_0, 0), (self.low_pass_filter_0, 0)) | |
self.connect((self.rtlsdr_source_0, 0), (self.qtgui_sink_x_0, 0)) | 142 | 142 | self.connect((self.rtlsdr_source_0, 0), (self.qtgui_sink_x_0, 0)) | |
143 | 143 | |||
def closeEvent(self, event): | 144 | 144 | def closeEvent(self, event): | |
self.settings = Qt.QSettings("GNU Radio", "fm_radio") | 145 | 145 | self.settings = Qt.QSettings("GNU Radio", "fm_radio") | |
self.settings.setValue("geometry", self.saveGeometry()) | 146 | 146 | self.settings.setValue("geometry", self.saveGeometry()) | |
event.accept() | 147 | 147 | event.accept() | |
148 | 148 | |||
def get_samp_rate(self): | 149 | 149 | def get_samp_rate(self): | |
return self.samp_rate | 150 | 150 | return self.samp_rate | |
151 | 151 | |||
def set_samp_rate(self, samp_rate): | 152 | 152 | def set_samp_rate(self, samp_rate): | |
self.samp_rate = samp_rate | 153 | 153 | self.samp_rate = samp_rate | |
self.rtlsdr_source_0.set_sample_rate(self.samp_rate*10*4) | 154 | 154 | self.rtlsdr_source_0.set_sample_rate(self.samp_rate*10*4) | |
self.qtgui_sink_x_1.set_frequency_range(0, self.samp_rate*10) | 155 | 155 | self.qtgui_sink_x_1.set_frequency_range(0, self.samp_rate*10) | |
self.qtgui_sink_x_0.set_frequency_range(0, self.samp_rate*10*4) | 156 | 156 | self.qtgui_sink_x_0.set_frequency_range(0, self.samp_rate*10*4) | |
self.low_pass_filter_0_0.set_taps(firdes.low_pass(1, self.samp_rate*10, self.samp_rate*2, 1e4, firdes.WIN_HAMMING, 6.76)) | 157 | 157 | self.low_pass_filter_0_0.set_taps(firdes.low_pass(1, self.samp_rate*10, self.samp_rate*2, 1e4, firdes.WIN_HAMMING, 6.76)) | |
self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.samp_rate*10*4, 500e3, 10e3, firdes.WIN_HAMMING, 6.76)) | 158 | 158 | self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.samp_rate*10*4, 500e3, 10e3, firdes.WIN_HAMMING, 6.76)) | |
159 | 159 |