add a script to start the demos in one command. runs frameserver, nocejs, browser and 2 clients

changed some bits in clients: ports and z value
master
Gunstick 2013-10-08 21:52:38 +02:00
parent 64c6b6da23
commit 775dbf25f4
4 changed files with 29 additions and 6 deletions

View File

@ -10,9 +10,10 @@ seg_windows = 12
segments = 8 # number of segments in a window (7 + period/dot/point)
width = 12
height = 8
zlevel = 20
segchannels = 4 # RGBA
cell = syndelights_canvas("s2l\n<8<18 ", 1, width, height, seg_windows, "127.0.0.1", 5001, "127.0.0.1", 4321, 2)
cell = syndelights_canvas("s2l\n<8<18 ", zlevel, width, height, seg_windows, "127.0.0.1", 5001, "127.0.0.1", 4321, 2)
cell.connect()
@ -31,7 +32,7 @@ while True:
cell.setwin_xy_srgba_array(rx, ry, [0, randint(0,127), randint(0, 127), randint(0, 127), 255])
cell.draw()
time.sleep(0.5)
time.sleep(0.1)
# end of main animation loop

View File

@ -6,12 +6,13 @@ import time
from math import *
# Set the socket parameters
local_port = 5003
local_port = 5004
# direct html udp port
remote_port = 4422
# production port
remote_port = 4321
zlevel=15
# TODO: autodetect interface address for remote application
outgoing_if = "127.0.0.1"
remote_host = "127.0.0.1"
@ -31,7 +32,7 @@ hash = "s2l\n<8<18 " # 10 bytes
alpha = chr(55)
z_buffer = chr(1) + "\n"
z_buffer = chr(zlevel) + "\n"
width = 12
height = 8

View File

@ -10,8 +10,8 @@ test = syndelights_canvas("s2l\n<8<18 ", 1, width, height, seg_windows, "127.0.0
test = syndelights_canvas("s2l\n<8<18 ", 1, width, height, seg_windows, "127.0.0.1", 5002, "127.0.0.1", 4321, 3)
test.connect()
test.reset_windows(0, 0, 0, 0, 127)
test.reset_segment_windows(0, 255, 255, 255, 255)
test.reset_windows(0, 0, 0, 0, 0)
test.reset_segment_windows(0, 255, 255, 255, 0)
x = 0
y = 0

21
run-it-all1.sh Executable file
View File

@ -0,0 +1,21 @@
# this works with debian style linux
PATH=$PATH:~/nodejs/bin/
if [ "$(which x-terminal-emulator)" = "" ]
then
xt=xterm
else
xt=x-terminal-emulator
fi
if [ "$(which node)" = "" ]
then
echo "cannot find nodejs program 'node' in your path"
exit 1
fi
$xt -t "central frameserver" -e frameserver/frameserver &
$xt -t "webserver" -e "$(which node) displayclienthtml/ws_udp.js" &
sleep 5
chromium-browser displayclienthtml/visionneuse.html ||
x-www-browser displayclienthtml/visionneuse.html &
$xt -t "client: plasma" -e "python clients/plasma.py" &
sleep 20
$xt -t "client: cellular" -e "python clients/cellular.py"