Skip to content

Commit

Permalink
Fix option name collision in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
svpcom committed Dec 19, 2023
1 parent ecdca20 commit b5db8d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions wfb_ng/conf/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fec_n = 2 # FEC N (For tx side. Rx will get FEC settings from session
fec_timeout = 0 # [ms], 0 to disable. If no new packets during timeout, emit one empty packet if FEC block is open

peer = None
mirror = None
osd = None

inject_rssi = True # inject RADIO_STATUS packets
mavlink_sys_id = 3 # for injected rssi packets
Expand Down Expand Up @@ -196,7 +196,7 @@ peer = 'connect://127.0.0.1:5600' # outgoing connection for video sink (GS)
[gs_mavlink]
peer = 'connect://127.0.0.1:14550' # outgoing connection
# peer = 'listen://0.0.0.0:14550' # incoming connection
# mirror = 'connect://127.0.0.1:14551' # mirroring mavlink packets to OSD
# osd = 'connect://127.0.0.1:14551' # mirroring mavlink packets to OSD


[gs_tunnel]
Expand Down
12 changes: 6 additions & 6 deletions wfb_ng/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def init_mavlink(service_name, cfg, wlans, link_id, ant_sel_f):
listen = None
connect = None
serial = None
mirror = None
osd_peer = None

if connect_re.match(cfg.peer):
m = connect_re.match(cfg.peer)
Expand All @@ -519,10 +519,10 @@ def init_mavlink(service_name, cfg, wlans, link_id, ant_sel_f):
else:
raise Exception('Unsupported peer address: %s' % (cfg.peer,))

if cfg.mirror is not None and connect_re.match(cfg.mirror):
m = connect_re.match(cfg.mirror)
mirror = m.group('addr'), int(m.group('port'))
log.msg('Mirror %s stream to %s:%d' % (service_name, mirror[0], mirror[1]))
if cfg.osd is not None and connect_re.match(cfg.osd):
m = connect_re.match(cfg.osd)
osd_peer = m.group('addr'), int(m.group('port'))
log.msg('Mirror %s stream to OSD at %s:%d' % (service_name, osd_peer[0], osd_peer[1]))

rx_hooks = []
tx_hooks = []
Expand All @@ -544,7 +544,7 @@ def init_mavlink(service_name, cfg, wlans, link_id, ant_sel_f):
p_in = MavlinkUDPProxyProtocol(connect, agg_max_size=settings.common.radio_mtu,
agg_timeout=settings.common.mavlink_agg_timeout,
inject_rssi=cfg.inject_rssi,
mirror=mirror,
mirror=osd_peer,
mavlink_sys_id=cfg.mavlink_sys_id,
mavlink_comp_id=cfg.mavlink_comp_id,
rx_hooks=rx_hooks, tx_hooks=tx_hooks)
Expand Down

0 comments on commit b5db8d0

Please sign in to comment.