Commit cf19f3be authored by Peter-Bernd Otte's avatar Peter-Bernd Otte

corrected bug in loger.info call

parent 6096b3e0
......@@ -64,6 +64,8 @@ def ESPCRC(fDaten):
u8CRC = CRCWerteTabelle[u8CRC ^ x]
return u8CRC
def bytearray_2_str(fba) -> str:
return '0x'+''.join("{:02x}".format(x) for x in fba)
ser = serial.Serial(args.serial_device_name, 57600, timeout=0)
......@@ -92,7 +94,8 @@ while (WatchDogCounter > 0):
t = time.mktime(t.timetuple()) + t.microsecond / 1E6
pData, pOptData = charSet[6:6+pDataLength], charSet[6 +
pDataLength:6+pDataLength+pOptionalLength]
logger.info("pPaketType: "+str(pPaketType)+" Data: "+str(pData), " OptData: "+str(pOptData))
logger.info("pPaketType: "+str(pPaketType)+" Data: "+bytearray_2_str(pData)+
" OptData: "+bytearray_2_str(pOptData))
# list() converts bytearray into array of int
t = datetime.now()
t = time.mktime(t.timetuple()) + t.microsecond / 1E6
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment