Skip to content
Snippets Groups Projects
Commit 1f92bfae authored by chrissi^'s avatar chrissi^
Browse files

Frequency check: Only check range


Signed-off-by: default avatarChris Fiege <chris@tinyhost.de>
parent a27585f0
No related branches found
No related tags found
No related merge requests found
...@@ -16,10 +16,7 @@ class SA868(object): ...@@ -16,10 +16,7 @@ class SA868(object):
def _check_freq_range(self, freq): def _check_freq_range(self, freq):
if (freq >= 400 and freq <= 480) or (freq >= 134 and freq <=174): if (freq >= 400 and freq <= 480) or (freq >= 134 and freq <=174):
if (freq * 1000) % 12.5 == 0: return True
return True
else:
raise Exception("Frequency is not a multiple of 12.5kHz")
else: else:
raise Exception("Frequency out of bounds") raise Exception("Frequency out of bounds")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment