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

Function blejammerLoop

nRFBox_V2/blejammer.cpp:154–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void blejammerLoop() {
155 checkModeChange();
156
157 if (currentMode == BLE_MODULE) {
158 int randomIndex = random(0, sizeof(ble_channels) / sizeof(ble_channels[0]));
159 int channel = ble_channels[randomIndex];
160 radio1.setChannel(channel);
161 radio2.setChannel(channel);
162 radio3.setChannel(channel);
163
164 } else if (currentMode == Bluetooth_MODULE) {
165 int randomIndex = random(0, sizeof(bluetooth_channels) / sizeof(bluetooth_channels[0]));
166 int channel = bluetooth_channels[randomIndex];
167 radio1.setChannel(channel);
168 radio2.setChannel(channel);
169 radio3.setChannel(channel);
170 }
171}

Callers

nothing calls this directly

Calls 1

checkModeChangeFunction · 0.70

Tested by

no test coverage detected