Skip to content

Commit d638553

Browse files
committed
Fix timestamps of ssl-auto-ref-ci-client
1 parent 7c61c13 commit d638553

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/ssl-auto-ref-ci-client/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ func main() {
3131
simulate()
3232
sendAutoRefCi(autoRefConn, detectionFrame)
3333
trackerFrame := receiveAutoRefCi(autoRefConn)
34+
if trackerFrame == nil {
35+
return
36+
}
3437
sendCi(gcConn, trackerFrame)
3538
refereeMsg = receiveCi(gcConn)
3639
time.Sleep(10 * time.Millisecond)
@@ -111,8 +114,8 @@ func receiveCi(conn net.Conn) *state.Referee {
111114
func sendAutoRefCi(conn net.Conn, detectionFrame *vision.SSL_DetectionFrame) {
112115
timestamp := time.Now().UnixNano()
113116

114-
*detectionFrame.TSent = float64(timestamp / 1e9)
115-
*detectionFrame.TCapture = float64(timestamp / 1e9)
117+
*detectionFrame.TSent = float64(timestamp) / 1e9
118+
*detectionFrame.TCapture = float64(timestamp) / 1e9
116119
*detectionFrame.FrameNumber++
117120
input := autoref.AutoRefCiInput{
118121
Detection: []*vision.SSL_DetectionFrame{detectionFrame},

0 commit comments

Comments
 (0)