aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@users.noreply.github.com>2017-09-11 10:01:12 +0200
committerPiotr Krysik <ptrkrysik@users.noreply.github.com>2017-09-11 10:38:40 +0200
commita80567f0132bdad08cf3b6ec38328779f7f60845 (patch)
treeb4e4087135dca225e99c39fa34b210d8b2459f79 /apps
parentdf0adf3d86f0ae38ac81ec7c4052be2a2032b4c5 (diff)
Bring back parameter checking, correct creation of grgsm_capture object
Diffstat (limited to 'apps')
-rwxr-xr-xapps/helpers/grgsm_capture9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/helpers/grgsm_capture b/apps/helpers/grgsm_capture
index a5133bc..b1b85a7 100755
--- a/apps/helpers/grgsm_capture
+++ b/apps/helpers/grgsm_capture
@@ -218,15 +218,18 @@ if __name__ == '__main__':
arfcn = 0
fc = 939.4e6
if options.arfcn:
- arfcn = options.arfcn
- fc = grgsm.arfcn.arfcn2downlink(arfcn)
+ if not grgsm.arfcn.is_valid_arfcn(options.arfcn):
+ parser.error("ARFCN is not valid\n")
+ else:
+ arfcn = options.arfcn
+ fc = grgsm.arfcn.arfcn2downlink(arfcn)
elif options.fc:
fc = options.fc
arfcn = grgsm.arfcn.downlink2arfcn(options.fc)
tb = grgsm_capture(fc=fc, gain=options.gain, samp_rate=options.samp_rate,
ppm=options.ppm, arfcn=arfcn, cfile=options.cfile,
- burst_file=options.burst_file, band=options.band, verbose=options.verbose,
+ burst_file=options.burst_file, verbose=options.verbose,
rec_length=options.rec_length, args=options.args)
def signal_handler(signal, frame):