Skip to content

Commit 52dbabc

Browse files
committed
Support '!=' in If() and Wait()
1 parent cb0cd47 commit 52dbabc

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

scan/commands/iff.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class If(Command):
1010
:param device: Device name
1111
:param value: Desired value.
1212
:param comparison: How current value is compared to the desired value.
13-
Options: '=', '>', '>=', '<' , '<='.
13+
Options: '=', '!=', '>', '>=', '<' , '<='.
1414
:param body: One or more commands
1515
:param tolerance: Tolerance when checking numeric `readback`.
1616
Defaults to 0.1
@@ -22,6 +22,7 @@ class If(Command):
2222
"""
2323

2424
__comparisons= {'=':'EQUALS',
25+
'!=':'UNEQUAL',
2526
'>':'ABOVE',
2627
'>=':'AT_LEAST',
2728
'<':'BELOW',

scan/commands/wait.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Wait(Command):
1616
:param value: Desired value.
1717
:param comparison: How current value is compared to the desired value.
1818
Defaults to '='.
19-
Other options: '>', '>=', '<' , '<=', 'increase by','decrease by'
19+
Other options: '!=', '>', '>=', '<' , '<=', 'increase by','decrease by'
2020
:param tolerance: Tolerance used for numeric comparison. Defaults to 0, not used for string values.
2121
:param timeout: Timeout in seconds. Default 0 to wait 'forever'.
2222
:param errhandler: Default None.
@@ -31,6 +31,7 @@ class Wait(Command):
3131
"""
3232

3333
__comparisons= {'=':'EQUALS',
34+
'!=':'UNEQUAL',
3435
'>':'ABOVE',
3536
'>=':'AT_LEAST',
3637
'<':'BELOW',

scan/version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

2-
__version__ = '1.5.3'
2+
__version__ = '1.5.4'
33

44
version_history = """
5+
1.5.4 - Add '!=' to If() and Wait()
56
1.5.3 - Fix 'id' vs. 'scanID' in patch()
67
1.5.2 - Try to use cElementTree
78
1.5.1 - ScanInfo.finish

0 commit comments

Comments
 (0)