This commit is contained in:
Marc Planard 2024-08-19 22:47:42 +02:00
parent 7e2d7c4afb
commit 9d00337c09
2 changed files with 9 additions and 7 deletions

View File

@ -32,6 +32,8 @@ def Write():
config.set(laser, 'ip', str(gstt.lasersIPS[i])) config.set(laser, 'ip', str(gstt.lasersIPS[i]))
config.set(laser, 'type', str(gstt.lasertype[i])) config.set(laser, 'type', str(gstt.lasertype[i]))
config.set(laser, 'dac_family', str(gstt.dacfamily[i])) config.set(laser, 'dac_family', str(gstt.dacfamily[i]))
if gstt.dacfamily[i] == "extern_cmd":
config.set(laser, 'cmd', str(gstt.cmd[i]))
config.set(laser, 'kpps', str(gstt.kpps[i])) config.set(laser, 'kpps', str(gstt.kpps[i]))
config.set(laser, 'intens', str(gstt.intens[i])) config.set(laser, 'intens', str(gstt.intens[i]))
config.set(laser, 'red', str(gstt.red[i])) config.set(laser, 'red', str(gstt.red[i]))

14
main.py
View File

@ -528,16 +528,16 @@ if __name__ == '__main__':
for lasernumber in range(0,gstt.LaserNumber): for lasernumber in range(0,gstt.LaserNumber):
# Launch one process (a tracer3 instance) by laser # Launch one process (a tracer3 instance) by laser
if gstt.dacfamily[lasernumber] == "extern_cmd": if gstt.dacfamily[lasernumber] == "extern_cmd":
dac_worker0 = spawn(gstt.cmd[lasernumber]) #Process(target=spawn, args=(gstt.cmd[0],)) dac_worker = spawn(gstt.cmd[lasernumber])
dac_worker0.name = f'ExternCmd{lasernumber}' dac_worker.name = f'ExternCmd{lasernumber}'
dac_worker0.join = dac_worker0.wait dac_worker.join = dac_worker.wait
else: else:
dac_worker0= Process(target=dac_process, args=(lasernumber,0,)) dac_worker= Process(target=dac_process, args=(lasernumber,0,))
dac_worker0.start() dac_worker.start()
#commands.worker0 = dac_worker0 # ??? #commands.worker0 = dac_worker0 # ???
commands.workers.append(dac_worker0) commands.workers.append(dac_worker)
print("Tracer 0 : name", dac_worker0.name , "pid", dac_worker0.pid ) print(f"Tracer {lasernumber} : name", dac_worker.name , "pid", dac_worker.pid )
print("DAC Family:", gstt.dacfamily[lasernumber]); print("DAC Family:", gstt.dacfamily[lasernumber]);
# if lasernumber >0: # if lasernumber >0: