Loading player_functions.py +11 −1 Original line number Diff line number Diff line Loading @@ -72,9 +72,19 @@ def playTrack(track_path,port): try: retry=1 while retry==1: time.sleep(.5) if(proc.poll() is not None): retry=0 received_char="" while received_char is not "E": # Read one byte from the serial port data = display.read() # Decode the byte to a string received_char = data.decode('utf-8') # Check if the received character is 'E' if received_char == 'E': print("Received 'E' from serial port.") finally: # When we've stopped retrying, either because of stop command # or a finished track, terminate the subprocess if it hasn't already been Loading Loading
player_functions.py +11 −1 Original line number Diff line number Diff line Loading @@ -72,9 +72,19 @@ def playTrack(track_path,port): try: retry=1 while retry==1: time.sleep(.5) if(proc.poll() is not None): retry=0 received_char="" while received_char is not "E": # Read one byte from the serial port data = display.read() # Decode the byte to a string received_char = data.decode('utf-8') # Check if the received character is 'E' if received_char == 'E': print("Received 'E' from serial port.") finally: # When we've stopped retrying, either because of stop command # or a finished track, terminate the subprocess if it hasn't already been Loading