Browse Source

adding logging feature

Kübler, Carina | Friedrich Lütze GmbH 2 năm trước cách đây
mục cha
commit
747f6042c9
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      python_driver/shellmatta_transport_serial.py

+ 3 - 0
python_driver/shellmatta_transport_serial.py

@@ -4,6 +4,8 @@ import time
 import serial
 import argparse
 from shellmatta_transport import ShellmattaTransport
+from robot.api import logger
+
 
 class ShellmattaSerial():
     """ Helper class to communicate with a shelmatta enabled device """
@@ -12,6 +14,7 @@ class ShellmattaSerial():
     def __init__(self, com_port, baudrate=115200, prompt="->", timeout=1, transport_layer_mandatory=False):
         """ create the transport layer instance using the passed com port """
         self.prompt = prompt
+        self.com = com_port
         self.com_port = serial.Serial(com_port, baudrate=baudrate, timeout=timeout)
 
         self.transport = ShellmattaTransport(self.com_port,