diff --git a/clients/cellular.py b/clients/cellular.py index d474dc8..19068f3 100644 --- a/clients/cellular.py +++ b/clients/cellular.py @@ -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 diff --git a/clients/plasma.py b/clients/plasma.py index 96fb514..b924b80 100644 --- a/clients/plasma.py +++ b/clients/plasma.py @@ -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 diff --git a/clients/test.py b/clients/test.py index fe3d89a..bbd468d 100644 --- a/clients/test.py +++ b/clients/test.py @@ -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 diff --git a/run-it-all1.sh b/run-it-all1.sh new file mode 100755 index 0000000..21f03c2 --- /dev/null +++ b/run-it-all1.sh @@ -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"