1
0
Fork 0

Improve performance by delaying ECAM to 15 herz in JSBSIM, correct clock so that annunciator test works corectly

This commit is contained in:
legoboyvdlp R 2020-07-17 22:15:49 +01:00
parent c50d42c138
commit d3b66bbb91
2 changed files with 27 additions and 22 deletions

View file

@ -180,10 +180,7 @@ var start_loop = maketimer(0.1, func {
}; };
}); });
var updateRudderTrim = func() {
var update_items = [
props.UpdateManager.FromPropertyHashList(["/fdm/jsbsim/hydraulics/rudder/trim-deg", "/controls/switches/annun-test"], 0.05, func(notification)
{
var rudder_val = getprop("fdm/jsbsim/hydraulics/rudder/trim-deg"); var rudder_val = getprop("fdm/jsbsim/hydraulics/rudder/trim-deg");
if (getprop("/controls/switches/annun-test") == 1) { if (getprop("/controls/switches/annun-test") == 1) {
setprop("/controls/flight/rudder-trim-display", sprintf("%3.1f", "88.8")); setprop("/controls/flight/rudder-trim-display", sprintf("%3.1f", "88.8"));
@ -205,5 +202,13 @@ var update_items = [
} }
} }
} }
var update_items = [
props.UpdateManager.FromProperty("/fdm/jsbsim/hydraulics/rudder/trim-deg", 0.05, func(notification)
{
updateRudderTrim();
}
), ),
]; ];
setlistener("/controls/switches/annun-test", updateRudderTrim, 0, 0);

View file

@ -336,7 +336,7 @@
</actuator> </actuator>
</channel> </channel>
<channel name="ECAM"> <channel name="ECAM" execrate="8">
<switch name="/ECAM/warnings/logic/apu-bleed-fault"> <switch name="/ECAM/warnings/logic/apu-bleed-fault">
<default value="0"/> <default value="0"/>