webui simu with colors

This commit is contained in:
nrhck 2018-12-19 12:39:54 +01:00
parent 4bacb00395
commit b6909e4490
8 changed files with 53 additions and 41 deletions

View file

@ -83,6 +83,9 @@ console.log(pl0);
console.log(pl1);
// Send points lists to redis server
// /pl/clientnumber/lasernumber pointlist
// you're client 0 and want to send points to laser 0 and 1
client.set("/pl/0/0",pl0);
client.set("/pl/0/1",pl1);

View file

@ -25,6 +25,10 @@ def rgb2int(r,g,b):
# White rectangular shape
pl1 = [(100,300,rgb2int(255,255,255)),(200,300,rgb2int(255,255,255)),(200,200,rgb2int(255,255,255)),(100,200,rgb2int(255,255,255))]
# /pl/clientnumber/lasernumber pointlist
# Consider you're client 0
# Send to laser 0 (see mainy.conf)
r.set('/pl/0/0', str(pl0))