diff --git a/flandre/launcher.py b/flandre/launcher.py index 4bcc0ea..9494434 100644 --- a/flandre/launcher.py +++ b/flandre/launcher.py @@ -218,15 +218,21 @@ def device_upload(name, file: TextIOWrapper): @device.command('recvtest') -def device_upload(): +def device_recv_test(): ctx = zmq.Context() pull = ctx.socket(zmq.PULL) pull.connect(C.live_push_socket) last_ts = 0 + first = True while True: b = pull.recv() + ts, sequence_id, encoder, buffer = b2t(b) - print(ts, ts - last_ts) + if first: + last_ts = ts + first = False + continue + print((ts - last_ts)/10**6,flush=True) last_ts = ts