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 valuemaster
parent
64c6b6da23
commit
775dbf25f4
|
@ -10,9 +10,10 @@ seg_windows = 12
|
||||||
segments = 8 # number of segments in a window (7 + period/dot/point)
|
segments = 8 # number of segments in a window (7 + period/dot/point)
|
||||||
width = 12
|
width = 12
|
||||||
height = 8
|
height = 8
|
||||||
|
zlevel = 20
|
||||||
segchannels = 4 # RGBA
|
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()
|
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.setwin_xy_srgba_array(rx, ry, [0, randint(0,127), randint(0, 127), randint(0, 127), 255])
|
||||||
cell.draw()
|
cell.draw()
|
||||||
|
|
||||||
time.sleep(0.5)
|
time.sleep(0.1)
|
||||||
|
|
||||||
# end of main animation loop
|
# end of main animation loop
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,13 @@ import time
|
||||||
from math import *
|
from math import *
|
||||||
|
|
||||||
# Set the socket parameters
|
# Set the socket parameters
|
||||||
local_port = 5003
|
local_port = 5004
|
||||||
# direct html udp port
|
# direct html udp port
|
||||||
remote_port = 4422
|
remote_port = 4422
|
||||||
# production port
|
# production port
|
||||||
remote_port = 4321
|
remote_port = 4321
|
||||||
|
|
||||||
|
zlevel=15
|
||||||
# TODO: autodetect interface address for remote application
|
# TODO: autodetect interface address for remote application
|
||||||
outgoing_if = "127.0.0.1"
|
outgoing_if = "127.0.0.1"
|
||||||
remote_host = "127.0.0.1"
|
remote_host = "127.0.0.1"
|
||||||
|
@ -31,7 +32,7 @@ hash = "s2l\n<8<18 " # 10 bytes
|
||||||
|
|
||||||
alpha = chr(55)
|
alpha = chr(55)
|
||||||
|
|
||||||
z_buffer = chr(1) + "\n"
|
z_buffer = chr(zlevel) + "\n"
|
||||||
|
|
||||||
width = 12
|
width = 12
|
||||||
height = 8
|
height = 8
|
||||||
|
|
|
@ -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 = 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.connect()
|
||||||
test.reset_windows(0, 0, 0, 0, 127)
|
test.reset_windows(0, 0, 0, 0, 0)
|
||||||
test.reset_segment_windows(0, 255, 255, 255, 255)
|
test.reset_segment_windows(0, 255, 255, 255, 0)
|
||||||
|
|
||||||
x = 0
|
x = 0
|
||||||
y = 0
|
y = 0
|
||||||
|
|
|
@ -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"
|
Loading…
Reference in New Issue