From e4e70b93d0756a7201c8a9f3f32721b225ae059b Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Thu, 17 May 2018 19:17:56 +0000 Subject: Fixed serialization problem with numpy array --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 47bc931..f9165b1 100644 --- a/server.py +++ b/server.py @@ -29,7 +29,7 @@ def send_state(): global all_clients state = { "saves": os.listdir(SAVES_DIR), - "pixels": unicorn.get_pixels() + "pixels": unicorn.get_pixels().tolist() } stateJson = json.dumps(state) for client in all_clients: @@ -106,4 +106,4 @@ def main(): if __name__=="__main__": main() - \ No newline at end of file + -- cgit v1.2.3-ZIG From 3aaf918e40ad68c97e542bc596f630b58991ff66 Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Thu, 17 May 2018 19:35:13 +0000 Subject: Added docker-compose. Explictly use latest python --- docker-compose.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1730cc4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3' +services: + unicornpaint: + build: . + image: mfashby/unicornpaint + ports: + - "3001:3001" + volumes: + - "/dev/spidev0.0:/dev/spidev0.0" + - "/home/pi/unicornpaint/saves/:/saves/" -- cgit v1.2.3-ZIG