make wifi interface a little more friendly
For #5 make wifi interface a little more friendly. * Add an index.html page to the SPIFFS tree * Add a favicon because browsers spam the network for it if they can't find one, and the ~2KB of storage is a small price to pay. * Add some more info to the info page which I have found useful.
This commit is contained in:
@@ -78,8 +78,10 @@ void handleUpdate( AsyncWebServerRequest *request, const String& filename, size_
|
||||
*/
|
||||
void asyncwebserver_setup(void){
|
||||
|
||||
asyncserver.on("/info", HTTP_GET, [](AsyncWebServerRequest * request) {
|
||||
request->send(200, "text/plain", "Firmwarestand: " __DATE__ " " __TIME__ "\r\nGCC-Version: " __VERSION__ "\r\n" );
|
||||
asyncserver.on("/info", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
String message("Firmwarestand: " __DATE__ " " __TIME__ "\nGCC-Version: " __VERSION__ "\n");
|
||||
message = message + "Heap: " + ESP.getFreeHeap() + " bytes used of " + ESP.getHeapSize() + " bytes total\nHeap low water mark: " + ESP.getMinFreeHeap() + " bytes available\nPsram: " + ESP.getFreePsram() + " bytes used of " + ESP.getPsramSize() + " bytes available\nCurrent battery voltage: " + TTGOClass::getWatch()->power->getBattVoltage() / 1000 + " Volts";
|
||||
request->send(200, "text/plain", message.c_str());
|
||||
});
|
||||
|
||||
asyncserver.on("/shot", HTTP_GET, [](AsyncWebServerRequest * request) {
|
||||
|
||||
Reference in New Issue
Block a user