aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ashby <martin@martin-laptop.lan>2018-05-17 20:57:18 +0100
committerMartin Ashby <martin@martin-laptop.lan>2018-05-17 20:57:18 +0100
commite8215610fda6a39cf57dd19367fe9757597d31e7 (patch)
treef8f63fd19cabb8be787baafe6e1b02cff8e65679
parent8add16bd0fff15dffe3b0a7931052c5218108cc1 (diff)
parent3aaf918e40ad68c97e542bc596f630b58991ff66 (diff)
downloadunicornpaint-e8215610fda6a39cf57dd19367fe9757597d31e7.tar.gz
unicornpaint-e8215610fda6a39cf57dd19367fe9757597d31e7.tar.bz2
unicornpaint-e8215610fda6a39cf57dd19367fe9757597d31e7.tar.xz
unicornpaint-e8215610fda6a39cf57dd19367fe9757597d31e7.zip
Merge branch 'master' of github.com:MFAshby/unicornpaint
-rw-r--r--docker-compose.yml10
-rw-r--r--server.py4
2 files changed, 12 insertions, 2 deletions
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/"
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
+