debug
This commit is contained in:
parent
404ce769b6
commit
2cd7c4ee35
@ -60,7 +60,7 @@ class SoftwareConfig:
|
|||||||
video_height: int = 1080
|
video_height: int = 1080
|
||||||
video_width: int = 960
|
video_width: int = 960
|
||||||
|
|
||||||
live_ip: str = 'vmaosmax.as'
|
live_ip: str = 'vmaosmax'
|
||||||
live_push_port: int = 5555
|
live_push_port: int = 5555
|
||||||
live_rep_port: int = 5556
|
live_rep_port: int = 5556
|
||||||
device_py_rep_port: int = 5558
|
device_py_rep_port: int = 5558
|
||||||
|
|||||||
@ -191,7 +191,10 @@ dd: Device = None
|
|||||||
|
|
||||||
|
|
||||||
@entrypoint.group()
|
@entrypoint.group()
|
||||||
def device():
|
@click.option('--ip', default=None)
|
||||||
|
def device(ip):
|
||||||
|
if ip is not None:
|
||||||
|
C.live_ip = ip
|
||||||
global device_req
|
global device_req
|
||||||
ctx = zmq.Context()
|
ctx = zmq.Context()
|
||||||
device_req = ctx.socket(zmq.REQ)
|
device_req = ctx.socket(zmq.REQ)
|
||||||
@ -243,10 +246,15 @@ def device_recvmonitor():
|
|||||||
ctx = zmq.Context()
|
ctx = zmq.Context()
|
||||||
pull = ctx.socket(zmq.PULL)
|
pull = ctx.socket(zmq.PULL)
|
||||||
pull.connect(C.live_push_socket)
|
pull.connect(C.live_push_socket)
|
||||||
|
last_device_ts_low = 0
|
||||||
|
last_host_ts = 0
|
||||||
while True:
|
while True:
|
||||||
b = pull.recv()
|
b = pull.recv()
|
||||||
seq, encoder, host_ts, device_ts_low, device_ts_high, buffer = b2t(b)
|
seq, encoder, host_ts, device_ts_low, device_ts_high, buffer = b2t(b)
|
||||||
print(f'S={seq} E={encoder} HT={host_ts} DTL={device_ts_low} BS={buffer.__len__()}')
|
print(
|
||||||
|
f'S={seq} E={encoder} HT={host_ts} DTL={device_ts_low} HTDF={host_ts - last_host_ts} DTLDF={device_ts_low - last_device_ts_low} DTH={device_ts_high} BS={buffer.__len__()}')
|
||||||
|
last_device_ts_low = device_ts_low
|
||||||
|
last_host_ts = host_ts
|
||||||
|
|
||||||
|
|
||||||
@device.command('recvplot')
|
@device.command('recvplot')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user