提交 8534a00e 编写于 作者: M manjaro-xfce

SDR Testing

上级 a1894671
......@@ -31,9 +31,9 @@ int runSend()
const char * gainName = "PGA";
//Sample rate in Hz
double sprate = SIGRATE ;
double tx_freq = 200.0e6;
double tx_freq = 100.8e6;
double tx_sprate = sprate;
double tx_gain = 70;
double tx_gain = 80;
double tx_bw = sprate;
//发射信号。MIMO时,可以指定0,1
size_t tx_channel[] = {0};
......@@ -115,6 +115,7 @@ int runSend()
fprintf(stderr, "Press Ctrl+C to stop streaming.\n");
fprintf(stderr, "Input :");
long long ctv = 0;
// Actual streaming, TX Threading
time_t tm_idle = time(0);
while (!stop_signal_called) {
......@@ -178,11 +179,15 @@ int runSend()
1, &num_samps_sent));
total_sent += num_samps_sent;
}
if (tm_idle + 10 < time(0))
if (tm_idle + 1 < time(0))
{
++ctv;
tm_idle = time(0);
char buf_tm[256];
sprintf(buf_tm,"Time=%lld\n",tm_idle);
if (ctv % 10==0)
sprintf(buf_tm,"Time=%lld\n",tm_idle);
else
sprintf(buf_tm,"%lld\r",ctv);
int sl = strlen(buf_tm);
mtx_data.lock();
std::copy(buf_tm,buf_tm+sl,std::back_inserter(lst_data));
......
......@@ -2,10 +2,10 @@
#define WAVEFORM_H
typedef short SPTYPE;
#define MODRATE_N 1
#define C_AMP 32767
#define SPREAD_RAT 800
#define C_AMP 8192
#define SPREAD_RAT 512
#define WAVSIZE SPREAD_RAT*MODRATE_N
#define SIGRATE 250000
#define SIGRATE 200001
extern SPTYPE wav_spread[2][WAVSIZE][2];
extern float wav_xorr[2][WAVSIZE][2];
void init_wavform();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册