Skip to content

Commit 3bd8a30

Browse files
authored
Merge pull request #32 from openUC2/mergebranch
Improving Debugging messages
2 parents 36856b1 + 917d92a commit 3bd8a30

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

uc2rest/UC2Client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class UC2Client(object):
2727
# BAUDRATE = 500000
2828
BAUDRATE = 115200
2929

30-
def __init__(self, host=None, port=31950, serialport=None, identity="UC2_Feather", baudrate=BAUDRATE, NLeds=64):
30+
def __init__(self, host=None, port=31950, serialport=None, identity="UC2_Feather", baudrate=BAUDRATE, NLeds=64, DEBUG=False):
3131
'''
3232
This client connects to the UC2-REST microcontroller that can be found here
3333
https://github.com/openUC2/UC2-REST
@@ -50,10 +50,10 @@ def __init__(self, host=None, port=31950, serialport=None, identity="UC2_Feather
5050
# initialize communication channel (# connect to wifi or usb)
5151
if serialport is not None:
5252
# use USB connection
53-
self.serial = Serial(serialport, baudrate, parent=self, identity=identity)
53+
self.serial = Serial(serialport, baudrate, parent=self, identity=identity, DEBUG=DEBUG)
5454
self.is_serial = True
5555
self.is_connected = True
56-
self.serial.DEBUG = True
56+
self.serial.DEBUG = DEBUG
5757
elif host is not None:
5858
# use client in wireless mode
5959
self.is_wifi = True

0 commit comments

Comments
 (0)