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

Function setRadioParameters

nRFBox_V2/jammer.cpp:54–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53
54void 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
74void radioSetChannel(int channels) {
75 radioA.setChannel(channels);

Callers 3

pressBt03Function · 0.70
pressBt04Function · 0.70
jammerSetupFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected