... | ... |
@@ -165,7 +165,13 @@ var displayClass = { |
165 | 165 |
} |
166 | 166 |
} |
167 | 167 |
else { |
168 |
- append(groups.show, 'EIS'); |
|
168 |
+ append(groups.show, 'EIS', 'POWER-pointer'); |
|
169 |
+ append(groups.text, |
|
170 |
+ 'RPM-text', 'EGT-text', 'CHT-text', 'FUEL-USED-text', |
|
171 |
+ 'FUEL-FLOW-text', 'MAN-Hg-text', 'POWER-PERCENT-text', |
|
172 |
+ 'RPM-text', 'BUS-V-text', 'BATT-text', 'PSI-text', |
|
173 |
+ 'OIL-TEMP-text' |
|
174 |
+ ); |
|
169 | 175 |
} |
170 | 176 |
|
171 | 177 |
me.loadGroup(groups); |
... | ... |
@@ -185,6 +191,9 @@ var displayClass = { |
185 | 191 |
me.updateXPDR(); |
186 | 192 |
me.timerTrigger(); |
187 | 193 |
} |
194 |
+ else { |
|
195 |
+ me.updateEIS(); |
|
196 |
+ } |
|
188 | 197 |
me._updateRadio({auto:'nav'}); |
189 | 198 |
me._updateRadio({auto:'comm'}); |
190 | 199 |
me.updateSoftKeys(); |
... | ... |
@@ -1053,9 +1062,49 @@ var displayClass = { |
1053 | 1062 |
} |
1054 | 1063 |
settimer(func me.updateBRG(), 1); |
1055 | 1064 |
}, |
1056 |
-}; |
|
1057 | 1065 |
#}}} |
1058 | 1066 |
|
1067 |
+ updateEIS : func { |
|
1068 |
+# displays Engine Informations System {{{ |
|
1069 |
+ var power = getprop('/controls/engines/engine/throttle') * getprop('/engines/engine/running'); |
|
1070 |
+ me.screenElements['POWER-pointer'] |
|
1071 |
+ .setRotation(D2R * 140 * power); |
|
1072 |
+ me.screenElements['POWER-PERCENT-text'] |
|
1073 |
+ .setText(sprintf('%u', power)); |
|
1074 |
+ me.screenElements['RPM-text'] |
|
1075 |
+ .setText(sprintf(math.round(getprop('/engines/engine/rpm'), 50))); |
|
1076 |
+ me.screenElements['MAN-Hg-text'] |
|
1077 |
+ .setText(sprintf('%.1d', getprop('/engines/engine/mp-inhg'))); |
|
1078 |
+ me.screenElements['FUEL-FLOW-text'] |
|
1079 |
+ .setText(sprintf('%.1f', getprop('/engines/engine/fuel-flow-gph'))); |
|
1080 |
+ if (math.mod(me._eis_count, 10) == 0) { |
|
1081 |
+ var psi = getprop('/engines/engine/oil-pressure-psi'); |
|
1082 |
+ me.screenElements['PSI-text'] |
|
1083 |
+ .setText(psi == nil ? '--' : sprintf('%u', psi)); |
|
1084 |
+ me.screenElements['OIL-TEMP-text'] |
|
1085 |
+ .setText(sprintf('%i', getprop('/engines/engine/oil-temperature-degf'))); |
|
1086 |
+ var used_fuel = getprop('/instrumentation/zkv1000/eis/fuel-qty-at-start') |
|
1087 |
+ - getprop('/consumables/fuel/tank/level-gal_us') |
|
1088 |
+ - getprop('/consumables/fuel/tank[1]/level-gal_us'); |
|
1089 |
+ me.screenElements['FUEL-USED-text'] |
|
1090 |
+ .setText(sprintf('%.1d', used_fuel > 0 ? used_fuel : 0)); |
|
1091 |
+ me.screenElements['BUS-V-text'] |
|
1092 |
+ .setText(sprintf('%.1i', getprop('/systems/electrical/outputs/bus'))); |
|
1093 |
+ me.screenElements['BATT-text'] |
|
1094 |
+ .setText(sprintf('%+i', getprop('/systems/electrical/amps'))); |
|
1095 |
+ var cht = getprop('/engines/engine/cht-degf'); |
|
1096 |
+ me.screenElements['CHT-text'] |
|
1097 |
+ .setText(cht == nil ? '--' : sprintf('%i', cht)); |
|
1098 |
+ me.screenElements['EGT-text'] |
|
1099 |
+ .setText(sprintf('%i', getprop('/engines/engine/egt-degf'))); |
|
1100 |
+ } |
|
1101 |
+ settimer(func me.updateEIS(), 1); |
|
1102 |
+ me._eis_count += 1; |
|
1103 |
+ }, |
|
1104 |
+ _eis_count : 0, |
|
1105 |
+#}}} |
|
1106 |
+}; |
|
1107 |
+ |
|
1059 | 1108 |
var keyMap = { |
1060 | 1109 |
# softkeys map for PFD and MFD {{{ |
1061 | 1110 |
PFD : { |
... | ... |
@@ -82,6 +82,11 @@ var init_props = func { |
82 | 82 |
afcs.getNode('pit-active-mode-blink',1).setBoolValue(0); |
83 | 83 |
afcs.getNode('route',1); |
84 | 84 |
|
85 |
+ eis = zkv.getNode('eis',1); |
|
86 |
+ eis.getNode('fuel-qty-at-start', 1).setValue( |
|
87 |
+ getprop('/consumables/fuel/tank/level-gal_us') |
|
88 |
+ + getprop('/consumables/fuel/tank/level-gal_us')); |
|
89 |
+ |
|
85 | 90 |
props.globals.getNode('/instrumentation/transponder/id-code',1).setIntValue(1200); |
86 | 91 |
props.globals.getNode('/instrumentation/transponder/serviceable',1).setBoolValue(1); |
87 | 92 |
props.globals.getNode('/autopilot/settings/heading-bug-deg', 1).alias('/instrumentation/zkv1000/afcs/heading-bug-deg'); |