Args improvments

This commit is contained in:
tmpbci 2019-03-20 17:33:09 +01:00
parent eb5b9b25f2
commit b6139525a5
9 changed files with 30 additions and 19 deletions

View File

@ -1,9 +1,9 @@
[General]
lasernumber = 4
debug = 0
ljayserverip = 127.0.0.1
ljayserverip = 192.168.2.13
nozoscip = 127.0.0.1
bhoroscip = 127.0.0.1
bhoroscip = 192.168.2.13
[laser0]
color = -1

2
cli.py
View File

@ -114,7 +114,7 @@ def handle():
if args.bhoroscIP != None:
gstt.oscIPin = args.bhoroscIP
else:
gstt.oscIPin = '127.0.0.1'
gstt.oscIPin = gstt.LjayServerIP
if args.nozoidIP != None:
gstt.nozoscIP = args.nozoidIP

View File

@ -112,6 +112,8 @@ wsPORT = 9001
# OSC Server : accept OSC message on port 8002
#oscIPin = "192.168.1.10"s
extoscIPin = serverIP
print "extoscIPin", extoscIPin
extoscPORTin = 8002
# OSC Client : to send OSC message to an IP port 8001

View File

@ -340,8 +340,9 @@ def Starfield(hori=0,verti=0):
lj3.DrawPL(3)
def OSCidiotia(address, value):
print("Pose bank idiotia got", address, "with value", value)
def OSCidiotia(address,value):
print("idiotia",address,value)
def OSCfield(address, value):
@ -401,6 +402,10 @@ anims =[[],[],[],[]]
color = lj3.rgb2int(255,255,255)
prepareIdiotIA()
#prepareSTARFIELD()

View File

@ -52,8 +52,8 @@ from osc4py3 import oscbuildparse
from osc4py3.oscmethod import *
redisIP = '127.0.0.1'
r = redis.StrictRedis(host=redisIP, port=6379, db=0)
#redisIP = '127.0.0.1'
#r = redis.StrictRedis(host=redisIP, port=6379, db=0)
ClientNumber = 0
@ -230,6 +230,7 @@ def Config(redisIP,client):
r = redis.StrictRedis(host=redisIP, port=6379, db=0)
ClientNumber = client
osc_udp_client(redisIP, 8002, "LJ 8002")
return r
def LjClient(client):

View File

@ -21,6 +21,7 @@ from osc4py3 import oscbuildparse
from osc4py3.oscmethod import *
OSCinPort = 8004
myIP = "192.168.2.52"
print ("")
print ("Arguments parsing if needed...")
@ -49,6 +50,7 @@ if args.redisIP != None:
else:
redisIP = '127.0.0.1'
print("redisIP",redisIP)
if args.verbose:
debug = args.verbose
@ -56,9 +58,9 @@ else:
debug = 0
lj3.Config(redisIP,ljclient)
r = lj3.Config(redisIP,ljclient)
print("r :",r)
width = 800
height = 600
centerX = width / 2
@ -159,12 +161,12 @@ def Run():
Left = []
Right = []
counter =0
WebStatus("LaserGlyph")
lj3.WebStatus("LaserGlyph")
# OSC Server callbacks
print("Starting OSC at 127.0.0.1 port",OSCinPort,"...")
print("Starting OSC at",myIP," port",OSCinPort,"...")
osc_startup()
osc_udp_server("127.0.0.1", OSCinPort, "InPort")
osc_udp_server(myIP, OSCinPort, "InPort")
osc_method("/ping*", lj3.OSCping)
osc_method("/glyph/ljclient", OSCljclient)
@ -227,7 +229,7 @@ def Run():
finally:
WebStatus("Glyph Exit")
lj3.WebStatus("Glyph Exit")
print("Stopping OSC...")
lj3.OSCstop()
pass

View File

@ -52,8 +52,8 @@ from osc4py3 import oscbuildparse
from osc4py3.oscmethod import *
redisIP = '127.0.0.1'
r = redis.StrictRedis(host=redisIP, port=6379, db=0)
#redisIP = '127.0.0.1'
#r = redis.StrictRedis(host=redisIP, port=6379, db=0)
ClientNumber = 0
@ -230,6 +230,7 @@ def Config(redisIP,client):
r = redis.StrictRedis(host=redisIP, port=6379, db=0)
ClientNumber = client
osc_udp_client(redisIP, 8002, "LJ 8002")
return r
def LjClient(client):

View File

@ -28,8 +28,8 @@ from osc4py3.as_eventloop import *
from osc4py3 import oscbuildparse
redisIP = '127.0.0.1'
r = redis.StrictRedis(host=redisIP, port=6379, db=0)
#redisIP = '127.0.0.1'
#r = redis.StrictRedis(host=redisIP, port=6379, db=0)
ClientNumber = 0

View File

@ -204,7 +204,7 @@
var pl = "";
var pl2 = new Array();
var _WS = {
uri: 'ws://127.0.0.1:9001/',
uri: 'ws://192.168.2.13:9001/',
ws: null,
init : function (e) {