This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/sensors/radio/scan/WiFiChannels.h
2018-10-25 11:50:12 +02:00

41 lines
903 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* © Copyright 2014 Urheberrechtshinweis
* Alle Rechte vorbehalten / All Rights Reserved
*
* Programmcode ist urheberrechtlich geschuetzt.
* Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner.
* Keine Verwendung ohne explizite Genehmigung.
* (vgl. § 106 ff UrhG / § 97 UrhG)
*/
#ifndef INDOOR_WIFICHANNELS_H
#define INDOOR_WIFICHANNELS_H
class WiFiChannels {
public:
static int freqToChannel(const int freq) {
switch(freq) {
case 2412: return 1;
case 2417: return 2;
case 2422: return 3;
case 2427: return 4;
case 2432: return 5;
case 2437: return 6;
case 2442: return 7;
case 2447: return 8;
case 2452: return 9;
case 2457: return 10;
case 2462: return 11;
case 2467: return 12;
case 2472: return 13;
case 2484: return 14;
}
throw "error";
}
};
#endif // INDOOR_WIFICHANNELS_H