diff options
Diffstat (limited to 'src/DabMultiplexer.h')
-rw-r--r-- | src/DabMultiplexer.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/DabMultiplexer.h b/src/DabMultiplexer.h index 5a0d906..07b42a1 100644 --- a/src/DabMultiplexer.h +++ b/src/DabMultiplexer.h @@ -45,15 +45,14 @@ constexpr uint32_t ETI_FSYNC1 = 0x49C5F8; class MuxTime { private: - uint32_t m_timestamp = 0; std::time_t m_edi_time = 0; - uint32_t m_tist_at_fct0_us = 0; + uint32_t m_pps_offset_ms = 0; + int64_t m_tist_offset_ms = 0; public: std::pair<uint32_t, std::time_t> get_tist_seconds(); std::pair<uint32_t, std::time_t> get_milliseconds_seconds(); - double tist_offset = 0; /* Pre v3 odr-dabmux did the MNSC calculation differently, * which works with the easydabv2. The rework in odr-dabmux, @@ -69,8 +68,10 @@ class MuxTime { std::time_t mnsc_time = 0; /* Setup the time and return the initial currentFrame counter value */ - uint64_t init(uint32_t tist_at_fct0_us); + uint64_t init(uint32_t tist_at_fct0_us, double tist_offset); void increment_timestamp(); + double tist_offset() const { return m_tist_offset_ms * 1000.0; } + void set_tist_offset(double new_tist_offset); }; class DabMultiplexer : public RemoteControllable { |