mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
add: option to send raw commands
This commit is contained in:
parent
f6e9c6f434
commit
0f29824a78
|
|
@ -392,10 +392,16 @@ if __name__ == '__main__':
|
||||||
help="apply IF filter on raw wave plot")
|
help="apply IF filter on raw wave plot")
|
||||||
parser.add_option("-C", "--capture", dest="capture",
|
parser.add_option("-C", "--capture", dest="capture",
|
||||||
help="capture current display to FILE", metavar="FILE")
|
help="capture current display to FILE", metavar="FILE")
|
||||||
|
parser.add_option("-e", dest="command", action="append",
|
||||||
|
help="send raw command", metavar="COMMAND")
|
||||||
(opt, args) = parser.parse_args()
|
(opt, args) = parser.parse_args()
|
||||||
|
|
||||||
nv = NanoVNA(opt.device or getport())
|
nv = NanoVNA(opt.device or getport())
|
||||||
|
|
||||||
|
if opt.command:
|
||||||
|
for c in opt.command:
|
||||||
|
nv.send_command(c + "\r")
|
||||||
|
|
||||||
if opt.capture:
|
if opt.capture:
|
||||||
print("capturing...")
|
print("capturing...")
|
||||||
img = nv.capture()
|
img = nv.capture()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue