diff options
author | leommxj <leommxj@gmail.com> | 2017-09-10 14:49:03 +0800 |
---|---|---|
committer | Piotr Krysik <ptrkrysik@users.noreply.github.com> | 2017-09-11 10:38:40 +0200 |
commit | caa7741d0907a00701e54446f61fae13679956ce (patch) | |
tree | c0ce26690a08c78c0e5f3e802aa7f49b002caa78 | |
parent | ece9fd7f39a96484aee027eda3bc38b17fb2fa17 (diff) |
delete some useless code after the change of is_valid_arfcn(...) and arfcn2downlink(...)
-rwxr-xr-x | apps/grgsm_decode | 7 | ||||
-rwxr-xr-x | apps/helpers/grgsm_capture | 15 |
2 files changed, 5 insertions, 17 deletions
diff --git a/apps/grgsm_decode b/apps/grgsm_decode index 70cd284..dbac386 100755 --- a/apps/grgsm_decode +++ b/apps/grgsm_decode @@ -351,16 +351,13 @@ if __name__ == '__main__': if options.band not in grgsm.arfcn.get_bands(): parser.error("Invalid GSM band\n") elif not grgsm.arfcn.is_valid_arfcn(options.arfcn): - parser.error("ARFCN is not valid in the specified band\n") + parser.error("ARFCN is not valid\n") else: arfcn = options.arfcn fc = grgsm.arfcn.arfcn2downlink(arfcn) else: arfcn = options.arfcn - for band in grgsm.arfcn.get_bands(): - if grgsm.arfcn.is_valid_arfcn(arfcn): - fc = grgsm.arfcn.arfcn2downlink(arfcn) - break + grgsm.arfcn.arfcn2downlink(arfcn) elif options.fc: fc = options.fc if options.band: diff --git a/apps/helpers/grgsm_capture b/apps/helpers/grgsm_capture index 8b10c61..0c96df1 100755 --- a/apps/helpers/grgsm_capture +++ b/apps/helpers/grgsm_capture @@ -138,13 +138,7 @@ class grgsm_capture(gr.top_block): self.arfcn = arfcn if self.verbose or self.burst_file: self.gsm_receiver.set_cell_allocation([self.arfcn]) - if options.band: - new_freq = grgsm.arfcn.arfcn2downlink(self.arfcn) - else: - for band in grgsm.arfcn.get_bands(): - if grgsm.arfcn.is_valid_arfcn(arfcn): - new_freq = grgsm.arfcn.arfcn2downlink(arfcn) - break + new_freq = grgsm.arfcn.arfcn2downlink(self.arfcn) self.set_fc(new_freq) def get_gain(self): @@ -233,16 +227,13 @@ if __name__ == '__main__': if options.band not in grgsm.arfcn.get_bands(): parser.error("Invalid GSM band\n") elif not grgsm.arfcn.is_valid_arfcn(options.arfcn): - parser.error("ARFCN is not valid in the specified band\n") + parser.error("ARFCN is not valid\n") else: arfcn = options.arfcn fc = grgsm.arfcn.arfcn2downlink(arfcn) else: arfcn = options.arfcn - for band in grgsm.arfcn.get_bands(): - if grgsm.arfcn.is_valid_arfcn(arfcn): - fc = grgsm.arfcn.arfcn2downlink(arfcn) - break + fc = grgsm.arfcn.arfcn2downlink(arfcn) elif options.fc: fc = options.fc if options.band: |