| 44 | |
| 45 | |
| 46 | void setRadioParameters() { |
| 47 | switch (dataRateIndex) { |
| 48 | case 0: radioA.setDataRate(RF24_250KBPS); radioB.setDataRate(RF24_250KBPS); radioC.setDataRate(RF24_250KBPS); break; |
| 49 | case 1: radioA.setDataRate(RF24_1MBPS); radioB.setDataRate(RF24_1MBPS); radioC.setDataRate(RF24_1MBPS); break; |
| 50 | case 2: radioA.setDataRate(RF24_2MBPS); radioB.setDataRate(RF24_2MBPS); radioC.setDataRate(RF24_2MBPS);break; |
| 51 | } |
| 52 | |
| 53 | switch (paLevelIndex) { |
| 54 | case 0: radioA.setPALevel(RF24_PA_MIN); radioB.setPALevel(RF24_PA_MIN); radioC.setPALevel(RF24_PA_MIN); break; |
| 55 | case 1: radioA.setPALevel(RF24_PA_LOW); radioB.setPALevel(RF24_PA_LOW); radioC.setPALevel(RF24_PA_LOW); break; |
| 56 | case 2: radioA.setPALevel(RF24_PA_HIGH); radioB.setPALevel(RF24_PA_HIGH); radioC.setPALevel(RF24_PA_HIGH); break; |
| 57 | case 3: radioA.setPALevel(RF24_PA_MAX); radioB.setPALevel(RF24_PA_MAX); radioC.setPALevel(RF24_PA_MAX); break; |
| 58 | } |
| 59 | |
| 60 | Serial.print("Data Rate: "); |
| 61 | Serial.println(dataRateIndex); |
| 62 | Serial.print("PA Level: "); |
| 63 | Serial.println(paLevelIndex); |
| 64 | } |
| 65 | |
| 66 | void radioSetChannel(int channels) { |
| 67 | radioA.setChannel(channels); |
no outgoing calls
no test coverage detected