tracer shutdown order

This commit is contained in:
Sam 2023-07-09 16:09:18 +02:00
parent 23a07470e6
commit e45ab18f5d
14 changed files with 80 additions and 60 deletions

74
LJ.conf
View File

@ -10,47 +10,47 @@ wstype = ws
wsport = 9001
[laser0]
dac_family = helios
color = -1
type = DS1000
type = LOCAL
dac_family = helios
ip = 127.0.0.1
kpps = 31921
kpps = 32692
centerx = -5376.0
centery = 11844.0
zoomx = 29.15625
zoomy = 31.21875
sizex = 32000.0
sizey = 32000.0
finangle = 0.0
intens = 255.0
red = 100
green = 100
blue = 100
centerx = -21504.0
centery = 21000.0
zoomx = 48.0
zoomy = 47.4375
sizex = 32000.0
sizey = 32000.0
finangle = 3.246312408709453
swapx = -1
swapy = -1
lsteps = [ (1.0, 1),(0.25, 1), (0.75, 1), (1.0, 1)]
lsteps = [ (1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[laser1]
dac_family = etherdream
color = -1
type = LOCAL
ip = 192.168.2.4
kpps = 27000
intens = 255.0
dac_family = helios
ip = 192.168.2.5
kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
intens = 255
red = 100
green = 100
blue = 100
centerx = 6340.91015625
centery = 2181.81640625
zoomx = 41.71875
zoomy = 46.3125
sizex = 32000.0
sizey = 32000.0
finangle = 0.0
swapx = -1
swapy = -1
lsteps = [ (1.0, 2),(0.25, 1), (0.75, 1), (1.0, 5)]
@ -60,22 +60,22 @@ warpdest = [[-1500., 1500.],
[-1500.,-1500.]]
[laser2]
dac_family = etherdream
color = -1
type = LUKE400
dac_family = helios
ip = 192.168.2.6
kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
intens = 255
red = 100
green = 100
blue = 100
centerx = 0
centery = 0
zoomx = 10.0
zoomy = 10.0
sizex = 32000
sizey = 32000
finangle = 0.0
swapx = -1
swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
@ -85,22 +85,22 @@ warpdest = [[-1500., 1500.],
[-1500.,-1500.]]
[laser3]
dac_family = etherdream
color = -1
type = LUKE400
dac_family = helios
ip = 192.168.1.5
kpps = 25000
intens = 255
red = 100
green = 100
blue = 100
centerx = 0
centery = 0
zoomx = 10.0
zoomy = 10.0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
intens = 255
red = 100
green = 100
blue = 1000
swapx = -1
swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]

View File

@ -24,7 +24,7 @@
<!-- Logo -->
<div id="logo">
<h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p>
<p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div>
<!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo -->
<div id="logo">
<h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p>
<p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div>
<!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo -->
<div id="logo">
<h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p>
<p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div>
<!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo -->
<div id="logo">
<h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p>
<p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div>
<!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo -->
<div id="logo">
<h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p>
<p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div>
<!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo -->
<div id="logo">
<h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p>
<p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div>
<!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo -->
<div id="logo">
<h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p>
<p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div>
<!-- Nav -->
@ -78,7 +78,7 @@
<li><strong>/EDH/lasernumber : </strong>Internal. Order for tracer to update its homography.</li>
<br>
<li>- Tracer control : </li>
<li><strong>/order : </strong>0 : Draw Normal pointlists _1 : Get the new EDH _2 : Draw BLACK _3 : Draw GRID point list _4 : Resampler Change _5 : Client Key Change. _6 : Max Intensity Change _7 : kpps change _8 : color balance change.</li>
<li><strong>/order : </strong>0 : Draw Normal pointlists _1 : Get the new EDH _2 : Draw BLACK _3 : Draw GRID point list _4 : Resampler Change _5 : Client Key Change. _6 : Max Intensity Change _7 : kpps change _8 : color balance change -9 : Shutdown.</li>
<li><strong>/kpps : </strong>0- DAC output speed to laser, then order 7. Depends of actual angle.</li>
<li><strong>/intensity : </strong>0-255 Laser output power, then order 6 (for alignement,...).</li>
<li><strong>/red : </strong>0-100 % of full red, then order 8.</li>

View File

@ -184,6 +184,7 @@ def SceneChange(newscene):
# Change current laser and send "/scim lasernumber to each plugin"
def NoteOn(note):
print()
print("NoteOn", note)
# Change laser client
if note < 8:
@ -201,7 +202,7 @@ def NoteOn(note):
gstt.Laser = note -24
print("Current Laser switched to", gstt.Laser)
plugins.sendWSall("/status Laser " + str(gstt.Laser))
plugins.SendAll(["/scim", str(gstt.Laser), 1])
plugins.SendAll("/scim "+str(gstt.Laser))
print("sending cropper data..")
plugins.sendWSall("/loffset/X/" + str(gstt.Laser) +" " +str(gstt.centerX[gstt.Laser]))
plugins.sendWSall("/loffset/Y/" + str(gstt.Laser) +" " +str(gstt.centerY[gstt.Laser]))
@ -299,6 +300,7 @@ def handler(oscpath, args):
elif oscpath[1] == "noteon":
NoteOn(int(args[0]))
@ -715,6 +717,12 @@ def LJautokill():
log.warn("LJ stopping...")
print(gstt.LaserNumber,"Tracers launched")
for laser in range(gstt.LaserNumber):
if gstt.debug > 0:
print('Shutdown order for tracer '+str(laser), 9)
r.set('/order/'+str(laser), 9)
lasernumber= gstt.LaserNumber -1
log.warn("Ending tracer0...")
worker0.join()

View File

@ -97,6 +97,7 @@ def Restart(name):
def Start(name):
# get Plugin configuration.
print("plugins starting ",name)
command = Command(name)
sendWSall("/status Starting "+name+"...")
@ -206,6 +207,8 @@ def SendAll(oscpath):
for plugin in list(gstt.plugins.keys()):
if gstt.debug > 0:
print("plugin",plugin)
print('oscpath', oscpath)
print("sending /"+plugin+oscpath,"to", plugin)
print("sending /"+plugin+oscpath[0],"to", plugin)
#sendWSall("/"+ plugin + "/start 0")

View File

@ -44,6 +44,7 @@ This tracer include an enhanced version (support for several lasers) of the ethe
6 : Max Intensity Change = reread redis key /intensity
7 : kpps change = reread redis key /kpps
8 : color balance change = reread redis keys /red /green /blue
9 : shutdown
- Managing Etherdream DACs :

View File

@ -112,7 +112,13 @@ print("Start Scene number :",gstt.SceneNumber)
debug = gstt.debug
print("Debug :", debug)
print("Laser feedbacks resetting...")
for laserid in range(0,gstt.LaserNumber):
r.set('/lack/'+str(laserid),64)
r.set('/lstt/'+str(laserid),64)
r.set('/cap/'+str(laserid),0)
r.set('/order/'+str(laserid), 0)
'''
# Nozoid OSC Client : to send OSC message to Nozoid inport 8003

View File

@ -228,7 +228,7 @@ args = argsparser.parse_args()
if args.verbose:
debug = args.verbose
else:
debug = 0
debug = 1
if args.scene:
ljscene = args.scene
@ -372,13 +372,12 @@ def OSChandler(path, tags, args, source):
#print()
print("Aurora default OSC Handler : " + str(path) + " from Client : " + str(source[0]))
#print(args)
if len(args) > 0:
pass
# OSC ui connection
if path.find("/connect") :
print("OSCUI asked by", source)
if path.find("/connect") == 0:
print("Aurora : OSCUI asked by", source)
gstt.TouchOSCUI = True
gstt.TouchOSCIP= source[0]
beatstepUI()
@ -403,10 +402,10 @@ def OSChandler(path, tags, args, source):
#log.info("with args " + str(args))
# /aurora/fx/layernumber FXname
if path.find('/aurora/fx') == 0:
if int(path.find('/aurora/fx')) == 0:
#print("path", path, 'args', args)
#print("layer", path[11:12])
print("Aurora FX got : path", path, 'args', args)
print("Aurora layer", path[11:12])
layer = int(path[11:12])
if layer <= lasernumber-1:
@ -418,15 +417,16 @@ def OSChandler(path, tags, args, source):
lj.SendLJ("/line1",[fx])
midix.SendUI('/status', [fx])
else:
print("unknwon FX.")
print("Aurora : unknwon FX.")
else:
print("NOT POSSIBLE : only", lasernumber,"laser requested at startup")
print("Aurora : NOT POSSIBLE : only", lasernumber,"laser requested at startup")
lj.SendLJ("/line1",str(lasernumber)+ " Laser")
# /aurora/color/layernumber colorname
if path.find('/aurora/color') == 0:
print()
#if args[1] =='1':
layer = int(path[14:15])
if layer <= lasernumber-1:
@ -434,7 +434,7 @@ def OSChandler(path, tags, args, source):
Layer[layer]['color'] = eval(color)
print("Aurora default OSc for Layer", layer,Layer[layer]['FX'], "Got color change to", color)
else:
print("NOT POSSIBLE : only", lasernumber,"laser requested at startup")
print("Aurora : NOT POSSIBLE : only", lasernumber,"laser requested at startup")
lj.SendLJ("/line1",str(lasernumber)+ " Laser")
# [0,1] or [0,127]
@ -513,7 +513,7 @@ def OSChandler(path, tags, args, source):
# /aurora/scim
if path.find('/aurora/scim') == 0:
print("OSC default got /scim",int(args[0]))
print("Aurora OSC : /scim",int(args[0]))
#lj.SendLJ("/scim", [int(args[0])+24])
# /aurora/poses layer number
@ -1116,6 +1116,7 @@ def AllFX():
anim.Onefield(LAY, StarFields[l], hori=0, verti=0)
elif LAY['FX'] == "anim.Trckr":
#print("Aurora FX anim.Trckr for laser ",l, " points ",TrckrPts[l])
anim.Trckr(LAY, TrckrPts[l])
elif LAY['FX'] == "anim.Word":
@ -1214,6 +1215,7 @@ prepareStarfield()
prepareTrckr()
currentPose = 0
lj.WebStatus("Init Poses...")
anim.debug = debug
anim.preparePoses(currentPose)
log.info("Starting OSC server at " + str(gstt.myIP)+ " port "+ str(OSCinPort)+ " ...")

View File

@ -93,7 +93,7 @@
</div>
</a>
<a href="../settings.html">
<a href="../settings2.html">
<div class="webaudiobut">
<div align="center" class="navled">
Settings