Systems: Fix charge/discharge offset values
This commit is contained in:
parent
094a1511b2
commit
336c77bf28
2 changed files with 9 additions and 9 deletions
|
@ -613,8 +613,8 @@ var ELEC = {
|
|||
dc2 = getprop("/systems/electrical/bus/dc2");
|
||||
|
||||
if (battery1_percent < 100 and (dc1 > 25 or dc2 > 25) and battery1_sw and !batt1_fail) {
|
||||
if (getprop("/systems/electrical/battery1-time") + 30 < getprop("/sim/time/elapsed-sec")) {
|
||||
battery1_percent_calc = battery1_percent + 4.5; # Roughly 90 percent every 10 mins
|
||||
if (getprop("/systems/electrical/battery1-time") + 5 < getprop("/sim/time/elapsed-sec")) {
|
||||
battery1_percent_calc = battery1_percent + 0.75; # Roughly 90 percent every 10 mins
|
||||
if (battery1_percent_calc > 100) {
|
||||
battery1_percent_calc = 100;
|
||||
}
|
||||
|
@ -622,8 +622,8 @@ var ELEC = {
|
|||
setprop("/systems/electrical/battery1-time", getprop("/sim/time/elapsed-sec"));
|
||||
}
|
||||
} else if (battery1_amps >= 120 and battery1_sw and !batt1_fail) {
|
||||
if (getprop("/systems/electrical/battery1-time") + 30 < getprop("/sim/time/elapsed-sec")) {
|
||||
battery1_percent_calc = battery1_percent - 1.5; # Roughly 90 percent every 30 mins
|
||||
if (getprop("/systems/electrical/battery1-time") + 5 < getprop("/sim/time/elapsed-sec")) {
|
||||
battery1_percent_calc = battery1_percent - 0.25; # Roughly 90 percent every 30 mins
|
||||
if (battery1_percent_calc < 0) {
|
||||
battery1_percent_calc = 0;
|
||||
}
|
||||
|
@ -635,8 +635,8 @@ var ELEC = {
|
|||
}
|
||||
|
||||
if (battery2_percent < 100 and (dc1 > 25 or dc2 > 25) and battery2_sw and !batt2_fail) {
|
||||
if (getprop("/systems/electrical/battery2-time") + 30 < getprop("/sim/time/elapsed-sec")) {
|
||||
battery2_percent_calc = battery2_percent + 4.5; # Roughly 90 percent every 10 mins
|
||||
if (getprop("/systems/electrical/battery2-time") + 5 < getprop("/sim/time/elapsed-sec")) {
|
||||
battery2_percent_calc = battery2_percent + 0.75; # Roughly 90 percent every 10 mins
|
||||
if (battery2_percent_calc > 100) {
|
||||
battery2_percent_calc = 100;
|
||||
}
|
||||
|
@ -644,8 +644,8 @@ var ELEC = {
|
|||
setprop("/systems/electrical/battery2-time", getprop("/sim/time/elapsed-sec"));
|
||||
}
|
||||
} else if (battery2_amps >= 120 and battery2_sw and !batt2_fail) {
|
||||
if (getprop("/systems/electrical/battery2-time") + 30 < getprop("/sim/time/elapsed-sec")) {
|
||||
battery2_percent_calc = battery2_percent - 1.5; # Roughly 90 percent every 30 mins
|
||||
if (getprop("/systems/electrical/battery2-time") + 5 < getprop("/sim/time/elapsed-sec")) {
|
||||
battery2_percent_calc = battery2_percent - 0.25; # Roughly 90 percent every 30 mins
|
||||
if (battery2_percent_calc < 0) {
|
||||
battery2_percent_calc = 0;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
4411
|
||||
4412
|
Reference in a new issue