diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2023-02-01 15:14:34 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2023-02-01 15:14:34 +0100 |
commit | ba0c32703ee1af770deabdf864c806d974ea8206 (patch) | |
tree | 89e064e45f8490000a8892108ceb881b08481756 /src/DabMod.cpp | |
parent | 0aec6da11b4add62ac473e3f4ea813bb4a8a556d (diff) | |
download | dabmod-ba0c32703ee1af770deabdf864c806d974ea8206.tar.gz dabmod-ba0c32703ee1af770deabdf864c806d974ea8206.tar.bz2 dabmod-ba0c32703ee1af770deabdf864c806d974ea8206.zip |
Dexter timestamps: add 1s margin in modulator
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r-- | src/DabMod.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 57e6e32..4b4fda0 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -531,7 +531,7 @@ static run_modulator_state_t run_modulator(const mod_settings_t& mod_settings, m fct = m.etiReader->getFct(); fp = m.etiReader->getFp(); - ts = m.ediInput->ediReader.getTimestamp(); + ts = m.etiReader->getTimestamp(); } else if (m.ediInput) { while (running and not m.ediInput->ediReader.isFrameReady()) { @@ -592,9 +592,9 @@ static run_modulator_state_t run_modulator(const mod_settings_t& mod_settings, m } } - // timestamp is good if we run unsynchronised, or if it's in the future + // timestamp is good if we run unsynchronised, or if margin is insufficient bool ts_good = not mod_settings.sdr_device_config.enableSync or - (ts.timestamp_valid and ts.offset_to_system_time() > 0); + (ts.timestamp_valid and ts.offset_to_system_time() > 1); if (fct_good and ts_good) { last_eti_fct = fct; @@ -602,15 +602,9 @@ static run_modulator_state_t run_modulator(const mod_settings_t& mod_settings, m m.flowgraph->run(); } else { - etiLog.level(warn) << "Skipping frame " << fct << " FCT " << - (fct_good ? "good" : "bad") << " TS " << - (ts_good ? "good, " : "bad, ") << - (ts.timestamp_valid ? (ts.offset_to_system_time() > 0 ? "in the future" : "in the past") : "invalid"); - - if (m.ediInput) { - m.ediInput->ediReader.clearFrame(); - } - return run_modulator_state_t::again; + etiLog.level(warn) << "Skipping frame " << + " TS " << (ts.timestamp_valid ? "valid" : "invalid") << + " offset " << (ts.timestamp_valid ? ts.offset_to_system_time() : 0); } if (m.ediInput) { |