lpcmanager

Smarteh 485: uart data is copied to beremiz buffer even if reception was not successfull. This ensures that communication statuses are updated. Otherwise these statuses are not updated in case controller can't communicate with any slave. This bug was introduced in revision 614.
# Project name: SmartehIDE
# __init__.py.py: spacer widget module initialization
# 19. 01. 2017 12:24 Uporabnik
#
# Copyright (c) 2017 Smarteh d.o.o. <info@smarteh.si>
# THIS PROGRAM COMES WITH NO WARRANTY
import connectors
import Pyro.core
from connectors.PYRO import PYRO_connector_factory
oldPYRO_connector_factory = PYRO_connector_factory
def MW_PYRO_connector_factory(uri, confnodesroot):
servicetype, location = uri.split("://")
if servicetype == "PYROS":
schemename = "PYROLOCSSL"
else:
schemename = "PYROLOC"
def CustomFunctionCall(self, funcname, args=None):
member = self.__dict__.get(funcname, None)
if member is None:
def my_local_func(*args, **kwargs):
funcnameCall = funcname.split('.')[-1]
return RemoteMWControllerProxy.__getattr__(funcnameCall)(*args, **kwargs)
member = PyroCatcher(my_local_func, None)
self.__dict__[funcname] = member
return member
RemoteMWControllerProxy = Pyro.core.getAttrProxyForURI(schemename + "://" + location + "/MWController")
pyro_connector = oldPYRO_connector_factory(uri, confnodesroot)
if pyro_connector:
pyro_connector.RemoteMWControllerProxy = RemoteMWControllerProxy
pyro_connector.CustomFunctionCall = CustomFunctionCall
return pyro_connector
PYRO_connector_factory = MW_PYRO_connector_factory
connectors.connectors["PYRO"] = lambda: MW_PYRO_connector_factory