summaryrefslogtreecommitdiffstats
path: root/src/TimestampDecoder.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-20 12:13:43 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-20 12:13:43 +0100
commitceb14883102e52daff611077adfe1b63837c3a76 (patch)
tree0a37d9d08065406fb83e401e68badb6a9b367edd /src/TimestampDecoder.cpp
parent01c0f656cafd657abc4c9d538101cf1170619951 (diff)
downloaddabmod-ceb14883102e52daff611077adfe1b63837c3a76.tar.gz
dabmod-ceb14883102e52daff611077adfe1b63837c3a76.tar.bz2
dabmod-ceb14883102e52daff611077adfe1b63837c3a76.zip
EDI input: decode timestamps
Diffstat (limited to 'src/TimestampDecoder.cpp')
-rw-r--r--src/TimestampDecoder.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/TimestampDecoder.cpp b/src/TimestampDecoder.cpp
index 42d53ab..eb3a848 100644
--- a/src/TimestampDecoder.cpp
+++ b/src/TimestampDecoder.cpp
@@ -34,8 +34,8 @@
#include "Eti.h"
#include "Log.h"
-//#define MDEBUG(fmt, args...) fprintf (LOG, "*****" fmt , ## args)
-#define MDEBUG(fmt, args...) PDEBUG(fmt, ## args)
+//#define MDEBUG(fmt, args...) fprintf (LOG, "*****" fmt , ## args)
+#define MDEBUG(fmt, args...) PDEBUG(fmt, ## args)
void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts)
@@ -44,7 +44,7 @@ void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts)
std::make_shared<struct frame_timestamp>();
/* Push new timestamp into queue */
- ts_queued->timestamp_valid = full_timestamp_received_mnsc;
+ ts_queued->timestamp_valid = full_timestamp_received;
ts_queued->timestamp_sec = time_secs;
ts_queued->timestamp_pps = time_pps;
ts_queued->fct = latestFCT;
@@ -144,7 +144,7 @@ void TimestampDecoder::pushMNSCData(int framephase, uint16_t mnsc)
if (enableDecode)
{
- full_timestamp_received_mnsc = true;
+ full_timestamp_received = true;
updateTimestampSeconds(mktime(&temp_time));
}
break;
@@ -205,6 +205,7 @@ void TimestampDecoder::updateTimestampEdi(
updateTimestampPPS(pps);
time_secs = seconds_utc;
latestFCT = fct;
+ full_timestamp_received = true;
}
void TimestampDecoder::set_parameter(