1
0
Fork 0

Fixes for fixes in master, and improvements (including acconfig)

This commit is contained in:
legoboyvdlp R 2019-11-21 17:27:57 +00:00
parent f64bbea9f2
commit ab7c7cd5dc
10 changed files with 30 additions and 35 deletions

View file

@ -169,6 +169,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<flight_control name="none"/>

View file

@ -169,6 +169,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<flight_control name="none"/>

View file

@ -168,6 +168,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<flight_control name="none"/>
<aerodynamics file="Systems/a320-aerodynamics.xml"/>

View file

@ -168,6 +168,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<flight_control name="none"/>

View file

@ -168,6 +168,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<flight_control name="none"/>

View file

@ -270,6 +270,9 @@ var colddark = func {
setprop("/controls/switches/landing-lights-l", 0.0);
setprop("/controls/switches/landing-lights-r", 0.0);
setprop("/controls/atc/mode-knob", 0);
setprop("/controls/lighting/fcu-panel-knb", 0);
setprop("/controls/lighting/main-panel-knb", 0);
setprop("/controls/lighting/overhead-panel-knb", 0);
atc.transponderPanel.modeSwitch(1);
libraries.systemsInit();
failResetOld();
@ -348,6 +351,9 @@ var beforestart_b = func {
systems.FUEL.Switches.pumpCenter2.setValue(1);
systems.FUEL.Switches.pumpRight1.setValue(1);
systems.FUEL.Switches.pumpRight2.setValue(1);
setprop("/controls/lighting/fcu-panel-knb", 1);
setprop("/controls/lighting/main-panel-knb", 1);
setprop("/controls/lighting/overhead-panel-knb", 1);
setprop("/controls/electrical/switches/apu", 1);
setprop("/controls/electrical/switches/galley", 1);
setprop("/controls/electrical/switches/gen-1", 1);
@ -360,6 +366,12 @@ var beforestart_b = func {
setprop("/controls/adirs/ir[0]/knob","1");
setprop("/controls/adirs/ir[1]/knob","1");
setprop("/controls/adirs/ir[2]/knob","1");
systems.ADIRSControlPanel.adrSw(0);
systems.ADIRSControlPanel.adrSw(1);
systems.ADIRSControlPanel.adrSw(2);
systems.ADIRSControlPanel.irModeSw(0, 1);
systems.ADIRSControlPanel.irModeSw(1, 1);
systems.ADIRSControlPanel.irModeSw(2, 1);
systems.ADIRS.skip(0);
systems.ADIRS.skip(1);
systems.ADIRS.skip(2);
@ -430,6 +442,9 @@ var taxi_b = func {
systems.FUEL.Switches.pumpCenter2.setValue(1);
systems.FUEL.Switches.pumpRight1.setValue(1);
systems.FUEL.Switches.pumpRight2.setValue(1);
setprop("/controls/lighting/fcu-panel-knb", 1);
setprop("/controls/lighting/main-panel-knb", 1);
setprop("/controls/lighting/overhead-panel-knb", 1);
setprop("/controls/electrical/switches/apu", 1);
setprop("/controls/electrical/switches/galley", 1);
setprop("/controls/electrical/switches/gen-1", 1);
@ -442,6 +457,12 @@ var taxi_b = func {
setprop("/controls/adirs/ir[0]/knob","1");
setprop("/controls/adirs/ir[1]/knob","1");
setprop("/controls/adirs/ir[2]/knob","1");
systems.ADIRSControlPanel.adrSw(0);
systems.ADIRSControlPanel.adrSw(1);
systems.ADIRSControlPanel.adrSw(2);
systems.ADIRSControlPanel.irModeSw(0, 1);
systems.ADIRSControlPanel.irModeSw(1, 1);
systems.ADIRSControlPanel.irModeSw(2, 1);
systems.ADIRS.skip(0);
systems.ADIRS.skip(1);
systems.ADIRS.skip(2);

View file

@ -1088,7 +1088,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(acBusEssShedAtc);
}
if (phaseVar != 3 and phaseVar != 4 and phaseVar != 7 and systems.ELEC.Bus.ac1.getValue() and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
if (getprop("/instrumentation/tcas/serviceable") == 0 and phaseVar != 3 and phaseVar != 4 and phaseVar != 7 and systems.ELEC.Bus.ac1.getValue() and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
tcasFault.active = 1;
} else {
ECAM_controller.warningReset(tcasFault);

View file

@ -124,11 +124,11 @@ var warnings = std.Vector.new([
# Autopilot
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0),
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1),
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1),
var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_lock_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1),
var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_lim_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
# Cargo smoke

View file

@ -16,18 +16,9 @@ setprop("/controls/adirs/align-time", 600);
var ADIRS = {
init: func() {
setprop("/controls/adirs/numm", 0);
setprop("/instrumentation/adirs/adr[0]/active", 0);
setprop("/instrumentation/adirs/adr[1]/active", 0);
setprop("/instrumentation/adirs/adr[2]/active", 0);
setprop("/instrumentation/adirs/ir[0]/aligned", 0);
setprop("/instrumentation/adirs/ir[1]/aligned", 0);
setprop("/instrumentation/adirs/ir[2]/aligned", 0);
setprop("/controls/adirs/adr[0]/fault", 0);
setprop("/controls/adirs/adr[1]/fault", 0);
setprop("/controls/adirs/adr[2]/fault", 0);
setprop("/controls/adirs/adr[0]/off", 0);
setprop("/controls/adirs/adr[1]/off", 0);
setprop("/controls/adirs/adr[2]/off", 0);
setprop("/controls/adirs/ir[0]/align", 0);
setprop("/controls/adirs/ir[1]/align", 0);
setprop("/controls/adirs/ir[2]/align", 0);
@ -40,7 +31,6 @@ var ADIRS = {
setprop("/controls/adirs/ir[0]/fault", 0);
setprop("/controls/adirs/ir[1]/fault", 0);
setprop("/controls/adirs/ir[2]/fault", 0);
setprop("/controls/adirs/onbat", 0);
setprop("/controls/adirs/mcdu/mode1", ""); # INVAL ALIGN NAV ATT or off (blank)
setprop("/controls/adirs/mcdu/mode2", "");
setprop("/controls/adirs/mcdu/mode3", "");
@ -82,22 +72,6 @@ var ADIRS = {
me.stopAlign(2,1);
}
}
if (ac1 >= 110 or ac2 >= 110) {
pwr_src = "AC";
} else if (dcbat >= 25 and (getprop("/controls/adirs/ir[0]/knob") != 0 or getprop("/controls/adirs/ir[1]/knob") != 0 or getprop("/controls/adirs/ir[2]/knob") != 0)) {
pwr_src = "BATT";
} else {
pwr_src = "XX";
}
if (getprop("/controls/adirs/ir[0]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[1]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[2]/time") + 3 >= getprop("/sim/time/elapsed-sec")) {
setprop("/controls/adirs/onbat", 1);
} else if (pwr_src == "BATT") {
setprop("/controls/adirs/onbat", 1);
} else {
setprop("/controls/adirs/onbat", 0);
}
},
knob: func(k) {
knob = getprop("/controls/adirs/ir[" ~ k ~ "]/knob");
@ -141,7 +115,6 @@ var ADIRS = {
} else if (n == 2) {
alignThree.stop();
}
setprop("/instrumentation/adirs/adr[" ~ n ~ "]/active", 0);
setprop("/instrumentation/adirs/ir[" ~ n ~ "]/aligned", 0);
setprop("/controls/adirs/mcducbtn", 0);
},

View file

@ -78,7 +78,6 @@ var ADIRU = {
me._timeVar = pts.Sim.Time.elapsedSec.getValue();
if (me.energised and !me._voltageMain and me._voltageLimitedTime and me._noPowerTime == 0) {
me._noPowerTime = me._timeVar;
print("ADIRU lost power at time " ~ me._noPowerTime);
}
if (me.energised and me.mode) {
@ -186,7 +185,6 @@ var ADIRSnew = {
init: func() {
if (!me._init) {
for (i = 0; i < _NUMADIRU; i = i + 1) {
print("Creating new ADIRU " ~ i);
me.ADIRunits[i] = ADIRU.new(i);
me._init = 1;
}
@ -245,7 +243,6 @@ var ADIRSnew = {
}
},
selfTest: func() {
print("Doing self test");
ADIRSnew.Lights.onBat.setBoolValue(1);
selfTestLoop.start();
},
@ -254,7 +251,6 @@ var ADIRSnew = {
selfTestLoop = maketimer(0.2, func() {
if (pts.Sim.Time.elapsedSec.getValue() > _selfTestTime + 5) {
print("Self test done");
ADIRSnew.Lights.onBat.setBoolValue(0);
selfTestLoop.stop();
ADIRSnew._selfTest = 0;