From 34286c4877fa109081d288dc0fb58ff1fd3fd1b0 Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Tue, 28 Apr 2020 13:55:26 +0100 Subject: [PATCH] Fixed function name collision --- python/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/server.py b/python/server.py index 805149d..3945093 100755 --- a/python/server.py +++ b/python/server.py @@ -33,14 +33,14 @@ def prepare_grid(grid): out += 'q' return out -def serial(): +def serial_func(): with serial.Serial('/dev/ttyACM0', 9600, timeout=1) as ser: with lock: if data != '': serial.write(bytes(data, 'ascii')) data = '' -serial_thread = threading.Thread(target=serial) +serial_thread = threading.Thread(target=serial_func) serial_thread.start() if __name__ == '__main__':