Skip to content

Commit

Permalink
Fix gaps and Sample rate issue
Browse files Browse the repository at this point in the history
  • Loading branch information
TenkyuChimata committed Jun 30, 2024
1 parent b2150f3 commit 3f95659
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Starting from v2.2.5, all notable changes to this project will be documented in this file.

## v2.12.6

- Fix gaps and Sample rate issue

## v2.12.5

- Fix gaps in MiniSEED records
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.12.5
v2.12.6
3 changes: 0 additions & 3 deletions driver/serial/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"io"
"math"
"time"
)

func Filter(port io.ReadWriteCloser, signature []byte) ([]byte, error) {
Expand All @@ -19,8 +18,6 @@ func Filter(port io.ReadWriteCloser, signature []byte) ([]byte, error) {

if bytes.Equal(header, signature) {
return header, nil
} else {
time.Sleep(time.Millisecond)
}
}

Expand Down
3 changes: 1 addition & 2 deletions feature/geophone/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ 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() - timeDiff.Milliseconds()
options.Status.Buffer.TS = currentTime.UnixMilli() - time.Second.Milliseconds()
// Set last received time is the current timestamp
options.Status.LastRecvTime = currentTime
options.Status.System.Messages++
Expand Down

0 comments on commit 3f95659

Please sign in to comment.