Cleanup content handler and remove request counter.

1.2-legacy
Jm Casler 2021-12-23 19:56:37 -08:00
rodzic 2d8bf4d684
commit 8e50e25eec
3 zmienionych plików z 1 dodań i 18 usunięć

Wyświetl plik

@ -53,19 +53,6 @@ char contentTypes[][2][32] = {{".txt", "text/plain"}, {".html", "text/html"}
// Our API to handle messages to and from the radio.
HttpAPI webAPI;
uint32_t numberOfRequests = 0;
uint32_t timeSpeedUp = 0;
uint32_t getTimeSpeedUp()
{
return timeSpeedUp;
}
void setTimeSpeedUp()
{
timeSpeedUp = millis();
}
void registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer)
{
@ -563,7 +550,6 @@ void handleReport(HTTPRequest *req, HTTPResponse *res)
res->println("\"wifi\": {");
res->printf("\"web_request_count\": %d,\n", numberOfRequests);
res->println("\"rssi\": " + String(WiFi.RSSI()) + ",");
if (radioConfig.preferences.wifi_ap_mode || isSoftAPForced()) {

Wyświetl plik

@ -18,10 +18,6 @@ void handleReport(HTTPRequest *req, HTTPResponse *res);
void middlewareSpeedUp240(HTTPRequest *req, HTTPResponse *res, std::function<void()> next);
void middlewareSpeedUp160(HTTPRequest *req, HTTPResponse *res, std::function<void()> next);
uint32_t getTimeSpeedUp();
void setTimeSpeedUp();
// Interface to the PhoneAPI to access the protobufs with messages
class HttpAPI : public PhoneAPI
{

Wyświetl plik

@ -63,6 +63,7 @@ static void handleWebResponse()
if(secureServer)
secureServer->loop();
insecureServer->loop();
}
}
}