ignoring trailing \xff in byte stream
This commit is contained in:
parent
761aaccb3f
commit
007b3ea089
@ -116,7 +116,7 @@ class DSMRProtocol(asyncio.Protocol):
|
|||||||
|
|
||||||
def data_received(self, data):
|
def data_received(self, data):
|
||||||
"""Add incoming data to buffer."""
|
"""Add incoming data to buffer."""
|
||||||
data = data.decode("ascii")
|
data = data.decode("ascii", errors="ignore")
|
||||||
self._active = True
|
self._active = True
|
||||||
self.log.debug("received data: %s", data)
|
self.log.debug("received data: %s", data)
|
||||||
self.telegram_buffer.append(data)
|
self.telegram_buffer.append(data)
|
||||||
|
2
setup.py
2
setup.py
@ -7,7 +7,7 @@ setup(
|
|||||||
author_email='nigel@nldr.net',
|
author_email='nigel@nldr.net',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
url='https://github.com/ndokter/dsmr_parser',
|
url='https://github.com/ndokter/dsmr_parser',
|
||||||
version='0.30',
|
version='0.31',
|
||||||
packages=find_packages(exclude=('test', 'test.*')),
|
packages=find_packages(exclude=('test', 'test.*')),
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'pyserial>=3,<4',
|
'pyserial>=3,<4',
|
||||||
|
Loading…
Reference in New Issue
Block a user