sforkowany z mirror/meshtastic-firmware
Cleanup content handler and remove request counter.
rodzic
2d8bf4d684
commit
8e50e25eec
|
@ -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()) {
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -63,6 +63,7 @@ static void handleWebResponse()
|
|||
if(secureServer)
|
||||
secureServer->loop();
|
||||
insecureServer->loop();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue