Fix debug printing in uart-passthrough demo

This commit is contained in:
Wladimir J. van der Laan 2019-05-27 09:50:44 +02:00
parent d14c640356
commit 678366a4d6

View File

@ -214,7 +214,7 @@ class ESP8266(object):
return self._getResponse()
def _sendStr(self, s):
logging.debug('> %s' % s)
logging.debug('> %s' % s.decode())
self._serial.flushInput()
self._serial.write(s + b'\r\n')
# eat echo
@ -230,7 +230,7 @@ class ESP8266(object):
' / '.format(responseLines_list)))
r = r.strip()
if r:
logging.debug('< {}'.format(r))
logging.debug('< {}'.format(r.decode()))
responseLines_list.append(r)
if (r.lower() in self._successResponse_list):
return responseLines_list