mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Bug Fix for Precharge Contactor Handling in SHUTDOWN_REQUESTED State and Web Interface Enhancement for Contactor Status Display
This commit is contained in:
parent
e21001ae5b
commit
ecc71eec60
2 changed files with 22 additions and 0 deletions
|
@ -744,6 +744,7 @@ void handle_contactors() {
|
||||||
if (timeSpentInFaultedMode > MAX_ALLOWED_FAULT_TICKS ||
|
if (timeSpentInFaultedMode > MAX_ALLOWED_FAULT_TICKS ||
|
||||||
(datalayer.system.settings.equipment_stop_active && contactorStatus != SHUTDOWN_REQUESTED)) {
|
(datalayer.system.settings.equipment_stop_active && contactorStatus != SHUTDOWN_REQUESTED)) {
|
||||||
contactorStatus = SHUTDOWN_REQUESTED;
|
contactorStatus = SHUTDOWN_REQUESTED;
|
||||||
|
datalayer.system.settings.equipment_stop_active = true;
|
||||||
}
|
}
|
||||||
if (contactorStatus == SHUTDOWN_REQUESTED && !datalayer.system.settings.equipment_stop_active) {
|
if (contactorStatus == SHUTDOWN_REQUESTED && !datalayer.system.settings.equipment_stop_active) {
|
||||||
contactorStatus = DISCONNECTED;
|
contactorStatus = DISCONNECTED;
|
||||||
|
|
|
@ -719,6 +719,27 @@ String processor(const String& var) {
|
||||||
content += "<span style='color: red;'>OFF</span>";
|
content += "<span style='color: red;'>OFF</span>";
|
||||||
}
|
}
|
||||||
content += "</h4>";
|
content += "</h4>";
|
||||||
|
|
||||||
|
content += "<h4>Pre Charge: ";
|
||||||
|
if (digitalRead(PRECHARGE_PIN) == HIGH) {
|
||||||
|
content += "<span style='color: green;'>✓</span>";
|
||||||
|
} else {
|
||||||
|
content += "<span style='color: red;'>✕</span>";
|
||||||
|
}
|
||||||
|
content += " Cont. Neg.: ";
|
||||||
|
if (digitalRead(NEGATIVE_CONTACTOR_PIN) == HIGH) {
|
||||||
|
content += "<span style='color: green;'>✓</span>";
|
||||||
|
} else {
|
||||||
|
content += "<span style='color: red;'>✕</span>";
|
||||||
|
}
|
||||||
|
|
||||||
|
content += " Cont. Pos.: ";
|
||||||
|
if (digitalRead(POSITIVE_CONTACTOR_PIN) == HIGH) {
|
||||||
|
content += "<span style='color: green;'>✓</span>";
|
||||||
|
} else {
|
||||||
|
content += "<span style='color: red;'>✕</span>";
|
||||||
|
}
|
||||||
|
content += "</h4>";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Close the block
|
// Close the block
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue