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
1 changed files with 103 additions and 123 deletions

View File

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