mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-23 15:38:14 -08:00
Marauder compiles and installs for ESP32-C5
This commit is contained in:
@@ -7129,10 +7129,19 @@ void WiFiScan::changeChannel()
|
||||
// Function to cycle to the next channel
|
||||
void WiFiScan::channelHop()
|
||||
{
|
||||
this->set_channel = this->set_channel + 1;
|
||||
if (this->set_channel > 14) {
|
||||
this->set_channel = 1;
|
||||
}
|
||||
#ifndef HAS_DUAL_BAND
|
||||
this->set_channel = this->set_channel + 1;
|
||||
if (this->set_channel > 14) {
|
||||
this->set_channel = 1;
|
||||
}
|
||||
#else
|
||||
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
|
||||
if (this->dual_band_channel_index >= DUAL_BAND_CHANNELS)
|
||||
this->dual_band_channel_index = 0;
|
||||
else
|
||||
this->dual_band_channel_index++;
|
||||
#endif
|
||||
|
||||
esp_wifi_set_channel(this->set_channel, WIFI_SECOND_CHAN_NONE);
|
||||
delay(1);
|
||||
}
|
||||
@@ -7458,7 +7467,7 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
(currentScanMode == WIFI_SCAN_STATION_WAR_DRIVE) ||
|
||||
(currentScanMode == WIFI_SCAN_ALL))
|
||||
{
|
||||
if (currentTime - initTime >= this->channel_hop_delay * 1000)
|
||||
if (currentTime - initTime >= this->channel_hop_delay * HOP_DELAY)
|
||||
{
|
||||
initTime = millis();
|
||||
channelHop();
|
||||
|
||||
Reference in New Issue
Block a user