Added 6Ghz Wi-Fi channels, in case you use an external dongle that can.

This commit is contained in:
Jeroen Oudshoorn
2024-12-12 10:20:57 +01:00
parent 79c590fb38
commit 26fbedd52d

View File

@ -1,12 +1,13 @@
NumChannels = 177
NumChannels = 233
def freq_to_channel(freq):
if freq <= 2472:
if freq <= 2472: # 2.4ghz wifi
return int(((freq - 2412) / 5) + 1)
elif freq == 2484:
elif freq == 2484: # channel 14 special
return int(14)
elif 5035 <= freq <= 5865:
return int(((freq - 5035) / 5) + 7)
elif 5150 <= freq <= 5895: # 5ghz wifi
return int(((freq - 5180) / 5) + 36)
elif 5925 <= freq <= 7115: # 6ghz wifi
return int(((freq - 5950) / 5) + 11)
else:
return 0