| 52 | |
| 53 | |
| 54 | void setRadioParameters() { |
| 55 | switch (dataRateIndex) { |
| 56 | case 0: radioA.setDataRate(RF24_250KBPS); radioB.setDataRate(RF24_250KBPS); radioC.setDataRate(RF24_250KBPS); break; |
| 57 | case 1: radioA.setDataRate(RF24_1MBPS); radioB.setDataRate(RF24_1MBPS); radioC.setDataRate(RF24_1MBPS); break; |
| 58 | case 2: radioA.setDataRate(RF24_2MBPS); radioB.setDataRate(RF24_2MBPS); radioC.setDataRate(RF24_2MBPS);break; |
| 59 | } |
| 60 | |
| 61 | switch (paLevelIndex) { |
| 62 | case 0: radioA.setPALevel(RF24_PA_MIN); radioB.setPALevel(RF24_PA_MIN); radioC.setPALevel(RF24_PA_MIN); break; |
| 63 | case 1: radioA.setPALevel(RF24_PA_LOW); radioB.setPALevel(RF24_PA_LOW); radioC.setPALevel(RF24_PA_LOW); break; |
| 64 | case 2: radioA.setPALevel(RF24_PA_HIGH); radioB.setPALevel(RF24_PA_HIGH); radioC.setPALevel(RF24_PA_HIGH); break; |
| 65 | case 3: radioA.setPALevel(RF24_PA_MAX); radioB.setPALevel(RF24_PA_MAX); radioC.setPALevel(RF24_PA_MAX); break; |
| 66 | } |
| 67 | |
| 68 | //Serial.print("Data Rate: "); |
| 69 | //Serial.println(dataRateIndex); |
| 70 | //Serial.print("PA Level: "); |
| 71 | //Serial.println(paLevelIndex); |
| 72 | } |
| 73 | |
| 74 | void radioSetChannel(int channels) { |
| 75 | radioA.setChannel(channels); |
no outgoing calls
no test coverage detected