small change
This commit is contained in:
parent
32035fac55
commit
3e541653be
22
dashboard.py
22
dashboard.py
|
@ -52,19 +52,32 @@ window = Tk(className = 'FSU Fox\'s Lab Experimental Hall')
|
||||||
#window.geometry("3840x2160") # 4K
|
#window.geometry("3840x2160") # 4K
|
||||||
window.geometry(str(windowSize[0]) + "x" + str(windowSize[1]))
|
window.geometry(str(windowSize[0]) + "x" + str(windowSize[1]))
|
||||||
window.configure(bg='black')
|
window.configure(bg='black')
|
||||||
window.attributes('-fullscreen', True)
|
#window.attributes('-fullscreen', True)
|
||||||
|
|
||||||
canvas = Canvas(window)
|
canvas = Canvas(window)
|
||||||
canvas.configure(bg='black', bd = 0, highlightthickness=0, relief='ridge')
|
canvas.configure(bg='black', bd = 0, highlightthickness=0, relief='ridge')
|
||||||
canvas.pack( expand = True, fill = BOTH)
|
canvas.pack( expand = True, fill = BOTH)
|
||||||
|
|
||||||
|
|
||||||
|
#==================== interlock
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#==================== Beam line
|
||||||
|
|
||||||
|
#------- source
|
||||||
|
|
||||||
|
|
||||||
tandemStart = [windowSize[0] * 0.9, windowSize[1] * 0.9] # beam entry pos
|
tandemStart = [windowSize[0] * 0.9, windowSize[1] * 0.9] # beam entry pos
|
||||||
tandemSize = [100, 300] # width, height
|
tandemSize = [100, 300] # width, height
|
||||||
tandem = Tandem(tandemStart, tandemSize, 'Green')
|
tandem = Tandem(tandemStart, tandemSize, 'Green')
|
||||||
|
|
||||||
bl1 = BeamRectElement( tandem.GetExitPos() , [10, 100], 0, 'white')
|
bl1 = BeamRectElement( tandem.GetExitPos() , [10, 200], 0, 'white')
|
||||||
|
|
||||||
bl1a = BeamRectElement( bl1.GetExitPos(), [10, 300], 0, 'white') # beam by-pass D-1
|
bl1a = BeamRectElement( bl1.GetExitPos(), [10, 300], 0, 'grey') # beam by-pass D-1
|
||||||
|
|
||||||
|
q1 = BeamRectElement(tandem.GetExitPos() + [0, -50], [40, 30], 0, 'orange')
|
||||||
|
q2 = BeamRectElement(q1.GetExitPos() + [0, -50], [40, 30], 0, 'orange')
|
||||||
|
|
||||||
#-------- beam line to target room 1
|
#-------- beam line to target room 1
|
||||||
dMagnetSize = [80, 20] # outer, inner radius
|
dMagnetSize = [80, 20] # outer, inner radius
|
||||||
|
@ -99,6 +112,9 @@ label.place(x = windowSize[0] * 0.9, y = tandemStart[1] - 100)
|
||||||
exit_button = Button(canvas, text="Exit", command=window.destroy)
|
exit_button = Button(canvas, text="Exit", command=window.destroy)
|
||||||
exit_button.place(x = windowSize[0] - 200, y = 50)
|
exit_button.place(x = windowSize[0] - 200, y = 50)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def update():
|
def update():
|
||||||
label['text'] = "Pressure : "+ str(randint(0, 1000)) + " bar"
|
label['text'] = "Pressure : "+ str(randint(0, 1000)) + " bar"
|
||||||
window.after(1000, update) # run itself again after 1000 ms
|
window.after(1000, update) # run itself again after 1000 ms
|
||||||
|
|
Loading…
Reference in New Issue
Block a user