I have been working around with a XBEE S2B Pro and a ConnectPort X4 and I have some questions about the drives xbee_sensor.py that can be found in folder C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\devices\xbee\xbee_devices\xbee_sensor.py
I have inserted some Traces in the drives to understand how it works.
In one of my traces, I could see that inside the def sample_indication(self, buf, addr): the snippet
if self.__tracer.info():
msg = []
TRACER.critical('msg = [] %s', self.__tracer.info())
else:
msg = None
TRACER.critical('msg = None %s', self.__tracer.info())
returns msg = None False
As the subsequent code depends on the content of the msg
if msg is not None:
msg.append("%d %s" % (temperature, scale))
the temperature is not appended in msg buffer, which leads to msg buffer is not filled with any data.
My question is: why is the test self.__tracer.info()
done?