firmware wip - Notification about Maintenance Mode in Menu bar

This commit is contained in:
Marcus 2024-05-08 18:33:22 +02:00
parent 9196ef1076
commit 9e0c5056ae

View file

@ -291,7 +291,6 @@ a:active {
width: 60%; min-width: 420px; width: 60%; min-width: 420px;
} }
} }
</style> </style>
</head> </head>
<body> <body>
@ -1734,21 +1733,24 @@ String returnHTMLheader(String MenuEntry = "") {
} }
header += ">&#x2753; Help</a></li>\n"; header += ">&#x2753; Help</a></li>\n";
// sixth menu entry // sixth menu entry - time and status icons / info
header += "<li><span class='MenuTime'>"; header += "<li><span class='MenuTime'>";
header += timeClient.getFormattedTime(); header += timeClient.getFormattedTime();
// status icons and info
if(MaintenanceMode == true) {
// status icons
header += " | &#x1F1F2; ";
header += MaintenanceDuration - ((millis() - MaintenanceStarted) / 1000);
header += "s";
}
header += "</span></li>\n"; header += "</span></li>\n";
// seventh menu entry
// CanGrow Version
header += "<li><a href='https://git.la10cy.net/DeltaLima/CanGrow' target='_blank'>CanGrow v"; header += "<li><a href='https://git.la10cy.net/DeltaLima/CanGrow' target='_blank'>CanGrow v";
header += CanGrowVer; header += CanGrowVer;
header += "</a></li>\n"; header += "</a></li>\n";
if(MaintenanceMode == true) {
// status icons
header += "<li><span>&#x1F1F2;</span></li>\n";
}
// close <ul> and start <div> // close <ul> and start <div>
header += "</ul><div class='center'>"; header += "</ul><div class='center'>";
@ -2405,7 +2407,7 @@ void POSTsystemSettings() {
UseLEDrelais = webserver.arg("UseLEDrelais").toInt(); UseLEDrelais = webserver.arg("UseLEDrelais").toInt();
UseFANrelais = webserver.arg("UseFANrelais").toInt(); UseFANrelais = webserver.arg("UseFANrelais").toInt();
TemperatureSensor_Type = webserver.arg("TemperatureSensor_Type").toInt(); TemperatureSensor_Type = webserver.arg("TemperatureSensor_Type").toInt();
MaintenanceDuration = webserver.arg("TemperatureSensor_Type").toInt(); MaintenanceDuration = webserver.arg("MaintenanceDuration").toInt();
configured = true; configured = true;
@ -2583,7 +2585,7 @@ void POSTsetOutput() {
webserver.send(302, "text/plain", "switch: success!\n"); webserver.send(302, "text/plain", "switch: success!\n");
} }
if(EnableMaintenance > 0 ) { if((EnableMaintenance > 0) && (UseLEDrelais == false)) {
MaintenanceMode = true; MaintenanceMode = true;
MaintenanceStarted = millis(); MaintenanceStarted = millis();
} else { } else {