From b2150f37ca462897964cf5a71109f7e2fc09f4a3 Mon Sep 17 00:00:00 2001 From: Chengxun Lee <24319042+bclswl0827@users.noreply.github.com> Date: Sat, 18 May 2024 22:49:05 +0800 Subject: [PATCH] Fix gaps in MiniSEED records --- CHANGELOG.md | 4 ++++ VERSION | 2 +- feature/geophone/daemon.go | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 757e04aa..bfbd6dd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Starting from v2.2.5, all notable changes to this project will be documented in this file. +## v2.12.5 + +- Fix gaps in MiniSEED records + ## v2.12.4 - Update frontend map tile provider to OpenStreetMap diff --git a/VERSION b/VERSION index 0b95383a..8c118ca0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.12.4 +v2.12.5 diff --git a/feature/geophone/daemon.go b/feature/geophone/daemon.go index dbfed11a..0bfee72e 100644 --- a/feature/geophone/daemon.go +++ b/feature/geophone/daemon.go @@ -87,8 +87,9 @@ func (g *Geophone) Run(options *feature.FeatureOptions, waitGroup *sync.WaitGrou for { <-g.Ticker.C currentTime, _ := duration.Timestamp(options.Status.System.Offset) + timeDiff := duration.Difference(currentTime, options.Status.LastRecvTime) // Set packet timestamp, note that the timestamp in buffer is the start of the packet - options.Status.Buffer.TS = currentTime.UnixMilli() - time.Second.Milliseconds() + options.Status.Buffer.TS = currentTime.UnixMilli() - timeDiff.Milliseconds() // Set last received time is the current timestamp options.Status.LastRecvTime = currentTime options.Status.System.Messages++