diff --git a/redpitaya/client/dds_gnuradio.grc b/redpitaya/client/dds_gnuradio.grc index 0ac2f1a..44ecb46 100644 --- a/redpitaya/client/dds_gnuradio.grc +++ b/redpitaya/client/dds_gnuradio.grc @@ -168,7 +168,7 @@ value - "192.168.0.202" + "192.168.0.203" @@ -215,11 +215,11 @@ start - -60000000 + 0 step - 1 + 1000 stop @@ -460,6 +460,14 @@ offset 0 + + pinc_sw + 1 + + + poff_sw + 1 + port port diff --git a/redpitaya/client/dds_gnuradio.py b/redpitaya/client/dds_gnuradio.py index eefce8d..49aee71 100755 --- a/redpitaya/client/dds_gnuradio.py +++ b/redpitaya/client/dds_gnuradio.py @@ -3,7 +3,7 @@ ################################################## # GNU Radio Python Flow Graph # Title: Dds Gnuradio -# Generated: Wed Apr 5 11:34:01 2017 +# Generated: Sat Apr 8 10:39:47 2017 ################################################## if __name__ == '__main__': @@ -58,7 +58,7 @@ class dds_gnuradio(gr.top_block, Qt.QWidget): self.port = port = 1001 self.offset_out1 = offset_out1 = 0 self.f_dds = f_dds = 0 - self.addr = addr = "192.168.0.202" + self.addr = addr = "192.168.0.203" self.a_dds = a_dds = 0 ################################################## @@ -67,7 +67,7 @@ class dds_gnuradio(gr.top_block, Qt.QWidget): self._offset_out1_range = Range(-2**13, 2**13-1, 1, 0, 200) self._offset_out1_win = RangeWidget(self._offset_out1_range, self.set_offset_out1, 'Offset DDS', "counter_slider", int) self.top_grid_layout.addWidget(self._offset_out1_win, 2, 0) - self._f_dds_range = Range(-60000000, 60000000, 1, 0, 200) + self._f_dds_range = Range(0, 60000000, 1000, 0, 200) self._f_dds_win = RangeWidget(self._f_dds_range, self.set_f_dds, 'DDS frequency', "counter_slider", float) self.top_grid_layout.addWidget(self._f_dds_win, 0, 0) self._a_dds_range = Range(0, 2**13-1, 1, 0, 200) @@ -81,6 +81,8 @@ class dds_gnuradio(gr.top_block, Qt.QWidget): freq_dds=f_dds, acc_size=32, offset=0, + pinc_sw=1, + poff_sw=1, ) self.add_const_set_offset_0_0 = redpitaya_gnuradio.add_const_set_offset( @@ -121,7 +123,7 @@ class dds_gnuradio(gr.top_block, Qt.QWidget): def set_f_dds(self, f_dds): self.f_dds = f_dds - self.nco_counter_send_conf_0.set_nco(device='/dev/dds_freq', freq_ref=125000000, freq_dds=self.f_dds, acc_size=32, offset=0) + self.nco_counter_send_conf_0.set_nco(device='/dev/dds_freq', freq_ref=125000000, freq_dds=self.f_dds, acc_size=32, offset=0, pinc_sw=1, poff_sw=1) def get_addr(self): return self.addr diff --git a/redpitaya/client/vco_only.grc b/redpitaya/client/vco_only.grc index a5e3939..e753fb8 100644 --- a/redpitaya/client/vco_only.grc +++ b/redpitaya/client/vco_only.grc @@ -168,7 +168,7 @@ value - "192.168.0.202" + "192.168.0.203" @@ -530,7 +530,7 @@ start - 0 + -2**13 step diff --git a/redpitaya/client/vco_only.py b/redpitaya/client/vco_only.py index a223059..5c4b8d4 100755 --- a/redpitaya/client/vco_only.py +++ b/redpitaya/client/vco_only.py @@ -3,7 +3,7 @@ ################################################## # GNU Radio Python Flow Graph # Title: Vco Only -# Generated: Thu Apr 6 18:24:10 2017 +# Generated: Tue Apr 11 09:58:12 2017 ################################################## if __name__ == '__main__': @@ -64,7 +64,7 @@ class vco_only(gr.top_block, Qt.QWidget): self.dds_f0 = dds_f0 = 0 self.dds_ampl = dds_ampl = 0 self.dac1_offset = dac1_offset = 0 - self.addr = addr = "192.168.0.202" + self.addr = addr = "192.168.0.203" self.adc1_offset = adc1_offset = 0 ################################################## @@ -84,7 +84,7 @@ class vco_only(gr.top_block, Qt.QWidget): self._inc_sw_callback(self.inc_sw) _inc_sw_check_box.stateChanged.connect(lambda i: self.set_inc_sw(self._inc_sw_choices[bool(i)])) self.top_grid_layout.addWidget(_inc_sw_check_box, 2, 1) - self._dds_range_range = Range(0, 2**13-1, 1, 0, 200) + self._dds_range_range = Range(-2**13, 2**13-1, 1, 0, 200) self._dds_range_win = RangeWidget(self._dds_range_range, self.set_dds_range, 'dds_range', "counter_slider", int) self.top_grid_layout.addWidget(self._dds_range_win, 5, 3) self._dds_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) diff --git a/redpitaya/server/server.py b/redpitaya/server/server.py index 5f046eb..5077251 100755 --- a/redpitaya/server/server.py +++ b/redpitaya/server/server.py @@ -4,6 +4,8 @@ import socket from thread import start_new_thread import liboscimp_fpga +########################################################### + def clientThread(conn, addr): print('Open connection from ' + addr[0] + ':' + str(addr[1]) + '\n') while True: @@ -18,10 +20,11 @@ def clientThread(conn, addr): pass if recv[0] == "nco_counter_send_conf": try: - liboscimp_fpga.nco_counter_send_conf(recv[1], int(recv[2]), int(recv[3]), int(recv[4]), int(recv[5])) + liboscimp_fpga.nco_counter_send_conf(recv[1], int(recv[2]), int(recv[3]), int(recv[4]), int(recv[5]), int(recv[6]), int(recv[7])) except: - pass - conn.close() + pass + +########################################################### ctrl_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ctrl_sock.bind(('', 1001)) diff --git a/sdr/fm_radio/fm_radio.py b/sdr/fm_radio/fm_radio.py index 63be504..2898f32 100755 --- a/sdr/fm_radio/fm_radio.py +++ b/sdr/fm_radio/fm_radio.py @@ -3,7 +3,7 @@ ################################################## # GNU Radio Python Flow Graph # Title: Fm Radio -# Generated: Tue Mar 21 14:48:06 2017 +# Generated: Sat Apr 8 11:09:28 2017 ################################################## if __name__ == '__main__':