diff --git a/sdr_deepdetect/sdd_emitter/main.cpp b/sdr_deepdetect/sdd_emitter/main.cpp index eda683d14d6f60bbbd1a2945de0d2c92798784be..a204d76220824b672d91a6cc2c6247fbfe2951b7 100644 --- a/sdr_deepdetect/sdd_emitter/main.cpp +++ b/sdr_deepdetect/sdd_emitter/main.cpp @@ -116,6 +116,7 @@ int runSend() fprintf(stderr, "Input :"); // Actual streaming, TX Threading + time_t tm_idle = time(0); while (!stop_signal_called) { bool has_data = false; char cha = 0; @@ -156,6 +157,7 @@ int runSend() total_sent += num_samps_sent; } } + tm_idle = time(0); } else { @@ -176,6 +178,16 @@ int runSend() 1, &num_samps_sent)); total_sent += num_samps_sent; } + if (tm_idle + 10 < time(0)) + { + tm_idle = time(0); + char buf_tm[256]; + sprintf(buf_tm,"%d",tm_idle); + int sl = strlen(buf_tm); + mtx_data.lock(); + std::copy(buf_tm,buf_tm+sl,std::back_inserter(lst_data)); + mtx_data.unlock(); + } } }