firmware wip - cleanup a bit, I noticed that i am aleady running out of IRAM (94% used)

This commit is contained in:
Marcus 2024-04-30 21:08:25 +02:00
parent 651eb6b847
commit c93933ba20

View file

@ -175,128 +175,113 @@ ESP8266WebServer webserver(80);
const char HTMLheaderP1[] PROGMEM = R"EOF( const char HTMLheaderP1[] PROGMEM = R"EOF(
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset='UTF-8'> <meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'> <meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>)EOF"; <title>
// page title )EOF";
// page title
const char HTMLheaderP2[] PROGMEM = R"EOF( const char HTMLheaderP2[] PROGMEM = R"EOF(
</title> </title>
<!-- <link rel='stylesheet' href='/style.css'> --> <!-- <link rel='stylesheet' href='/style.css'> -->
<style> <style>
/* Having the whole CSS here ensures it's all the time present*/ /* Having the whole CSS here ensures it's all the time present*/
body { body {
color: #cae0d0; color: #cae0d0;
background-color: #1d211e; background-color: #1d211e;
font-family: helvetica; font-family: helvetica;
} }
.center {
.center { width: 60%; min-width: 420px;
width: 60%; min-width: 420px; margin: auto;
margin: auto;
}
} h1, h2, h3, h4, h5 {
text-align: center;
h1, h2, h3, h4, h5 { }
text-align: center; a:link, a:visited {
} color: #04AA6D;
}
a:link, a:visited { a:hover {
color: #04AA6D; color: #64AA6D;
} }
a:active {
a:hover { color: #04AA6D;
color: #64AA6D; }
} .infomsg , .warnmsg {
color: #fff;
a:active { border-radius: 3px;
color: #04AA6D; padding: 4px;
} width: fit-content; min-width: 200px; max-width: 420px;
margin: auto;
.infomsg , .warnmsg { margin-bottom: 5px;
color: #fff; font-weight: bold;
border-radius: 3px; text-align: center;
padding: 4px; text-decoration: none;
width: fit-content; min-width: 200px; max-width: 420px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
margin: auto; }
margin-bottom: 5px; .infomsg {
font-weight: bold; background: #04AA6D;
text-align: center; }
text-decoration: none; .warnmsg {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); background: #aa4204;
} }
.inputShort {
.infomsg { width: 42px;
background: #04AA6D; }
} .nav {
background: #333;
.warnmsg { width: 60%; min-width: 420px;
background: #aa4204; margin: auto;
} margin-bottom: 10px;
padding: 0;
.inputShort { position: relative;
width: 42px; border-radius: 3px;
} }
/* from https://gist.github.com/iamhelenliu/5755179 - thank you! */ .nav li {
.nav { display: inline-block;
background: #333; list-style: none;
width: 60%; min-width: 420px; }
margin: auto;
margin-bottom: 10px; .nav li:first-of-type {
padding: 0; background: #026b45;
position: relative; border-top-left-radius: 3px;
border-radius: 3px; border-bottom-left-radius: 3px;
} }
.nav li a , .nav span {
.nav li { color: #ddd;
display: inline-block; display: block;
list-style: none; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
} font-size:0.8em;
padding: 10px 20px;
.nav li:first-of-type { text-decoration: none;
background: #026b45; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
border-top-left-radius: 3px; }
border-bottom-left-radius: 3px; .nav li a:hover , .activeMenu , .menuTime{
} background: #04AA6D;
color: #fff;
.nav li a , .nav span { border-radius: 3px;
color: #ddd; }
display: block; .nav li a:active {
font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; color: #cae0d0;
font-size:0.8em; }
padding: 10px 20px; .activeMenu {
text-decoration: none; background: #444;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); }
} .MenuTime {
background: #292929;
.nav li a:hover , .activeMenu , .menuTime{ }
background: #04AA6D; </style>
color: #fff; </head>
border-radius: 3px; <body>
} <ul class='nav'>)EOF";
.nav li a:active {
color: #cae0d0;
}
.activeMenu {
background: #444;
}
.MenuTime {
background: #292929;
}
</style>
</head>
<body>
<ul class='nav'>)EOF";
// Menu as unordered List, defined in returnHTMLheader // Menu as unordered List, defined in returnHTMLheader
const char HTMLfooter[] PROGMEM = R"EOF( const char HTMLfooter[] PROGMEM = R"EOF(
</div> </div>
</body> </body>
</html> </html>
)EOF"; )EOF";
@ -308,7 +293,7 @@ const char HTMLsuccess[] PROGMEM = R"EOF(
const char HTMLneedRestart[] PROGMEM = R"EOF( const char HTMLneedRestart[] PROGMEM = R"EOF(
<div class='warnmsg'>Restart is required to apply new WiFi settings! <div class='warnmsg'>Restart is required to apply new WiFi settings!
<form action='/system/restart'> <form action='/system/restart'>
<input type='submit' value='Restart now' /> <input type='submit' value='Restart now' />
</form> </form>
</div> </div>
)EOF"; )EOF";
@ -318,11 +303,6 @@ const char HTMLhelp[] PROGMEM = R"EOF(
Here you will get some helpful help. Here you will get some helpful help.
)EOF"; )EOF";
const char JSreplaceStr[] PROGMEM = R"EOF(
<script>
</script>
)EOF";
const char JSconvertDateToEpoch[] PROGMEM = R"EOF( const char JSconvertDateToEpoch[] PROGMEM = R"EOF(
<script> <script>