fix for ttyplot
This commit is contained in:
parent
e94bd60330
commit
26539285c8
@ -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
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user