commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r5638 - gnuradio/branches/developers/eb/ibu/usrp/host/


From: eb
Subject: [Commit-gnuradio] r5638 - gnuradio/branches/developers/eb/ibu/usrp/host/apps
Date: Sun, 3 Jun 2007 12:48:52 -0600 (MDT)

Author: eb
Date: 2007-06-03 12:48:52 -0600 (Sun, 03 Jun 2007)
New Revision: 5638

Modified:
   gnuradio/branches/developers/eb/ibu/usrp/host/apps/test_usrp_inband_tx.cc
Log:
work-in-progress

Modified: 
gnuradio/branches/developers/eb/ibu/usrp/host/apps/test_usrp_inband_tx.cc
===================================================================
--- gnuradio/branches/developers/eb/ibu/usrp/host/apps/test_usrp_inband_tx.cc   
2007-06-03 18:46:27 UTC (rev 5637)
+++ gnuradio/branches/developers/eb/ibu/usrp/host/apps/test_usrp_inband_tx.cc   
2007-06-03 18:48:52 UTC (rev 5638)
@@ -110,7 +110,8 @@
     d_state(INIT), d_nsamples_to_send((long) 40e6),
     d_nsamples_xmitted(0),
     d_nframes_xmitted(0),
-    d_samples_per_frame((long)(126 * 3.5)),    // non-full packet
+    //d_samples_per_frame((long)(126 * 3.5)),  // non-full packet
+    d_samples_per_frame((long)(126 * 4)),      // full packet
     d_done_sending(false),
     d_amplitude(16384)
 { 
@@ -119,7 +120,8 @@
   d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
   d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
   
-  bool fake_usrp_p = true;
+  //bool fake_usrp_p = true;
+  bool fake_usrp_p = false;
 
   // Test the TX side
 
@@ -303,9 +305,13 @@
   // allocate the uniform vector for the samples
   // FIXME perhaps hold on to this between calls
 
+#if 0
   long nsamples_this_frame =
     std::min(d_nsamples_to_send - d_nsamples_xmitted,
             d_samples_per_frame);
+#else
+  long nsamples_this_frame = d_samples_per_frame;
+#endif
 
   if (nsamples_this_frame == 0){
     d_done_sending = true;
@@ -321,11 +327,21 @@
   // fill in the complex sinusoid
 
   for (int i = 0; i < nsamples_this_frame; i++){
-    gr_complex s;
-    d_nco.sincos(&s, 1, d_amplitude);
-    // write 16-bit I & Q
-    samples[2*i] =   (int16_t) s.real();
-    samples[2*i+1] = (int16_t) s.imag();
+
+    if (0){
+      gr_complex s;
+      d_nco.sincos(&s, 1, d_amplitude);
+      // write 16-bit I & Q
+      samples[2*i] =   (int16_t) s.real();
+      samples[2*i+1] = (int16_t) s.imag();
+    }
+    else {
+      gr_complex s(d_amplitude, 0);
+
+      // write 16-bit I & Q
+      samples[2*i] =   (int16_t) s.real();
+      samples[2*i+1] = (int16_t) s.imag();
+    }
   }
 
   pmt_t timestamp = pmt_from_long(0xffffffff); // NOW





reply via email to

[Prev in Thread] Current Thread [Next in Thread]