fix control byte output in tx trace

This commit is contained in:
Stefan Allius
2023-10-03 14:01:42 +02:00
parent d308c3a9fa
commit 0886b30032
2 changed files with 2 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Prints version on start
- Prepare for MQTT component != sensor
- Add MQTT origin
- fix control byte output in tx trace
- dealloc async_stream instances in connection termination
## [0.0.4] - 2023-09-30

View File

@@ -194,7 +194,7 @@ class Message(metaclass=IterRegistry):
self.send_msg_ofs = len (self._send_buffer)
self._send_buffer += struct.pack(f'!l{len(self.id_str)+1}pBB', 0, self.id_str, ctrl, self.msg_id)
fnc = self.switch.get(self.msg_id, self.msg_unknown)
logger.info(self.__flow_str(self.server_side, 'tx') + f' Ctl: {int(self.ctrl):#02x} Msg: {fnc.__name__!r}' )
logger.info(self.__flow_str(self.server_side, 'tx') + f' Ctl: {int(ctrl):#02x} Msg: {fnc.__name__!r}' )
def __finish_send_msg(self) -> None:
_len = len(self._send_buffer) - self.send_msg_ofs