Skip to content

Commit

Permalink
docs: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TedRio authored and sebastianpfischer committed Aug 21, 2024
1 parent e0bfa7a commit 1e799ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pykiso/lib/connectors/cc_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _cc_close(self) -> None:
"""Close serial port"""
self.serial.close()

def _cc_send(self, msg: ByteString, timeout: float = None, **kwargs) -> None:
def _cc_send(self, msg: Union[ByteString, str], timeout: float = None, **kwargs) -> None:
"""Sends data to the serial port
:param msg: data to send
Expand All @@ -198,6 +198,7 @@ def _cc_send(self, msg: ByteString, timeout: float = None, **kwargs) -> None:
self.current_write_timeout = timeout
self.serial.write_timeout = timeout

# Some auxiliaries pass msg as a string
if isinstance(msg, str):
msg = msg.encode()

Expand Down

0 comments on commit 1e799ce

Please sign in to comment.