problems with panel.after
This commit is contained in:
parent
49da6885cb
commit
6d598d9297
38
JFSphoto.py
38
JFSphoto.py
@ -620,7 +620,7 @@ class Jfsphoto (object):
|
|||||||
x = 1000
|
x = 1000
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
font = {'family': 'serif',
|
font = {'family': 'serif',
|
||||||
'color': 'darkred',
|
'color': 'darkred',
|
||||||
@ -629,7 +629,7 @@ class Jfsphoto (object):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def waitfor():
|
def waitfor():
|
||||||
pass
|
print('Waiting')
|
||||||
|
|
||||||
def cb1(event):
|
def cb1(event):
|
||||||
print(panel.SHvalue.get(), panel.ICGvalue.get())
|
print(panel.SHvalue.get(), panel.ICGvalue.get())
|
||||||
@ -650,15 +650,17 @@ class Jfsphoto (object):
|
|||||||
s1 = str(val[2])+' '+tree.item(x[0])["values"][2]
|
s1 = str(val[2])+' '+tree.item(x[0])["values"][2]
|
||||||
s = 'Is a Cuvet for '+x[0]+' in concentration\n of '+s1+' in the photometer ? '
|
s = 'Is a Cuvet for '+x[0]+' in concentration\n of '+s1+' in the photometer ? '
|
||||||
if tk.messagebox.askokcancel(title='Messurement', message=s):
|
if tk.messagebox.askokcancel(title='Messurement', message=s):
|
||||||
#panel.bcollect.invoke()
|
panel.bcollect.invoke()
|
||||||
## 3000 shoud be calculated
|
## 3000 shoud be calculated
|
||||||
panel.after(get_duration(),waitfor)
|
panel.after(3000,waitfor)
|
||||||
|
print(get_duration())
|
||||||
|
#time.sleep(3)
|
||||||
self.df['m1'] = config.rxData16
|
self.df['m1'] = config.rxData16
|
||||||
#d = self.df.iloc[p]['darkline']
|
d = self.df.iloc[p]['darkline']
|
||||||
#b = self.df.iloc[p]['baseline']
|
b = self.df.iloc[p]['baseline']
|
||||||
#w = self.df.iloc[p]["m1"]
|
w = self.df.iloc[p]["m1"]
|
||||||
#print(d,b,w,d-w, np.log10(b/(d-w)))
|
#print(d,b,w,d-w, np.log10(b/(d-w)))
|
||||||
#val[3]= np.log10(b/(d-w))
|
val[3]= np.log10(b/(d-w))
|
||||||
val[4]= panel.SHvalue.get()
|
val[4]= panel.SHvalue.get()
|
||||||
val[5]= panel.ICGvalue.get()
|
val[5]= panel.ICGvalue.get()
|
||||||
tree.item(x, text=name,values=val)
|
tree.item(x, text=name,values=val)
|
||||||
@ -761,8 +763,17 @@ class Jfsphoto (object):
|
|||||||
if p.name == name:
|
if p.name == name:
|
||||||
self.methods.remove(p)
|
self.methods.remove(p)
|
||||||
|
|
||||||
|
def waitfor_darkline():
|
||||||
|
if (self.do_save_darkline(config.rxData16)==1):
|
||||||
|
panel.jfsdark_check.config(state=tk.NORMAL)
|
||||||
|
|
||||||
|
def waitfor_baseline():
|
||||||
|
base = self.darkData16-config.rxData16
|
||||||
|
if (self.do_save_baseline(base)==1):
|
||||||
|
panel.jfsbase_check.config(state=tk.NORMAL)
|
||||||
|
|
||||||
def do_zero_messurement():
|
def do_zero_messurement():
|
||||||
print(l6['text'])
|
#print(l6['text'])
|
||||||
if l6['text'].find('Select') >= 0:
|
if l6['text'].find('Select') >= 0:
|
||||||
tk.messagebox.showerror(title='Sorry',message='Select Method first')
|
tk.messagebox.showerror(title='Sorry',message='Select Method first')
|
||||||
else:
|
else:
|
||||||
@ -773,12 +784,13 @@ class Jfsphoto (object):
|
|||||||
panel.SHvalue.set(sh)
|
panel.SHvalue.set(sh)
|
||||||
panel.ICGvalue.set(icg)
|
panel.ICGvalue.set(icg)
|
||||||
if tk.messagebox.askokcancel(title='Darkline', message='Insert the empty Cuvet\nturn lightsource [off]'):
|
if tk.messagebox.askokcancel(title='Darkline', message='Insert the empty Cuvet\nturn lightsource [off]'):
|
||||||
pass
|
panel.bcollect.invoke()
|
||||||
|
panel.after(1000,waitfor_darkline)
|
||||||
## messure Darkline
|
## messure Darkline
|
||||||
if tk.messagebox.askokcancel(title='Baseline', message= 'Leave the empty Cuvet\nturn lightsource [on]'):
|
if tk.messagebox.askokcancel(title='Baseline', message= 'Leave the empty Cuvet\nturn lightsource [on]'):
|
||||||
pass
|
panel.bcollect.invoke()
|
||||||
## messure Baseline
|
panel.after(1000,waitfor_baseline)
|
||||||
|
|
||||||
def do_messurement():
|
def do_messurement():
|
||||||
if tk.messagebox.askokcancel(title='Messurements', message= 'Sample Cuvet inside \n lightsource [on]'):
|
if tk.messagebox.askokcancel(title='Messurements', message= 'Sample Cuvet inside \n lightsource [on]'):
|
||||||
x=[]
|
x=[]
|
||||||
|
|||||||
@ -4,7 +4,7 @@ nm_right = 811.0
|
|||||||
nm_step = 0.13279
|
nm_step = 0.13279
|
||||||
|
|
||||||
[methods]
|
[methods]
|
||||||
crystal = 1,576,mymol,0.0,5,15|1,3.0,0.22895393029132272,80,10000|2,6.0,0.4887269366213052,80,10000|3,9.0,0.7151233139883822,80,10000|4,12.0,0.8900731939852544,80,10000|5,15.0,1.1073861897687294,80,10000
|
crystal = 1,576,mymol,0.0,5,15|1,3.0,0.22895393029132272,80,100000|2,6.0,0.4887269366213052,80,100000|3,9.0,0.7151233139883822,80,100000|4,12.0,0.8900731939852544,80,100000|5,15.0,1.1073861897687294,80,100000
|
||||||
crystalx = 0,576,mymol,0.0,5,15|1,3.0,0.23572229297382125,80,10000|2,6.0,0.49418983232280744,80,10000|3,9.0,0.6972117246796802,80,10000|4,12.0,0.8832872046419623,80,1000|5,15.0,1.0800630625574945,80,10000
|
crystalx = 0,576,mymol,0.0,5,15|1,3.0,0.23572229297382125,80,100000|2,6.0,0.49418983232280744,80,100000|3,9.0,0.6972117246796802,80,100000|4,12.0,0.8832872046419623,80,100000|5,15.0,1.0800630625574945,80,100000
|
||||||
test = 0,405,mmol,0.0,5,30|1,6.0,0.0,200,100000|2,12.0,0.0,200,100000|3,18.0,0.0,0,0|4,24.0,0.0,0,0|5,30.0,0.0,0,0
|
test = 0,405,mmol,0.0,5,30|1,6.0,0.0,200,100000|2,12.0,0.0,200,100000|3,18.0,0.0,0,0|4,24.0,0.0,0,0|5,30.0,0.0,0,0
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user