A3XX: Fix electrical bug
This commit is contained in:
parent
970689cf66
commit
77338c1b2e
1 changed files with 6 additions and 4 deletions
|
@ -403,7 +403,7 @@ var master_elec = func {
|
|||
setprop("/systems/electrical/battery2-amps", 0);
|
||||
}
|
||||
|
||||
if ((dc1 > 0) or (dc2 > 0)) {
|
||||
if ((getprop("/systems/electrical/battery1-amps") > 120) or (getprop("/systems/electrical/battery2-amps") > 120)) {
|
||||
setprop("/systems/electrical/bus/dcbat", dc_volt_std);
|
||||
} else {
|
||||
setprop("/systems/electrical/bus/dcbat", 0);
|
||||
|
@ -421,17 +421,19 @@ var master_elec = func {
|
|||
charge2.stop();
|
||||
}
|
||||
|
||||
if ((dcbat > 0) and battery1_sw and !batt1_fail) {
|
||||
dc1 = getprop("/systems/electrical/bus/dc1");
|
||||
dc2 = getprop("/systems/electrical/bus/dc2");
|
||||
|
||||
if ((dc1 > 25 or dc2 > 25) and battery1_sw and !batt1_fail) {
|
||||
decharge1.stop();
|
||||
charge1.start();
|
||||
}
|
||||
|
||||
if ((dcbat > 0) and battery2_sw and !batt2_fail) {
|
||||
if ((dc1 > 25 or dc2 > 25) and battery2_sw and !batt2_fail) {
|
||||
decharge1.stop();
|
||||
charge2.start();
|
||||
}
|
||||
|
||||
|
||||
if ((dcbat == 0) and battery1_sw and !batt1_fail) {
|
||||
decharge1.start();
|
||||
}
|
||||
|
|
Reference in a new issue