diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-01-23 10:18:17 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-01-23 10:51:26 +0100 |
commit | e12c679b8cc8a263507c556cb24819dc0d5559b9 (patch) | |
tree | 8f2cd06710d15ca64a4a86c1ce52bc975ec3f2b0 /src/EtiReader.cpp | |
parent | d82422fbb3d9d34a0566197245376548ce3ef14e (diff) | |
parent | 94c1f63b6fd07d74f3325274dd19fd6beaf53965 (diff) | |
download | dabmod-e12c679b8cc8a263507c556cb24819dc0d5559b9.tar.gz dabmod-e12c679b8cc8a263507c556cb24819dc0d5559b9.tar.bz2 dabmod-e12c679b8cc8a263507c556cb24819dc0d5559b9.zip |
Merge raspine's ZeroMQ RC and UHD staticdelay
Merge raspine/master pull request, fix indentation, code style, and two
minor conflicts in:
doc/example.ini
src/DabMod.cpp
Diffstat (limited to 'src/EtiReader.cpp')
-rw-r--r-- | src/EtiReader.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp index b61481c..fe54f55 100644 --- a/src/EtiReader.cpp +++ b/src/EtiReader.cpp @@ -2,8 +2,10 @@ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Includes modifications for which no copyright is claimed - 2012, Matthias P. Braendli, matthias.braendli@mpb.li + Copyright (C) 2014 + Matthias P. Braendli, matthias.braendli@mpb.li + + http://opendigitalradio.org */ /* This file is part of ODR-DabMod. @@ -269,18 +271,17 @@ int EtiReader::process(Buffer* dataIn) } break; default: - // throw std::runtime_error("Invalid state!"); + // throw std::runtime_error("Invalid state!"); PDEBUG("Invalid state (%i)!", state); input_size = 0; } } - + // Update timestamps myTimestampDecoder.updateTimestampEti(eti_fc.FP & 0x3, - eti_eoh.MNSC, - getPPSOffset()); + eti_eoh.MNSC, getPPSOffset(), eti_fc.FCT); - if (getFCT() % 125 == 0) //every 3 seconds is fine enough + if (eti_fc.FCT % 125 == 0) //every 3 seconds is fine enough { myTimestampDecoder.updateModulatorOffset(); } @@ -296,17 +297,15 @@ bool EtiReader::sourceContainsTimestamp() double EtiReader::getPPSOffset() { - if (!sourceContainsTimestamp()) + if (!sourceContainsTimestamp()) { + //fprintf(stderr, "****** SOURCE NO TS\n"); return 0.0; + } uint32_t timestamp = ntohl(eti_tist.TIST) & 0xFFFFFF; - //fprintf(stderr, "TIST 0x%x\n", timestamp); + //fprintf(stderr, "****** TIST 0x%x\n", timestamp); double pps = timestamp / 16384000.0; // seconds return pps; } -uint32_t EtiReader::getFCT() -{ - return eti_fc.FCT; -} |