Aurora bugfixs
This commit is contained in:
parent
fa91c00711
commit
132ea32d66
7 changed files with 86 additions and 256 deletions
51
main.py
51
main.py
|
|
@ -57,10 +57,8 @@ from multiprocessing import Process, set_start_method
|
|||
import random, ast
|
||||
|
||||
from libs3 import plugins
|
||||
|
||||
from libs3 import tracer3 as tracer
|
||||
from libs3 import homographyp, commands, font1
|
||||
#from webui import build
|
||||
|
||||
#import subprocess
|
||||
|
||||
|
|
@ -383,7 +381,15 @@ midi.InConfig()
|
|||
midi.OutConfig()
|
||||
'''
|
||||
|
||||
# Creating a startup point list for each laser : 0,1,2,...
|
||||
def fff(name):
|
||||
print()
|
||||
print('HELLO', name ) #indent
|
||||
print()
|
||||
|
||||
|
||||
#
|
||||
# Create a startup point list for each laser : 0,1,2,...
|
||||
#
|
||||
|
||||
print("")
|
||||
log.info("Creating startup point lists...")
|
||||
|
|
@ -397,7 +403,7 @@ for sceneid in range(0,gstt.MaxScenes+1):
|
|||
print("Scene "+ str(sceneid))
|
||||
#digit_points = font1.DigitsDots(sceneid,65280)
|
||||
|
||||
# Order all lasers to show the laser client number at startup -> tell all 4 laser process to USER PLs
|
||||
# Order all lasers to show its number at startup -> tell all 4 laser process to USER PLs
|
||||
for laserid in range(0,gstt.LaserNumber):
|
||||
|
||||
digit_points = font1.DigitsDots(laserid,65280)
|
||||
|
|
@ -408,15 +414,11 @@ for sceneid in range(0,gstt.MaxScenes+1):
|
|||
|
||||
r.set('/order/'+str(laserid), 0)
|
||||
|
||||
|
||||
#
|
||||
# Starts one DAC process per requested Laser
|
||||
#
|
||||
|
||||
def fff(name):
|
||||
print()
|
||||
print('HELLO', name ) #indent
|
||||
print()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
# Bug in 3.8.4 MacOS default multiprocessing start method is spawn. Spawn doesn't work properly
|
||||
|
|
@ -437,7 +439,7 @@ if __name__ == '__main__':
|
|||
|
||||
log.info("Starting "+str(gstt.LaserNumber) + " DACs process...")
|
||||
|
||||
# Launch one process (a newdacp instance) by etherdream
|
||||
# Launch one process (a tracer3 instance) by etherdream
|
||||
dac_worker0= Process(target=dac_process, args=(0,0,))
|
||||
dac_worker0.start()
|
||||
commands.worker0 = dac_worker0
|
||||
|
|
@ -461,14 +463,12 @@ if __name__ == '__main__':
|
|||
commands.worker3 = dac_worker3
|
||||
dac_worker3.start()
|
||||
print("")
|
||||
#def Run():
|
||||
|
||||
#
|
||||
# Main loop do nothing. Maybe do the webui server ?
|
||||
# start WS and OSC servers
|
||||
#
|
||||
|
||||
try:
|
||||
#while True:
|
||||
|
||||
# Websocket startup
|
||||
wserver = WebsocketServer(wsPORT,host=serverIP)
|
||||
|
|
@ -509,6 +509,8 @@ if __name__ == '__main__':
|
|||
print("")
|
||||
log.infog("LJ server running...")
|
||||
|
||||
# websocket loop
|
||||
|
||||
wserver.run_forever()
|
||||
|
||||
|
||||
|
|
@ -521,28 +523,7 @@ if __name__ == '__main__':
|
|||
finally:
|
||||
|
||||
commands.LJautokill()
|
||||
'''
|
||||
dac_worker0.join()
|
||||
if lasernumber >0:
|
||||
dac_worker1.join()
|
||||
if lasernumber >1:
|
||||
dac_worker2.join()
|
||||
if lasernumber >2:
|
||||
dac_worker3.join()
|
||||
|
||||
|
||||
for laserid in range(0,lasernumber+1):
|
||||
print("Laser",laserid,"feedbacks resetting...")
|
||||
r.set('/lack/'+str(laserid),64)
|
||||
r.set('/lstt/'+str(laserid),64)
|
||||
r.set('/cap/'+str(laserid),0)
|
||||
'''
|
||||
|
||||
|
||||
|
||||
#if __name__ == "__main__":
|
||||
# Run()
|
||||
|
||||
|
||||
'''
|
||||
Some code previously used, for reference :
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue