projects
/
pycomedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ade9a2e
)
Actually listen to the --subdevice option in the insn.py demo.
author
W. Trevor King
<wking@drexel.edu>
Mon, 19 Mar 2012 16:41:29 +0000
(12:41 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Mon, 19 Mar 2012 16:41:29 +0000
(12:41 -0400)
doc/demo/insn.py
patch
|
blob
|
history
diff --git
a/doc/demo/insn.py
b/doc/demo/insn.py
index ad77e5de6651f8a73662de83d344484a8c3e7dee..9fc100133a294f8a30254fd8f5d3bb2ad131d2dd 100755
(executable)
--- a/
doc/demo/insn.py
+++ b/
doc/demo/insn.py
@@
-55,7
+55,10
@@
if __name__ == '__main__':
device = _Device(filename=args.filename)
device.open()
- subdevice = device.find_subdevice_by_type(_constant.SUBDEVICE_TYPE.ai)
+ if args.subdevice is None:
+ subdevice = device.find_subdevice_by_type(_constant.SUBDEVICE_TYPE.ai)
+ else:
+ subdevice = device.subdevice(args.subdevice)
insns = [subdevice.insn(), subdevice.insn(), subdevice.insn()]
insns[0].insn = insns[2].insn = _constant.INSN.gtod