remove unused variables and methods

This commit is contained in:
technyon
2024-11-24 06:03:40 +01:00
parent b3dbb0fc0e
commit b29496c247
2 changed files with 1 additions and 29 deletions

View File

@@ -47,7 +47,6 @@ WebCfgServer::WebCfgServer(NukiNetwork* network, Preferences* preferences, bool
memset(&_credUser, 0, sizeof(_credUser));
memset(&_credPassword, 0, sizeof(_credPassword));
_hasCredentials = true;
const char *user = str.c_str();
memcpy(&_credUser, user, str.length());
@@ -960,22 +959,6 @@ esp_err_t WebCfgServer::buildOtaHtml(PsychicRequest *request, bool debug)
return response.endSend();
}
esp_err_t WebCfgServer::buildOtaCompletedHtml(PsychicRequest *request)
{
PsychicStreamResponse response(request, "text/plain");
response.beginSend();
buildHtmlHeader(&response);
response.print("<div>Over-the-air update completed.<br>You will be forwarded automatically.</div>");
response.print("<script type=\"text/javascript\">");
response.print("window.addEventListener('load', function () {");
response.print(" setTimeout(\"location.href = '/';\",10000);");
response.print("});");
response.print("</script>");
response.print("</body></html>");
return response.endSend();
}
void WebCfgServer::buildHtmlHeader(PsychicStreamResponse *response, String additionalHeader)
{
response->print("<html><head>");
@@ -1004,11 +987,6 @@ void WebCfgServer::waitAndProcess(const bool blocking, const uint32_t duration)
}
}
void WebCfgServer::printProgress(size_t prg, size_t sz)
{
Log->printf("Progress: %d%%\n", (prg*100)/_otaContentLen);
}
esp_err_t WebCfgServer::handleOtaUpload(PsychicRequest *request, const String& filename, uint64_t index, uint8_t *data, size_t len, bool final)
{
if(!request->url().endsWith("/uploadota"))
@@ -1042,7 +1020,6 @@ esp_err_t WebCfgServer::handleOtaUpload(PsychicRequest *request, const String& f
return(ESP_FAIL);
}
_otaStartTs = espMillis();
esp_task_wdt_config_t twdt_config =
{
.timeout_ms = 30000,

View File

@@ -98,10 +98,10 @@ private:
std::vector<int> _rssiList;
String generateConfirmCode();
String _confirmCode = "----";
esp_err_t buildSSIDListHtml(PsychicRequest *request);
esp_err_t buildConfirmHtml(PsychicRequest *request, const String &message, uint32_t redirectDelay = 5, bool redirect = false);
esp_err_t buildOtaHtml(PsychicRequest *request, bool debug = false);
esp_err_t buildOtaCompletedHtml(PsychicRequest *request);
esp_err_t sendCss(PsychicRequest *request);
esp_err_t sendFavicon(PsychicRequest *request);
void createSsidList();
@@ -109,7 +109,6 @@ private:
void waitAndProcess(const bool blocking, const uint32_t duration);
esp_err_t handleOtaUpload(PsychicRequest *request, const String& filename, uint64_t index, uint8_t *data, size_t len, bool final);
void printCheckBox(PsychicStreamResponse *response, const char* token, const char* description, const bool value, const char* htmlClass);
void printProgress(size_t prg, size_t sz);
#ifndef CONFIG_IDF_TARGET_ESP32H2
esp_err_t buildWifiConnectHtml(PsychicRequest *request);
bool processWiFi(PsychicRequest *request, String& message);
@@ -122,14 +121,10 @@ private:
NukiNetwork* _network = nullptr;
Preferences* _preferences = nullptr;
bool _hasCredentials = false;
char _credUser[31] = {0};
char _credPassword[31] = {0};
bool _allowRestartToPortal = false;
uint8_t _partitionType = 0;
uint32_t _transferredSize = 0;
int64_t _otaStartTs = 0;
size_t _otaContentLen = 0;
String _hostname;
bool _enabled = true;
};