Skip to content
Snippets Groups Projects
Commit 3283efc1 authored by Alexandros Asonitis's avatar Alexandros Asonitis
Browse files

bug fix

parent 91f23b46
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ def check_values(start,step,stop,function):
root.attributes("-topmost", True)#window stays above all other applications
if function =='primary':
if abs(step.value) > abs(stop.value-start.value) or step==0:#invalid parameter setting
if abs(step.value) > abs(stop.value-start.value) or step.value==0:#invalid parameter setting
valid = False
tkinter.messagebox.showerror(message="Invalid parameter setting!")
......@@ -138,7 +138,7 @@ def check_values(start,step,stop,function):
if function == 'secondary':
if start.value == stop.value:
pass
elif abs(step.value) > abs(stop.value-start.value) or step==0:#invalid parameter setting
elif abs(step.value) > abs(stop.value-start.value) or step.value==0:#invalid parameter setting
valid = False
tkinter.messagebox.showerror(message="Invalid parameter setting!")
if start.value<stop.value and step.value<0: #change polarity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment