G1000 MFD EIS: real two-bus volts, alternator/battery amps, engine hours
- electrical readout now shows M (main) and E (essential) bus volts from bus_volts[0]/[1], M (alternator generator_amps) and S (battery_amps) separately, and ENG hours from flight time — replacing the hardcoded duplicate volts / +0.0 amps / 0.0 HRS placeholders (manual S.54 C172 layout) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -136,8 +136,11 @@ function EisStrip({ V }) {
|
||||
const egtF = egtT > 900 ? egtT : egtT * 9 / 5 + 32;
|
||||
const fuelL = arr(V.fuelQty, 0) / KG_PER_GAL;
|
||||
const fuelR = arr(V.fuelQty, 1) / KG_PER_GAL;
|
||||
const volts = arr(V.volts, 0, 28);
|
||||
const amps = arr(V.amps);
|
||||
const voltsM = arr(V.volts, 0, 28); // main bus
|
||||
const voltsE = arr(V.volts, 1, voltsM); // essential bus (falls back to main)
|
||||
const ampsM = arr(V.genAmps, 0); // alternator (M)
|
||||
const ampsS = arr(V.amps, 0); // battery (S)
|
||||
const engHrs = num(V.engHrs) / 3600;
|
||||
return (
|
||||
<svg className="eis-svg" viewBox="0 0 190 540" preserveAspectRatio="xMidYMin meet" fontFamily="monospace">
|
||||
<rect x="0" y="0" width="190" height="540" fill="#0a0a0a" />
|
||||
@@ -153,20 +156,20 @@ function EisStrip({ V }) {
|
||||
zones={[{ from: 4.5, to: 5.5, c: '#0c0' }]} />
|
||||
<FuelBar y={330} left={fuelL} right={fuelR} />
|
||||
<text x="8" y="412" fill="#39d3c0" fontSize="12">ENG</text>
|
||||
<text x="182" y="412" fill="#fff" fontSize="14" textAnchor="end">0.0 HRS</text>
|
||||
<text x="182" y="412" fill="#fff" fontSize="14" textAnchor="end">{engHrs.toFixed(1)} HRS</text>
|
||||
<text x="95" y="438" fill="#39d3c0" fontSize="12" textAnchor="middle">– ELECTRICAL –</text>
|
||||
<text x="20" y="462" fill="#fff" fontSize="12">M</text>
|
||||
<text x="95" y="462" fill="#39d3c0" fontSize="12" textAnchor="middle">BUS</text>
|
||||
<text x="170" y="462" fill="#fff" fontSize="12" textAnchor="end">E</text>
|
||||
<text x="18" y="482" fill="#fff" fontSize="15">{volts.toFixed(1)}</text>
|
||||
<text x="18" y="482" fill="#fff" fontSize="15">{voltsM.toFixed(1)}</text>
|
||||
<text x="95" y="482" fill="#39d3c0" fontSize="11" textAnchor="middle">VOLTS</text>
|
||||
<text x="172" y="482" fill="#fff" fontSize="15" textAnchor="end">{volts.toFixed(1)}</text>
|
||||
<text x="172" y="482" fill="#fff" fontSize="15" textAnchor="end">{voltsE.toFixed(1)}</text>
|
||||
<text x="20" y="506" fill="#fff" fontSize="12">M</text>
|
||||
<text x="95" y="506" fill="#39d3c0" fontSize="12" textAnchor="middle">BATT</text>
|
||||
<text x="170" y="506" fill="#fff" fontSize="12" textAnchor="end">S</text>
|
||||
<text x="18" y="526" fill="#fff" fontSize="15">{amps >= 0 ? '+' : ''}{amps.toFixed(1)}</text>
|
||||
<text x="18" y="526" fill="#fff" fontSize="15">{ampsM >= 0 ? '+' : ''}{ampsM.toFixed(1)}</text>
|
||||
<text x="95" y="526" fill="#39d3c0" fontSize="11" textAnchor="middle">AMPS</text>
|
||||
<text x="172" y="526" fill="#fff" fontSize="15" textAnchor="end">+0.0</text>
|
||||
<text x="172" y="526" fill="#fff" fontSize="15" textAnchor="end">{ampsS >= 0 ? '+' : ''}{ampsS.toFixed(1)}</text>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user