mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-27 10:21:40 +00:00
Cleanup content handler and remove request counter.
This commit is contained in:
parent
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.
|
// 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()) {
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -63,6 +63,7 @@ static void handleWebResponse()
|
|||||||
if(secureServer)
|
if(secureServer)
|
||||||
secureServer->loop();
|
secureServer->loop();
|
||||||
insecureServer->loop();
|
insecureServer->loop();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user