Skip to content

Commit

Permalink
gui/scan: enforce min <= max
Browse files Browse the repository at this point in the history
  • Loading branch information
sbourdeauducq committed Aug 22, 2015
1 parent 21a28a1 commit 284e3dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions artiq/gui/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ def set_values(self, min, max, npoints):
force_spinbox_value(self.npoints, npoints)

def get_values(self):
min = self.min.value()
max = self.max.value()
if min > max:
raise ValueError("Minimum scan boundary must be less than maximum")
return {
"min": self.min.value(),
"max": self.max.value(),
"min": min,
"max": max,
"npoints": self.npoints.value()
}

Expand Down

0 comments on commit 284e3dd

Please sign in to comment.