Merge branch 'master' of https://github.com/it0uchpods/IDG-A32X
This commit is contained in:
commit
8efe40c1f4
3 changed files with 13 additions and 12 deletions
|
@ -169,8 +169,6 @@ var master_elec = func {
|
||||||
extpwr_on = getprop("/controls/switches/cart");
|
extpwr_on = getprop("/controls/switches/cart");
|
||||||
stateL = getprop("/engines/engine[0]/state");
|
stateL = getprop("/engines/engine[0]/state");
|
||||||
stateR = getprop("/engines/engine[1]/state");
|
stateR = getprop("/engines/engine[1]/state");
|
||||||
xtieL = getprop("/controls/electrical/xtie/xtieL");
|
|
||||||
xtieR = getprop("/controls/electrical/xtie/xtieR");
|
|
||||||
ac1 = getprop("/systems/electrical/bus/ac1");
|
ac1 = getprop("/systems/electrical/bus/ac1");
|
||||||
ac2 = getprop("/systems/electrical/bus/ac2");
|
ac2 = getprop("/systems/electrical/bus/ac2");
|
||||||
ac_ess = getprop("/systems/electrical/bus/ac-ess");
|
ac_ess = getprop("/systems/electrical/bus/ac-ess");
|
||||||
|
@ -231,16 +229,19 @@ var master_elec = func {
|
||||||
setprop("/controls/electrical/xtie/xtieL", 0);
|
setprop("/controls/electrical/xtie/xtieL", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xtieL = getprop("/controls/electrical/xtie/xtieL");
|
||||||
|
xtieR = getprop("/controls/electrical/xtie/xtieR");
|
||||||
|
|
||||||
# Left DC bus yes?
|
# Left DC bus yes?
|
||||||
if (stateL == 3 and gen1_sw and !gen1_fail) {
|
if (stateL == 3 and gen1_sw and !gen1_fail) {
|
||||||
setprop("/systems/electrical/bus/dc1", dc_volt_std);
|
setprop("/systems/electrical/bus/dc1", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc1-amps", dc_amps_std);
|
setprop("/systems/electrical/bus/dc1-amps", dc_amps_std);
|
||||||
} else if (extpwr_on and gen_ext_sw) {
|
} else if (extpwr_on and gen_ext_sw and apu_ext_crosstie_sw) {
|
||||||
setprop("/systems/electrical/bus/dc1", dc_volt_std);
|
setprop("/systems/electrical/bus/dc1", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc1-amps", dc_amps_std);
|
setprop("/systems/electrical/bus/dc1-amps", dc_amps_std);
|
||||||
} else if (gen_apu and !genapu_fail) {
|
} else if (gen_apu and !genapu_fail and apu_ext_crosstie_sw) {
|
||||||
setprop("/systems/electrical/bus/dc1", dc_volt_std);
|
setprop("/systems/electrical/bus/dc1", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc1-amps", dc_amps_std);
|
setprop("/systems/electrical/bus/dc1-amps", dc_amps_std);
|
||||||
|
@ -265,11 +266,11 @@ var master_elec = func {
|
||||||
setprop("/systems/electrical/bus/dc2", dc_volt_std);
|
setprop("/systems/electrical/bus/dc2", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc2-amps", dc_amps_std);
|
setprop("/systems/electrical/bus/dc2-amps", dc_amps_std);
|
||||||
} else if (extpwr_on and gen_ext_sw) {
|
} else if (extpwr_on and gen_ext_sw and apu_ext_crosstie_sw) {
|
||||||
setprop("/systems/electrical/bus/dc2", dc_volt_std);
|
setprop("/systems/electrical/bus/dc2", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc2-amps", dc_amps_std);
|
setprop("/systems/electrical/bus/dc2-amps", dc_amps_std);
|
||||||
} else if (gen_apu and !genapu_fail) {
|
} else if (gen_apu and !genapu_fail and apu_ext_crosstie_sw) {
|
||||||
setprop("/systems/electrical/bus/dc2", dc_volt_std);
|
setprop("/systems/electrical/bus/dc2", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
||||||
setprop("/systems/electrical/bus/dc2-amps", dc_amps_std);
|
setprop("/systems/electrical/bus/dc2-amps", dc_amps_std);
|
||||||
|
@ -292,9 +293,9 @@ var master_elec = func {
|
||||||
# Left AC bus yes?
|
# Left AC bus yes?
|
||||||
if (stateL == 3 and gen1_sw and !gen1_fail) {
|
if (stateL == 3 and gen1_sw and !gen1_fail) {
|
||||||
setprop("/systems/electrical/bus/ac1", ac_volt_std);
|
setprop("/systems/electrical/bus/ac1", ac_volt_std);
|
||||||
} else if (extpwr_on and gen_ext_sw) {
|
} else if (extpwr_on and gen_ext_sw and apu_ext_crosstie_sw) {
|
||||||
setprop("/systems/electrical/bus/ac1", ac_volt_std);
|
setprop("/systems/electrical/bus/ac1", ac_volt_std);
|
||||||
} else if (gen_apu and !genapu_fail) {
|
} else if (gen_apu and !genapu_fail and apu_ext_crosstie_sw) {
|
||||||
setprop("/systems/electrical/bus/ac1", ac_volt_std);
|
setprop("/systems/electrical/bus/ac1", ac_volt_std);
|
||||||
} else if (apu_ext_crosstie_sw == 1 and xtieL) {
|
} else if (apu_ext_crosstie_sw == 1 and xtieL) {
|
||||||
setprop("/systems/electrical/bus/ac1", ac_volt_std);
|
setprop("/systems/electrical/bus/ac1", ac_volt_std);
|
||||||
|
@ -307,9 +308,9 @@ var master_elec = func {
|
||||||
# Right AC bus yes?
|
# Right AC bus yes?
|
||||||
if (stateR == 3 and gen2_sw and !gen2_fail) {
|
if (stateR == 3 and gen2_sw and !gen2_fail) {
|
||||||
setprop("/systems/electrical/bus/ac2", ac_volt_std);
|
setprop("/systems/electrical/bus/ac2", ac_volt_std);
|
||||||
} else if (extpwr_on and gen_ext_sw) {
|
} else if (extpwr_on and gen_ext_sw and apu_ext_crosstie_sw) {
|
||||||
setprop("/systems/electrical/bus/ac2", ac_volt_std);
|
setprop("/systems/electrical/bus/ac2", ac_volt_std);
|
||||||
} else if (gen_apu and !genapu_fail) {
|
} else if (gen_apu and !genapu_fail and apu_ext_crosstie_sw) {
|
||||||
setprop("/systems/electrical/bus/ac2", ac_volt_std);
|
setprop("/systems/electrical/bus/ac2", ac_volt_std);
|
||||||
} else if (apu_ext_crosstie_sw == 1 and xtieR) {
|
} else if (apu_ext_crosstie_sw == 1 and xtieR) {
|
||||||
setprop("/systems/electrical/bus/ac2", ac_volt_std);
|
setprop("/systems/electrical/bus/ac2", ac_volt_std);
|
||||||
|
|
|
@ -160,7 +160,7 @@ var master_fuel = func {
|
||||||
gravityfeedL = getprop("/systems/fuel/gravityfeedL");
|
gravityfeedL = getprop("/systems/fuel/gravityfeedL");
|
||||||
gravityfeedR = getprop("/systems/fuel/gravityfeedR");
|
gravityfeedR = getprop("/systems/fuel/gravityfeedR");
|
||||||
|
|
||||||
if ((getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") >= 50) and tank1feed0 and tank1feed1 and !gravityfeedL and !gravityfeedR) {
|
if ((getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") >= 50) and tank1feed and !gravityfeedL and !gravityfeedR) {
|
||||||
setprop("/systems/fuel/only-use-ctr-tank", 1);
|
setprop("/systems/fuel/only-use-ctr-tank", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/only-use-ctr-tank", 0);
|
setprop("/systems/fuel/only-use-ctr-tank", 0);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1537
|
1540
|
Reference in a new issue