mirror of https://bitbucket.org/ausocean/av.git
Merge branch 'master' into audiopath
This commit is contained in:
commit
594d1c4f5c
|
@ -136,14 +136,16 @@ func extractMeta(r string, log func(lvl int8, msg string, args ...interface{}))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// Extract time from reply
|
// Extract time from reply if mts.Realtime has not been set.
|
||||||
|
if !mts.RealTime.IsSet() {
|
||||||
t, err := dec.Int("ts")
|
t, err := dec.Int("ts")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log(logger.Warning, "No timestamp in reply")
|
log(logger.Warning, "No timestamp in reply")
|
||||||
} else {
|
} else {
|
||||||
log(logger.Debug, fmt.Sprintf("got timestamp: %v", t))
|
log(logger.Debug, "got timestamp", "ts", t)
|
||||||
mts.RealTime.Set(time.Unix(int64(t), 0))
|
mts.RealTime.Set(time.Unix(int64(t), 0))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Extract location from reply
|
// Extract location from reply
|
||||||
g, err := dec.String("ll")
|
g, err := dec.String("ll")
|
||||||
|
|
Loading…
Reference in New Issue