Cleanup content handler and remove request counter.

This commit is contained in:
Jm Casler 2021-12-23 19:56:37 -08:00
parent 2d8bf4d684
commit 8e50e25eec
3 changed files with 1 additions and 18 deletions

View File

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

View File

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

View File

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