mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-14 07:21:30 +10:00
* 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>
46 lines
826 B
C++
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
|