Files
firmware/src/mesh/http/WebServer.h
T
Ben MeadorsandCopilot c4bac04be3 Exclude web server, paxcounter and few others from original ESP32 generation to fix IRAM overflow (#10005)
* Exclude web server, paxcounter and few others from original ESP32 generation to fix IRAM overflow

* Update variants/esp32/esp32.ini

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update variants/esp32/esp32.ini

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update build source filter in esp32.ini

Removed WiFiAPClient.cpp from build source filter.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-25 17:52:02 -05:00

46 lines
826 B
C++

#pragma once
#include "PhoneAPI.h"
#include "concurrency/OSThread.h"
#include <Arduino.h>
#include <functional>
#if !MESHTASTIC_EXCLUDE_WEBSERVER
void initWebServer();
void createSSLCert();
class WebServerThread : private concurrency::OSThread
{
private:
uint32_t lastActivityTime = 0;
public:
WebServerThread();
uint32_t requestRestart = 0;
void markActivity();
protected:
virtual int32_t runOnce() override;
int32_t getAdaptiveInterval();
};
extern WebServerThread *webServerThread;
#else
// Stub implementations when web server is excluded
inline void initWebServer() {}
inline void createSSLCert() {}
class WebServerThread
{
public:
WebServerThread() {}
uint32_t requestRestart = 0;
void markActivity() {}
};
inline WebServerThread *webServerThread = nullptr;
#endif