mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-16 07:42:37 +00:00
Fix for SoftAP bugs
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "rom/rtc.h"
|
||||
#include <driver/rtc_io.h>
|
||||
#include <driver/uart.h>
|
||||
#include "mesh/http/WiFiAPClient.h"
|
||||
|
||||
#include "nimble/BluetoothUtil.h"
|
||||
|
||||
@@ -48,6 +49,22 @@ RTC_DATA_ATTR int bootCount = 0;
|
||||
void setCPUFast(bool on)
|
||||
{
|
||||
#ifndef NO_ESP32
|
||||
|
||||
if (isWifiAvailable()) {
|
||||
/*
|
||||
*
|
||||
* There's a newly introduced bug in the espressif framework where WiFi is
|
||||
* unstable when the frequency is less than 240mhz.
|
||||
*
|
||||
* This mostly impacts WiFi AP mode but we'll bump the frequency for
|
||||
* all WiFi use cases.
|
||||
* (Added: Dec 23, 2021 by Jm Casler)
|
||||
*/
|
||||
DEBUG_MSG("Setting CPU to 240mhz because WiFi is in use.\n");
|
||||
setCpuFrequencyMhz(240);
|
||||
return;
|
||||
}
|
||||
|
||||
setCpuFrequencyMhz(on ? 240 : 80);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user