mirror of https://github.com/m-labs/artiq.git
gui/scan: enforce min <= max
This commit is contained in:
parent
21a28a13c9
commit
284e3ddb2b
|
@ -40,9 +40,13 @@ class _Range(LayoutWidget):
|
||||||
force_spinbox_value(self.npoints, npoints)
|
force_spinbox_value(self.npoints, npoints)
|
||||||
|
|
||||||
def get_values(self):
|
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 {
|
return {
|
||||||
"min": self.min.value(),
|
"min": min,
|
||||||
"max": self.max.value(),
|
"max": max,
|
||||||
"npoints": self.npoints.value()
|
"npoints": self.npoints.value()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue