diff --git a/debian/changelog b/debian/changelog index 63127af..1239e43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ dump1090-mutability (1.15~dev) UNRELEASED; urgency=medium isn't root. (github issue #24) * Don't fail on postinst if the given user exists but is outside the usual system user UID range. (github issue #24) + * Fix timestamp correction when sample blocks are dropped. (github + issue #43) -- Oliver Jowett Thu, 19 Feb 2015 22:39:19 +0000 diff --git a/dump1090.c b/dump1090.c index b5989af..8d516ea 100644 --- a/dump1090.c +++ b/dump1090.c @@ -1065,7 +1065,10 @@ int main(int argc, char **argv) { // If we lost some blocks, correct the timestamp if (Modes.iDataLost) { - Modes.timestampBlk += (MODES_ASYNC_BUF_SAMPLES * 6 * Modes.iDataLost); + if (Modes.oversample) + Modes.timestampBlk += (MODES_ASYNC_BUF_SAMPLES * 5 * Modes.iDataLost); + else + Modes.timestampBlk += (MODES_ASYNC_BUF_SAMPLES * 6 * Modes.iDataLost); Modes.stats_current.blocks_dropped += Modes.iDataLost; Modes.iDataLost = 0; }