From bb64b314c83843a792103de83ef67cc5b0d1d9be Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 20 May 2016 16:16:28 +0200 Subject: Get rid of FCT discontinuity check The timestamp discontinuity verification takes care of this now --- src/DabMod.cpp | 8 +------- src/OutputUHD.cpp | 18 ------------------ src/OutputUHD.h | 15 --------------- 3 files changed, 1 insertion(+), 40 deletions(-) diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 57ff79b..43550c5 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -108,7 +108,7 @@ struct modulator_data enum class run_modulator_state_t { failure, // Corresponds to all failures normal_end, // Number of frames to modulate was reached - again, // FCT discontinuity or ZeroMQ overrun + again, // ZeroMQ overrun reconfigure // Some sort of change of configuration we cannot handle happened }; @@ -887,12 +887,6 @@ run_modulator_state_t run_modulator(modulator_data& m) running = 0; ret = run_modulator_state_t::normal_end; } -#if defined(HAVE_OUTPUT_UHD) - } catch (fct_discontinuity_error& e) { - // The OutputUHD saw a FCT discontinuity - etiLog.level(warn) << e.what(); - ret = run_modulator_state_t::again; -#endif } catch (zmq_input_overflow& e) { // The ZeroMQ input has overflowed its buffer etiLog.level(warn) << e.what(); diff --git a/src/OutputUHD.cpp b/src/OutputUHD.cpp index 2325197..74ff042 100644 --- a/src/OutputUHD.cpp +++ b/src/OutputUHD.cpp @@ -328,16 +328,6 @@ int OutputUHD::process(Buffer* dataIn, Buffer* dataOut) if (first_run) { etiLog.level(debug) << "OutputUHD: UHD initialising..."; - switch (myEtiReader->getMode()) { - case 1: fct_increment = 4; break; - case 2: - case 3: fct_increment = 1; break; - case 4: fct_increment = 2; break; - default: break; - } - - last_fct = -1; - // we only set the delay buffer from the dab mode signaled in ETI if the // dab mode was not set in contructor if (myTFDurationMs == 0) { @@ -412,12 +402,6 @@ int OutputUHD::process(Buffer* dataIn, Buffer* dataOut) etiLog.level(info) << "OutputUHD: dropping one frame with invalid FCT"; } - else if (last_fct != -1 and - (last_fct + fct_increment) % 250 != frame.ts.fct) { - worker.stop(); - first_run = true; - throw fct_discontinuity_error(); - } else { while (true) { if (uwd.frames.size() > FRAMES_MAX_SIZE) { @@ -428,8 +412,6 @@ int OutputUHD::process(Buffer* dataIn, Buffer* dataOut) break; } } - - //last_fct = frame.ts.fct; // TODO } return dataIn->getLength(); diff --git a/src/OutputUHD.h b/src/OutputUHD.h index f725268..6ebacef 100644 --- a/src/OutputUHD.h +++ b/src/OutputUHD.h @@ -89,14 +89,6 @@ struct UHDWorkerFrameData { struct frame_timestamp ts; }; -struct fct_discontinuity_error : public std::exception -{ - const char* what () const throw () - { - return "FCT discontinuity detected"; - } -}; - enum refclk_lock_loss_behaviour_t { CRASH, IGNORE }; struct UHDWorkerData { @@ -273,13 +265,6 @@ class OutputUHD: public ModOutput, public RemoteControllable { boost::unique_future gps_fix_future; boost::thread gps_fix_task; - - // What transmission mode we're using defines by how - // much the FCT should increment for each - // transmission frame. - int fct_increment; - int last_fct; - // Wait time in seconds to get fix static const int initial_gps_fix_wait = 180; -- cgit v1.2.3