From c4e1376aae07d83cbe287c545648e86dbc4298c6 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 4 Oct 2020 15:42:52 +0100 Subject: [PATCH] tidy up special openbridge handling --- bridge_master.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bridge_master.py b/bridge_master.py index 342df37..317b975 100755 --- a/bridge_master.py +++ b/bridge_master.py @@ -132,7 +132,8 @@ def make_bridges(_rules): # continue for _confsystem in CONFIG['SYSTEMS']: - if _confsystem == 'OBP-BM': + #if _confsystem == 'OBP-BM': + if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE': continue ts1 = False ts2 = False @@ -159,7 +160,8 @@ def make_single_bridge(_tgid,_sourcesystem,_slot): _tgid_s = str(int_id(_tgid)) BRIDGES[_tgid_s] = [] for _system in CONFIG['SYSTEMS']: - if _system != 'OBP-BM': + #if _system != 'OBP-BM': + if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE': _tmout = CONFIG['SYSTEMS'][_system]['DEFAULT_UA_TIMER'] if _system == _sourcesystem: if _slot == 1: @@ -210,7 +212,8 @@ def make_single_reflector(_tgid,_sourcesystem): _bridge = '#' + _tgid_s BRIDGES[_bridge] = [] for _system in CONFIG['SYSTEMS']: - if _system != 'OBP-BM': + #if _system != 'OBP-BM': + if CONFIG['SYSTEMS'][system]['MODE'] != 'OPENBRIDGE': _tmout = CONFIG['SYSTEMS'][_system]['DEFAULT_UA_TIMER'] if _system == _sourcesystem: BRIDGES[_bridge].append({'SYSTEM': _system, 'TS': 2, 'TGID': bytes_3(9),'ACTIVE': True,'TIMEOUT': _tmout * 60,'TO_TYPE': 'ON','OFF': [],'ON': [_tgid,],'RESET': [], 'TIMER': time() + (_tmout * 60)})