mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Merge and fix conflicts
This commit is contained in:
commit
d6cbd1bcdd
6 changed files with 33 additions and 58 deletions
|
@ -1258,42 +1258,34 @@ String processor(const String& var) {
|
|||
|
||||
if (contactor_control_enabled) {
|
||||
content += "<h4>Contactors controlled by emulator, state: ";
|
||||
if (datalayer.system.status.contactors_engaged) {
|
||||
if (datalayer.system.status.contactors_battery2_engaged) {
|
||||
content += "<span style='color: green;'>ON</span>";
|
||||
} else {
|
||||
content += "<span style='color: red;'>OFF</span>";
|
||||
}
|
||||
content += "</h4>";
|
||||
|
||||
content += "<h4>Precharge: (";
|
||||
content += PRECHARGE_TIME_MS;
|
||||
content += " ms) Cont. Neg.: ";
|
||||
|
||||
if (pwm_contactor_control) {
|
||||
if (datalayer.system.status.contactors_engaged) {
|
||||
content += "<span style='color: green;'>Economized</span>";
|
||||
content += " Cont. Pos.: ";
|
||||
content += "<span style='color: green;'>Economized</span>";
|
||||
} else {
|
||||
content += "<span style='color: red;'>✕</span>";
|
||||
content += " Cont. Pos.: ";
|
||||
content += "<span style='color: red;'>✕</span>";
|
||||
}
|
||||
} else { // No PWM_CONTACTOR_CONTROL , we can read the pin and see feedback. Helpful if channel overloaded
|
||||
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>";
|
||||
}
|
||||
if (contactor_control_enabled_double_battery) {
|
||||
if (pwm_contactor_control) {
|
||||
content += "<h4>Cont. Neg.: ";
|
||||
if (datalayer.system.status.contactors_battery2_engaged) {
|
||||
content += "<span style='color: green;'>Economized</span>";
|
||||
content += " Cont. Pos.: ";
|
||||
content += "<span style='color: green;'>Economized</span>";
|
||||
} else {
|
||||
content += "<span style='color: red;'>✕</span>";
|
||||
content += " Cont. Pos.: ";
|
||||
content += "<span style='color: red;'>✕</span>";
|
||||
}
|
||||
} else { // No PWM_CONTACTOR_CONTROL , we can read the pin and see feedback. Helpful if channel overloaded
|
||||
content += "<h4>Cont. Neg.: ";
|
||||
if (digitalRead(SECOND_BATTERY_CONTACTORS_PIN) == HIGH) {
|
||||
content += "<span style='color: green;'>✓</span>";
|
||||
} else {
|
||||
content += "<span style='color: red;'>✕</span>";
|
||||
}
|
||||
} //no PWM_CONTACTOR_CONTROL
|
||||
content += "</h4>";
|
||||
}
|
||||
content += "</h4>";
|
||||
}
|
||||
|
||||
// Close the block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue