MCPcopy Create free account
hub / github.com/cifertech/nRFBox / setRadioParameters

Function setRadioParameters

VScode Platformio/src/jammer.cpp:46–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46void 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
66void radioSetChannel(int channels) {
67 radioA.setChannel(channels);

Callers 3

pressBt03Function · 0.70
pressBt04Function · 0.70
jammerSetupFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected