[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8544 - in usrp2/trunk/host-ng: apps lib
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r8544 - in usrp2/trunk/host-ng: apps lib |
Date: |
Mon, 2 Jun 2008 10:07:23 -0600 (MDT) |
Author: jcorgan
Date: 2008-06-02 10:07:18 -0600 (Mon, 02 Jun 2008)
New Revision: 8544
Modified:
usrp2/trunk/host-ng/apps/test_usrp2.cc
usrp2/trunk/host-ng/lib/usrp2.cc
Log:
wip, forgot stop_rx_streaming
Modified: usrp2/trunk/host-ng/apps/test_usrp2.cc
===================================================================
--- usrp2/trunk/host-ng/apps/test_usrp2.cc 2008-06-02 15:54:47 UTC (rev
8543)
+++ usrp2/trunk/host-ng/apps/test_usrp2.cc 2008-06-02 16:07:18 UTC (rev
8544)
@@ -35,7 +35,7 @@
u2->set_rx_gain(1.0);
u2->set_rx_freq(0.0, NULL);
- u2->set_rx_decim(10);
+ u2->set_rx_decim(5);
u2->start_rx_streaming();
struct timespec ts;
Modified: usrp2/trunk/host-ng/lib/usrp2.cc
===================================================================
--- usrp2/trunk/host-ng/lib/usrp2.cc 2008-06-02 15:54:47 UTC (rev 8543)
+++ usrp2/trunk/host-ng/lib/usrp2.cc 2008-06-02 16:07:18 UTC (rev 8544)
@@ -423,6 +423,23 @@
bool
usrp2::impl::stop_rx_streaming()
{
+ uint8_t pktbuf[ethernet::MAX_PKTLEN];
+ memset(pktbuf, 0, sizeof(pktbuf));
+
+ struct command {
+ u2_eth_packet_t h;
+ op_id_t op_stop_rx;
+ };
+
+ command *c = (command *) pktbuf;
+ init_etf_hdrs(&c->h, d_addr, 0, CONTROL_CHAN, -1);
+
+ c->op_stop_rx.opcode = OP_STOP_RX;
+ c->op_stop_rx.len = sizeof(op_stop_rx_t);
+ int len = std::max((size_t) ethernet::MIN_PKTLEN, sizeof(command));
+ if (d_ethernet->write_packet(c, len) != len)
+ return false;
+
return true;
}
@@ -505,8 +522,7 @@
if (missing < 0)
missing += 256;
- if (d_num_rx_frames > 256) // skip start up
- d_num_rx_lost += missing;
+ d_num_rx_lost += missing;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8544 - in usrp2/trunk/host-ng: apps lib,
jcorgan <=