removed limiters
This commit is contained in:
parent
5ef80458c2
commit
d729e15c6c
1 changed files with 3 additions and 3 deletions
6
app.py
6
app.py
|
@ -170,7 +170,7 @@ class renderedImageZoom:
|
|||
p_frame = tkinter.Frame(self.aerosol_window)
|
||||
text_p = tkinter.Text(p_frame,height=1,width=10)
|
||||
submit_p_button = tkinter.Button(p_frame,text="set pressure",command=lambda: [self.set_press(text_p.get("1.0","end-1c")),
|
||||
p_label.config(text=str(sorted([400,int(text_p.get("1.0","end-1c")),900])[1]) +" mmHg")])
|
||||
p_label.config(text=str(sorted([0,int(text_p.get("1.0","end-1c")),900])[1]) +" mmHg")])
|
||||
p_label = tkinter.Label(p_frame,text="720 mmHg")
|
||||
text_p.pack(side=tkinter.LEFT)
|
||||
p_label.pack(side=tkinter.RIGHT)
|
||||
|
@ -287,8 +287,8 @@ class renderedImageZoom:
|
|||
def set_press(self,press):
|
||||
if press is None:
|
||||
self.pressure = 720
|
||||
elif int(press) < 400 or int(press) > 900:
|
||||
pressure = sorted([400,int(press),900])[1]
|
||||
elif int(press) < 0 or int(press) > 900:
|
||||
pressure = sorted([0,int(press),900])[1]
|
||||
print("pressure unrealistic, resetting to clamped value {}".format(pressure))
|
||||
self.pressure = pressure
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue