logic master

This commit is contained in:
Simon 2020-10-04 15:50:13 +01:00
parent c4e1376aae
commit f20e3cfcbc

View File

@ -133,7 +133,7 @@ def make_bridges(_rules):
for _confsystem in CONFIG['SYSTEMS']:
#if _confsystem == 'OBP-BM':
if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE':
if CONFIG['SYSTEMS'][system]['MODE'] != 'MASTER':
continue
ts1 = False
ts2 = False
@ -161,7 +161,7 @@ def make_single_bridge(_tgid,_sourcesystem,_slot):
BRIDGES[_tgid_s] = []
for _system in CONFIG['SYSTEMS']:
#if _system != 'OBP-BM':
if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE':
if CONFIG['SYSTEMS'][system]['MODE'] == 'MASTER':
_tmout = CONFIG['SYSTEMS'][_system]['DEFAULT_UA_TIMER']
if _system == _sourcesystem:
if _slot == 1:
@ -213,7 +213,7 @@ def make_single_reflector(_tgid,_sourcesystem):
BRIDGES[_bridge] = []
for _system in CONFIG['SYSTEMS']:
#if _system != 'OBP-BM':
if CONFIG['SYSTEMS'][system]['MODE'] != 'OPENBRIDGE':
if CONFIG['SYSTEMS'][system]['MODE'] == 'MASTER':
_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)})