Optimised memory use for wifi config
This commit is contained in:
@@ -648,10 +648,6 @@ void setup() {
|
|||||||
tft.init();
|
tft.init();
|
||||||
tft.initDMA();
|
tft.initDMA();
|
||||||
|
|
||||||
webserver.on("/", handleRoot);
|
|
||||||
webserver.on("/downloadCSV", HTTP_GET, handleDownloadCSV);
|
|
||||||
webserver.on("/logo.png", handleLogo);
|
|
||||||
|
|
||||||
doTheme();
|
doTheme();
|
||||||
|
|
||||||
if (displayflip == 0) {
|
if (displayflip == 0) {
|
||||||
|
|||||||
@@ -911,6 +911,9 @@ void tryWiFi() {
|
|||||||
if (wc.autoConnect()) {
|
if (wc.autoConnect()) {
|
||||||
Server.begin();
|
Server.begin();
|
||||||
Udp.begin(9031);
|
Udp.begin(9031);
|
||||||
|
webserver.on("/", handleRoot);
|
||||||
|
webserver.on("/downloadCSV", HTTP_GET, handleDownloadCSV);
|
||||||
|
webserver.on("/logo.png", handleLogo);
|
||||||
webserver.begin();
|
webserver.begin();
|
||||||
NTPupdate();
|
NTPupdate();
|
||||||
remoteip = IPAddress (WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient);
|
remoteip = IPAddress (WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient);
|
||||||
@@ -927,6 +930,7 @@ void tryWiFi() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Server.end();
|
Server.end();
|
||||||
|
webserver.stop();
|
||||||
Udp.stop();
|
Udp.stop();
|
||||||
WiFi.mode(WIFI_OFF);
|
WiFi.mode(WIFI_OFF);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,4 +150,7 @@ extern void startFMDXScan();
|
|||||||
extern void cancelDXScan();
|
extern void cancelDXScan();
|
||||||
extern void printLogbookCSV();
|
extern void printLogbookCSV();
|
||||||
extern void NTPupdate();
|
extern void NTPupdate();
|
||||||
|
extern void handleRoot();
|
||||||
|
extern void handleDownloadCSV();
|
||||||
|
extern void handleLogo();
|
||||||
#endif
|
#endif
|
||||||
@@ -5728,6 +5728,10 @@ void DoMenu() {
|
|||||||
char rabbitearspw [9];
|
char rabbitearspw [9];
|
||||||
RabbitearsPassword.toCharArray(rabbitearspw, 9);
|
RabbitearsPassword.toCharArray(rabbitearspw, 9);
|
||||||
UpdateFonts(1);
|
UpdateFonts(1);
|
||||||
|
if (wifi) {
|
||||||
|
wifi = false;
|
||||||
|
tryWiFi();
|
||||||
|
}
|
||||||
WiFiConnectParam XDRGTK_key_text("Set XDRGTK Password: (max 8 characters)");
|
WiFiConnectParam XDRGTK_key_text("Set XDRGTK Password: (max 8 characters)");
|
||||||
WiFiConnectParam XDRGTK_key_input("XDRGTK_key", "Password", key, 9);
|
WiFiConnectParam XDRGTK_key_input("XDRGTK_key", "Password", key, 9);
|
||||||
WiFiConnectParam RabbitearsUser_text("Set rabbitears.info live bandscan user ID");
|
WiFiConnectParam RabbitearsUser_text("Set rabbitears.info live bandscan user ID");
|
||||||
|
|||||||
Reference in New Issue
Block a user