remove _forward_buffer

This commit is contained in:
Stefan Allius
2024-09-22 15:00:53 +02:00
parent 0b437cf3bc
commit eea725b8da
5 changed files with 154 additions and 181 deletions

View File

@@ -264,9 +264,8 @@ class SolarmanV5(Message):
return
tsun = Config.get('solarman')
if tsun['enabled']:
self._forward_buffer += buffer[:buflen]
hex_dump_memory(logging.DEBUG, 'Store for forwarding:',
buffer, buflen)
self.ifc.forward += buffer[:buflen]
self.ifc.forward.logging(logging.DEBUG, 'Store for forwarding:')
fnc = self.switch.get(self.control, self.msg_unknown)
logger.info(self.__flow_str(self.server_side, 'forwrd') +
@@ -467,8 +466,9 @@ class SolarmanV5(Message):
0x0002, 0, 0, 0,
at_cmd.encode('utf-8'), b'\r')
self.__finish_send_msg()
self.ifc.write.logging(logging.INFO, 'Send AT Command:')
try:
await self.async_write('Send AT Command:')
self.ifc.write()
except Exception:
self.ifc.write.clear()