diff --git a/README.md b/README.md index 5f461c5..2f8ce14 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Arduino ======= -MySensors Arduino Library v1.5 +MySensors Arduino Library v2.0.0-beta Please visit www.mysensors.org for more information diff --git a/libraries/MySensors/MyConfig.h b/libraries/MySensors/MyConfig.h index 37b3cab..6c0b00f 100644 --- a/libraries/MySensors/MyConfig.h +++ b/libraries/MySensors/MyConfig.h @@ -371,7 +371,17 @@ /** * @def MY_RF24_CHANNEL - * @brief RF channel for the sensor net, 0-127. + * @brief RF channel for the sensor net, 0-125. + * Frequence: 2400 Mhz - 2525 Mhz Channels: 126 + * http://www.mysensors.org/radio/nRF24L01Plus.pdf + * 0 => 2400 Mhz (RF24 channel 1) + * 1 => 2401 Mhz (RF24 channel 2) + * 76 => 2476 Mhz (RF24 channel 77) + * 83 => 2483 Mhz (RF24 channel 84) + * 124 => 2524 Mhz (RF24 channel 125) + * 125 => 2525 Mhz (RF24 channel 126) + * In some countries there might be limitations, in Germany for example only the range 2400,0 - 2483,5 Mhz is allowed + * http://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Frequenzen/Allgemeinzuteilungen/2013_10_WLAN_2,4GHz_pdf.pdf */ #ifndef MY_RF24_CHANNEL #define MY_RF24_CHANNEL 76 diff --git a/libraries/MySensors/drivers/RF24/RF24.cpp b/libraries/MySensors/drivers/RF24/RF24.cpp index fc813f0..4941c91 100644 --- a/libraries/MySensors/drivers/RF24/RF24.cpp +++ b/libraries/MySensors/drivers/RF24/RF24.cpp @@ -388,7 +388,7 @@ RF24::RF24(uint8_t _cepin, uint8_t _cspin): void RF24::setChannel(uint8_t channel) { - const uint8_t max_channel = 127; + const uint8_t max_channel = 125; write_register(RF_CH,min(channel,max_channel)); } diff --git a/libraries/MySensors/drivers/RF24/RF24.h b/libraries/MySensors/drivers/RF24/RF24.h index 8cbfc7c..741b3c2 100644 --- a/libraries/MySensors/drivers/RF24/RF24.h +++ b/libraries/MySensors/drivers/RF24/RF24.h @@ -601,7 +601,7 @@ public: /** * Set RF communication channel * - * @param channel Which RF channel to communicate on, 0-127 + * @param channel Which RF channel to communicate on, 0-125 */ void setChannel(uint8_t channel);