#ifndef Web_h #define Web_h /* Code taken from espressif ESP32 OTA Update example */ #include #include #include #include #include #include "Assets.h" #include "Display.h" #include "WiFiScan.h" extern Display display_obj; extern WiFiScan wifi_scan_obj; class Web { private: PROGMEM const char* host = "esp32marauder"; PROGMEM const char* ssid = "MarauderOTA"; PROGMEM const char* password = "justcallmekoko"; bool serving = false; int num_sta = 0; PROGMEM const char* loginIndex = "
" "" "" "" "
" "
" "" "" "" "" "
" "
" "" "" "" "
" "
" "" "" "" "" "
" "
ESP32 Login Page
" "
" "
Username:
Password:
" "
" ""; /* * Server Index Page */ PROGMEM const char* serverIndex = "" "Because the lack of an asynchronous webserver in this Arduino sketch like 'ESPAsyncWebServer',
" "both file 'serverIndex' and 'jquery.min.js' can't be read from the webserver at the same time.

" "Your web browser probably requests those two files simultaneously and therefore
" "the javascript file failed to load. By a refresh of this page, the browser cash has already
" "load 'serverIndex' file, the web browser will do a second attempt to only read the javascript file.
" "This second attempt, with an idle webserver, will be processed.

" "Long story short, press F5 (refresh web browser) before uploading your firmware.

" "
" "" "" "
" "
progress: 0%
" ""; public: Web(); void main(); PROGMEM static void onJavaScript(); void setupOTAupdate(); void shutdownServer(); }; #endif