This commit is contained in:
Stuart Feichtinger 2016-01-31 18:57:31 -06:00
parent bdf3e427cc
commit f84dd400ed

View File

@ -85,11 +85,16 @@ def parseMsg(payload):
https://docs.python.org/2/library/struct.html https://docs.python.org/2/library/struct.html
''' '''
charAry, val1, val2, val3 = parsedStruct.unpack_from(arr) charAry, val1, val2, val3 = parsedStruct.unpack_from(arr) #convert byte array to formatted struct
charAry = charAry.rstrip(' \t\r\n\0') #remove trailing white space from buffer charAry = charAry.rstrip(' \t\r\n\0') #remove trailing white space from buffer
return charAry, val1, val2, val3 return charAry, val1, val2, val3
def main(): def main():
"""Wait for incoming message published by Adafruit MQTT client""" """Wait for incoming message published by Adafruit MQTT client"""
global args global args