Skip to content

Commit 242d0a9

Browse files
committed
Corrected the channel selection arduino#372
1 parent 4002636 commit 242d0a9

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Arduino
22
=======
33

4-
MySensors Arduino Library v1.5
4+
MySensors Arduino Library v2.0.0-beta
55

66
Please visit www.mysensors.org for more information
77

libraries/MySensors/MyConfig.h

+11-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,17 @@
371371

372372
/**
373373
* @def MY_RF24_CHANNEL
374-
* @brief RF channel for the sensor net, 0-127.
374+
* @brief RF channel for the sensor net, 0-125.
375+
* Frequence: 2400 Mhz - 2525 Mhz Channels: 126
376+
* http://www.mysensors.org/radio/nRF24L01Plus.pdf
377+
* 0 => 2400 Mhz (RF24 channel 1)
378+
* 1 => 2401 Mhz (RF24 channel 2)
379+
* 76 => 2476 Mhz (RF24 channel 77)
380+
* 83 => 2483 Mhz (RF24 channel 84)
381+
* 124 => 2524 Mhz (RF24 channel 125)
382+
* 125 => 2525 Mhz (RF24 channel 126)
383+
* In some countries there might be limitations, in Germany for example only the range 2400,0 - 2483,5 Mhz is allowed
384+
* http://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Frequenzen/Allgemeinzuteilungen/2013_10_WLAN_2,4GHz_pdf.pdf
375385
*/
376386
#ifndef MY_RF24_CHANNEL
377387
#define MY_RF24_CHANNEL 76

libraries/MySensors/drivers/RF24/RF24.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ RF24::RF24(uint8_t _cepin, uint8_t _cspin):
388388

389389
void RF24::setChannel(uint8_t channel)
390390
{
391-
const uint8_t max_channel = 127;
391+
const uint8_t max_channel = 125;
392392
write_register(RF_CH,min(channel,max_channel));
393393
}
394394

libraries/MySensors/drivers/RF24/RF24.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ class RF24
601601
/**
602602
* Set RF communication channel
603603
*
604-
* @param channel Which RF channel to communicate on, 0-127
604+
* @param channel Which RF channel to communicate on, 0-125
605605
*/
606606
void setChannel(uint8_t channel);
607607

0 commit comments

Comments
 (0)