From fed9a724ca91417e84071255890ec26ff797fd4f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 12 Jun 2015 07:42:22 +0200 Subject: Simplify TIST offset handling, add offset to RC This breaks old configuration files using synchronous=1 --- src/EtiReader.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/EtiReader.cpp') diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp index 100fbdb..2f088d5 100644 --- a/src/EtiReader.cpp +++ b/src/EtiReader.cpp @@ -51,13 +51,16 @@ enum ETI_READER_STATE { }; -EtiReader::EtiReader(struct modulator_offset_config& modconf) : +EtiReader::EtiReader(double tist_offset_s, unsigned tist_delay_stages, + RemoteControllers* rcs) : state(EtiReaderStateSync), myFicSource(NULL), - myTimestampDecoder(modconf) + myTimestampDecoder(tist_offset_s, tist_delay_stages) { PDEBUG("EtiReader::EtiReader()\n"); + myTimestampDecoder.enrol_at(*rcs); + myCurrentFrame = 0; eti_fc_valid = false; } @@ -284,11 +287,6 @@ int EtiReader::process(const Buffer* dataIn) myTimestampDecoder.updateTimestampEti(eti_fc.FP & 0x3, eti_eoh.MNSC, getPPSOffset(), eti_fc.FCT); - if (eti_fc.FCT % 125 == 0) //every 3 seconds is fine enough - { - myTimestampDecoder.updateModulatorOffset(); - } - return dataIn->getLength() - input_size; } -- cgit v1.2.3 From f73442eb24efa5842d625afa8715737c64863dc9 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 12 Jun 2015 09:44:28 +0200 Subject: EtiReader: remove unused vars --- src/EtiReader.cpp | 6 ++++-- src/EtiReader.h | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/EtiReader.cpp') diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp index 2f088d5..f584275 100644 --- a/src/EtiReader.cpp +++ b/src/EtiReader.cpp @@ -51,8 +51,10 @@ enum ETI_READER_STATE { }; -EtiReader::EtiReader(double tist_offset_s, unsigned tist_delay_stages, - RemoteControllers* rcs) : +EtiReader::EtiReader( + double tist_offset_s, + unsigned tist_delay_stages, + RemoteControllers* rcs) : state(EtiReaderStateSync), myFicSource(NULL), myTimestampDecoder(tist_offset_s, tist_delay_stages) diff --git a/src/EtiReader.h b/src/EtiReader.h index e3b8b0e..84ad9b4 100644 --- a/src/EtiReader.h +++ b/src/EtiReader.h @@ -47,7 +47,9 @@ class EtiReader { public: - EtiReader(double tist_offset_s, unsigned tist_delay_stages, + EtiReader( + double tist_offset_s, + unsigned tist_delay_stages, RemoteControllers* rcs); virtual ~EtiReader(); EtiReader(const EtiReader&); @@ -87,8 +89,6 @@ protected: private: size_t myCurrentFrame; - bool time_ext_enabled; - unsigned long timestamp_seconds; bool eti_fc_valid; }; -- cgit v1.2.3