misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
Simone Margaritelli 2019-10-13 17:40:30 +02:00
parent 77efeafd65
commit 1808392a1d
No known key found for this signature in database
GPG Key ID: 82E42E7F3B34C97E

@ -1 +1,12 @@
NumChannels = 140
def freq_to_channel(freq):
if freq <= 2472:
return int(((freq - 2412) / 5) + 1)
elif freq == 2484:
return int(14)
elif 5035 <= freq <= 5865:
return int(((freq - 5035) / 5) + 7)
else:
return 0