X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=sigrok-meter;h=4722feba8d2245cbb265b3089b5b89e0057ee7b8;hb=86862cb44ace09720744eee2e80ae50c174e903f;hp=884ad2d08781a187db2f83f67615484166061ca8;hpb=480cdb7bc04548aec46b7342d6fa1acafa60331c;p=sigrok-meter.git diff --git a/sigrok-meter b/sigrok-meter index 884ad2d..4722feb 100755 --- a/sigrok-meter +++ b/sigrok-meter @@ -24,6 +24,7 @@ import argparse import sigrok.core as sr import sys import textwrap +import signal default_drivers = [('demo:analog_channels=4', 'samplerate=4')] default_loglevel = 2 @@ -32,9 +33,10 @@ def parse_cli(): parser = argparse.ArgumentParser( description='Simple sigrok GUI for multimeters and dataloggers.', epilog=textwrap.dedent('''\ - The DRIVER string is the same as for sigrok-cli(1). The nth - CONFIG is applied to the nth DRIVER. If there are more drivers - than configs, the remaining drivers use the default configuration. + The DRIVER string is the same as for sigrok-cli(1). Multiple + DRIVER and CONFIG items can be supplied. The nth CONFIG is applied + to the nth DRIVER. If there are more drivers than configs, the + remaining drivers use the default configuration. Examples: @@ -44,6 +46,10 @@ def parse_cli(): %(prog)s --driver demo:analog_channels=1 \\ --config samplerate=10 + + %(prog)s --driver voltcraft-k204:conn=/dev/ttyUSB0 \\ + --driver uni-t-ut61d:conn=1a86.e008 \\ + --driver uni-t-ut61e-ser:conn=/dev/ttyUSB1 '''), formatter_class=argparse.RawDescriptionHelpFormatter) @@ -82,6 +88,8 @@ def parse_cli(): return args if __name__ == '__main__': + signal.signal(signal.SIGINT, signal.SIG_DFL) + args = parse_cli() import qtcompat