diff --git a/Aircraft/Instruments-3d/FG1000/MFDPages/Surround.svg b/Aircraft/Instruments-3d/FG1000/MFDPages/Surround.svg index 31c8f471c..96340b90a 100644 --- a/Aircraft/Instruments-3d/FG1000/MFDPages/Surround.svg +++ b/Aircraft/Instruments-3d/FG1000/MFDPages/Surround.svg @@ -1,6 +1,4 @@ - - + inkscape:bbox-nodes="true" + inkscape:document-rotation="0"> @@ -65,8 +64,7 @@ id="layer1" inkscape:groupmode="layer" inkscape:label="Surround" - style="display:inline" - sodipodi:insensitive="true"> + style="display:inline"> + VOLUME + 60% + VOLUME + 60% NAV2 NAV1 COM2 COM1 PAGE TITLE + y="48" + style="font-size:20px;line-height:1.25">PAGE TITLE 123.456 123.45 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20.9527px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold'">123.45 123.45 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20.9527px;line-height:125%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1">123.45 123.45 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20.9527px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold'">123.45 123.45 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20.9527px;line-height:125%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1">123.45 XXX @@ -353,12 +385,12 @@ height="22.993343" width="72.99334" id="rect4386" - style="fill:none;fill-opacity:0;stroke:#9bd8d9;stroke-width:1.00665724;stroke-opacity:1" + style="fill:none;fill-opacity:0;stroke:#9bd8d9;stroke-width:1.00666;stroke-opacity:1" inkscape:label="nav1-standby-tuning" /> @@ -372,7 +404,7 @@ transform="translate(0,-28)" id="g4429"> + style="fill:none;stroke:#ff0000;stroke-width:1.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -416,7 +448,7 @@ transform="translate(0,-28)" id="g4394"> + style="fill:none;stroke:#ff0000;stroke-width:1.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -456,9 +488,8 @@ inkscape:label="MFD-navbox" id="MFD-navbox"> GS + style="font-size:21.3333px;line-height:1.25;fill:#ffffff">GS DTK + style="font-size:21.3333px;line-height:1.25;fill:#ffffff">DTK TRK + style="font-size:21.3333px;line-height:1.25;fill:#ffffff">TRK ETE + style="font-size:21.3333px;line-height:1.25;fill:#ffffff">ETE 0 + y="22.002344" + style="font-size:21.3333px;line-height:1.25">0 000° + y="22.002344" + style="font-size:21.3333px;line-height:1.25">000° 000° + y="22.002344" + style="font-size:21.3333px;line-height:1.25">000° --:-- + y="19.752344" + style="font-size:21.3333px;line-height:1.25">--:-- + d="m 171.12101,767.99975 v -24.49043 h 84.85286" + style="display:inline;fill:#585959;fill-opacity:0.01332;stroke:#b6bcbe;stroke-width:1.00787px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> SoftKey2 + style="font-size:17.5574px;line-height:1.25">SoftKey2 SoftKey1 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:17.5574px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow, Condensed';text-align:center;writing-mode:lr-tb;text-anchor:middle">SoftKey1 SoftKey3 + style="font-size:17.5574px;line-height:1.25">SoftKey3 SoftKey4 + style="font-size:17.5574px;line-height:1.25">SoftKey4 SoftKey6 + style="font-size:17.5574px;line-height:1.25">SoftKey6 + d="M 427.19783,767.99975 V 743.50932 H 512.0507" + style="display:inline;fill:#585959;fill-opacity:0.01332;stroke:#b6bcbe;stroke-width:1.00787px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> SoftKey5 + style="font-size:17.5574px;line-height:1.25">SoftKey5 + d="m 597.91572,767.99975 v -24.49043 h 84.85286" + style="display:inline;fill:#585959;fill-opacity:0.01332;stroke:#b6bcbe;stroke-width:1.00787px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> SoftKey7 + style="font-size:17.5574px;line-height:1.25">SoftKey7 + d="m 683.27466,767.99975 v -24.49043 h 84.85287" + style="display:inline;fill:#585959;fill-opacity:0.01332;stroke:#b6bcbe;stroke-width:1.00787px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> SoftKey8 + style="font-size:17.5574px;line-height:1.25">SoftKey8 + d="m 853.99254,767.99975 v -24.49043 h 84.85287" + style="display:inline;fill:#585959;fill-opacity:0.01332;stroke:#b6bcbe;stroke-width:1.00787px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> SoftKey10 + style="font-size:17.5574px;line-height:1.25">SoftKey10 SoftKey9 + style="font-size:17.5574px;line-height:1.25">SoftKey9 SoftKey11 + style="font-size:17.5574px;line-height:1.25">SoftKey11 + d="M 0.40311981,767.99975 V 743.50932 H 85.255989" + style="display:inline;fill:#585959;fill-opacity:0.01332;stroke:#b6bcbe;stroke-width:1.00787px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> @@ -929,69 +945,70 @@ d="m 770,723 80.56245,-0.42678 4.65533,20.15534 29.68045,0.19822 5.60355,-20.45711 L 1024.875,723" style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> TRIP PLANNINGTRIP PLANNING + id="tspan5209" + style="font-size:15px;line-height:1.25">  UTILITY + y="669.46088" + style="font-size:15px;line-height:1.25">UTILITY GPS STATUS + sodipodi:role="line" + style="font-size:15px;line-height:1.25">GPS STATUS XM RADIO + y="701.72266" + style="font-size:15px;line-height:1.25">XM RADIO SYSTEM STATUS + sodipodi:role="line" + style="font-size:15px;line-height:1.25">SYSTEM STATUS ACTIVE FLIGHT PLANACTIVE FLIGHT PLAN + y="704.43018" + style="font-size:15px;line-height:1.25">  FLIGHT PLAN CATALOG + sodipodi:role="line" + style="font-size:15px;line-height:1.25">FLIGHT PLAN CATALOG STORED FLIGHT PLAN + y="717.94196" + style="font-size:15px;line-height:1.25">STORED FLIGHT PLAN AIRPORT INFORMATION + y="653.33002" + style="font-size:15px;line-height:1.25">AIRPORT INFORMATION INTERSECTION INFORMATION + sodipodi:role="line" + style="font-size:15px;line-height:1.25">INTERSECTION INFORMATION NDB INFORMATION + y="685.5918" + style="font-size:15px;line-height:1.25">NDB INFORMATION VOR INFORMATION + sodipodi:role="line" + style="font-size:15px;line-height:1.25">VOR INFORMATION USER WPT INFORMATION + y="717.85352" + style="font-size:15px;line-height:1.25">USER WPT INFORMATION NAVIGATION MAP + sodipodi:role="line" + style="font-size:15px;line-height:1.25">NAVIGATION MAP TRAFFIC MAP + y="669.46088" + style="font-size:15px;line-height:1.25">TRAFFIC MAP STORMSCOPE + sodipodi:role="line" + style="font-size:15px;line-height:1.25">STORMSCOPE WEATHER DATA LINK + y="701.72266" + style="font-size:15px;line-height:1.25">WEATHER DATA LINK TAWS-B + sodipodi:role="line" + style="font-size:15px;line-height:1.25">TAWS-B CHECKLISTSCHECKLISTS + id="tspan5245" + style="font-size:15px;line-height:1.25">  NEAREST NDB + y="653.33002" + style="font-size:15px;line-height:1.25">NEAREST NDB NEAREST VOR + sodipodi:role="line" + style="font-size:15px;line-height:1.25">NEAREST VOR NEAREST USER WAYPOINTS + y="685.5918" + style="font-size:15px;line-height:1.25">NEAREST USER WAYPOINTS NEAREST FREQUENCIES + id="tspan5289" + style="font-size:15px;line-height:1.25">NEAREST FREQUENCIES NEAREST AIRSPACES + y="717.85352" + style="font-size:15px;line-height:1.25">NEAREST AIRSPACES NEAREST AIRPORTSNEAREST AIRPORTS + id="tspan5343" + style="font-size:15px;line-height:1.25">  NEAREST INTERSECTIONS + y="637.28754" + style="font-size:15px;line-height:1.25">NEAREST INTERSECTIONS MAP + y="738.17676" + style="font-size:17.5px;line-height:2.76">MAP WPT + sodipodi:role="line" + style="font-size:17.5px;line-height:2.76">WPT AUX + y="738.17676" + style="font-size:17.5px;line-height:2.76">AUX FPL + sodipodi:role="line" + style="font-size:17.5px;line-height:2.76">FPL LST + y="738.17676" + style="font-size:17.5px;line-height:2.76">LST NRST + sodipodi:role="line" + style="font-size:17.5px;line-height:2.76">NRST diff --git a/Aircraft/Instruments-3d/FG1000/MFDPages/SurroundPFD.svg b/Aircraft/Instruments-3d/FG1000/MFDPages/SurroundPFD.svg index fdf50f4a9..0d8e27171 100644 --- a/Aircraft/Instruments-3d/FG1000/MFDPages/SurroundPFD.svg +++ b/Aircraft/Instruments-3d/FG1000/MFDPages/SurroundPFD.svg @@ -1,6 +1,4 @@ - - + version="1.1" + viewBox="0 0 1024 768" + height="768px" + width="1024px"> + inkscape:snap-nodes="true" + inkscape:bbox-paths="false" + inkscape:snap-to-guides="true" + inkscape:snap-others="true" + inkscape:snap-bbox="true" + inkscape:snap-grids="true" + inkscape:snap-global="false" + inkscape:window-maximized="1" + inkscape:window-y="36" + inkscape:window-x="0" + inkscape:window-height="985" + inkscape:window-width="1680" + showgrid="true" + inkscape:current-layer="SurroundGroup" + inkscape:document-units="px" + inkscape:cy="56.326277" + inkscape:cx="35.834277" + inkscape:zoom="5.7392717" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + borderopacity="0" + bordercolor="#ffffff" + pagecolor="#ffffff" + id="base"> + id="grid4269" + type="xygrid" /> @@ -62,691 +61,252 @@ + inkscape:groupmode="layer" + id="layer1"> + id="NAV" /> + inkscape:label="#g4590" + id="SurroundGroup"> + height="55.494141" + width="1024" + id="rect4259" + style="fill:#000000;fill-opacity:1;stroke:none" /> + 60% + VOLUME + d="m 0,55.49414 1025.0039,0" + style="fill:none;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + d="m 263.50196,27.49805 496.50195,0" + style="fill:none;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> NAV2 + x="3.711482" + y="47.036842" + style="font-size:19.4454px;line-height:1.25">NAV2 NAV1 + x="3.7114818" + y="24.000223" + style="font-size:19.4454px;line-height:1.25">NAV1 + d="M 263.00638,55.49414 263.00638,0" + style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> COM2 + x="979.46912" + y="46.475105" + style="font-size:19.5349px;line-height:1.25">COM2 COM1 + x="979.48126" + y="22.938923" + style="font-size:19.5349px;line-height:1.25">COM1 + d="m 760.00391,55.494139 0,-55.49413968969723 0,0" + style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> 123.456 - 123.456 - 123.456 + 123.456 + 123.456 + x="1066.9291" + y="42.040352" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20.9527px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold'">123.456 + 123.456 123.456 - 123.45 - 123.45 - 123.45 - 123.45 + 123.45 + 123.45 + x="214.76868" + id="tspan4111-9" + sodipodi:role="line">123.45 123.45 + XXX - XXX + XXX + x="219.32292" + y="47.054035" + style="font-size:18.6667px;line-height:1.25;fill:#ffffff">XXX + inkscape:label="#g4374"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SoftKey2 - - - SoftKey1 - - - SoftKey3 - - - SoftKey4 - - - SoftKey6 - - - SoftKey5 - - - SoftKey7 - - - SoftKey8 - - - SoftKey10 - - - SoftKey9 - - - SoftKey11 - - - SoftKey0 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SoftKey2 + + SoftKey1 + + + SoftKey3 + + + SoftKey4 + + + SoftKey6 + + + SoftKey5 + + + SoftKey7 + + + SoftKey8 + + + SoftKey10 + + + SoftKey9 + + + SoftKey11 + + + SoftKey0 + + + + + + id="path4617" + inkscape:connector-curvature="0" /> DIS - BRG - 0 + x="544.9375" + id="tspan4587" + sodipodi:role="line">DIS FROM - TO - + inkscape:label="DATA-FIELD2-ID-text" + id="SurroundHeader2Label" + y="22.01276" + x="665.76044" + style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve">BRG 0 + x="583.59375" + id="tspan4625" + sodipodi:role="line">0 FROM + TO + + 0 + D + x="397.90625" + y="21.782091">D ARM - ACT - AP - ACT - ARM + xml:space="preserve">ARM ACT + AP + ACT + ARM + 5000ft + x="559.2533" + id="tspan7913" + sodipodi:role="line">5000ft + id="path4617-5" + inkscape:connector-curvature="0" /> + id="path4617-5-4" + inkscape:connector-curvature="0" /> + VOLUME + 60% + inkscape:label="PageGroup" + id="layer2" + inkscape:groupmode="layer"> + style="display:inline"> + x="768.45612" + height="104.13807" + width="257.0878" + id="rect5293" + style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.912;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - AIRPORT INFORMATION - INTERSECTION INFORMATION - NDB INFORMATION - VOR INFORMATION - USER WPT INFORMATION - - - - NAVIGATION MAP + id="tspan5117" + sodipodi:role="line">AIRPORT INFORMATION TRAFFIC MAP + y="669.46088">INTERSECTION INFORMATION STORMSCOPE + id="tspan5125" + sodipodi:role="line">NDB INFORMATION WEATHER DATA LINK + y="701.72266">VOR INFORMATION TAWS-B + id="tspan5133" + sodipodi:role="line">USER WPT INFORMATION + inkscape:label="#g5531" + id="MapPageGroup" + style="display:inline"> + y="638.81311" + x="768.0484" + height="104.31533" + width="256.38116" + id="rect5335-1" + style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.91170573;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="m 770,723 5,0 5,20 30,0 5,-20 205,0" + id="path5064" + inkscape:connector-curvature="0" /> NEAREST NDB + y="653.33002">NAVIGATION MAP NEAREST VOR + id="tspan5082" + sodipodi:role="line">TRAFFIC MAP NEAREST USER WAYPOINTS + y="685.5918">STORMSCOPE NEAREST FREQUENCIES + id="tspan5090" + sodipodi:role="line">WEATHER DATA LINK NEAREST AIRSPACES - NEAREST AIRPORTS  - NEAREST INTERSECTIONS + y="717.85352">TAWS-B - - - ACTIVE FLIGHT PLAN  - FLIGHT PLAN CATALOG - STORED FLIGHT PLAN - - + inkscape:label="#g5371" + id="NrstPageGroup" + style="display:inline"> TRIP PLANNING  + id="tspan5271">NEAREST NDB UTILITY + y="669.46088">NEAREST VOR GPS STATUS + id="tspan5279" + sodipodi:role="line">NEAREST USER WAYPOINTS XM RADIO + y="701.72266">NEAREST FREQUENCIES NEAREST AIRSPACES + SYSTEM STATUS + id="tspan5341" + x="774.98926" + y="621.15668">NEAREST AIRPORTS  + NEAREST INTERSECTIONS + inkscape:label="#g5441" + id="FPLPageGroup" + style="display:inline"> + y="671.91327" + x="768.37598" + height="70.710793" + width="257.24811" + id="rect5325" + style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.75199997;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> ACTIVE FLIGHT PLANCHECKLIST + id="tspan5219">  + FLIGHT PLAN CATALOG + STORED FLIGHT PLAN + + + + + TRIP PLANNING  + UTILITY + GPS STATUS + XM RADIO + SYSTEM STATUS + + + + + CHECKLIST MAP + id="tspan5038" + sodipodi:role="line">MAP WPT + x="818.01282" + y="738.17676">WPT AUX + id="tspan5050" + sodipodi:role="line">AUX FPL + x="893.44507" + y="738.17676">FPL LST - LST + NRST + id="tspan5062" + x="965.96912" + y="738.17676">NRST diff --git a/Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericNavComPublisher.nas b/Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericNavComPublisher.nas index e5b1f8f6f..0b2731ecf 100644 --- a/Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericNavComPublisher.nas +++ b/Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericNavComPublisher.nas @@ -39,10 +39,12 @@ var GenericNavComPublisher = obj._triggeredPublisher = TriggeredPropertyPublisher.new(notifications.PFDEventNotification.NavComData); obj._periodicPublisher = PeriodicPropertyPublisher.new(notifications.PFDEventNotification.NavComData, period); - # Hack to handle cases where there is no selected Com or NAV frequency + # Hack to handle cases where there is no selected Com or NAV frequency or volume if (getprop("/instrumentation/com-selected") == nil) setprop("/instrumentation/com-selected", 1); if (getprop("/instrumentation/nav-selected") == nil) setprop("/instrumentation/nav-selected", 1); - + if (getprop("/instrumentation/nav/volume") == nil) setprop("/instrumentation/nav/volume", 0.5); + if (getprop("/instrumentation/comm/volume") == nil) setprop("/instrumentation/comm/volume", 0.5); + obj._triggeredPublisher.addPropMap("Comm1SelectedFreq", "/instrumentation/comm/frequencies/selected-mhz"); obj._triggeredPublisher.addPropMap("Comm1StandbyFreq", "/instrumentation/comm/frequencies/standby-mhz"); obj._triggeredPublisher.addPropMap("Comm1AirportID", "/instrumentation/comm/airport-id"); @@ -56,14 +58,13 @@ var GenericNavComPublisher = obj._triggeredPublisher.addPropMap("Comm2AirportID", "/instrumentation/comm[1]/airport-id"); obj._triggeredPublisher.addPropMap("Comm2StationName", "/instrumentation/comm[1]/station-name"); obj._triggeredPublisher.addPropMap("Comm2StationType", "/instrumentation/comm[1]/station-type"); - obj._triggeredPublisher.addPropMap("Comm2Volume", "/instrumentation/comm[1]/volume"); obj._triggeredPublisher.addPropMap("Comm2Serviceable", "/instrumentation/comm[1]/serviceable"); obj._triggeredPublisher.addPropMap("CommSelected", "/instrumentation/com-selected"); obj._triggeredPublisher.addPropMap("Nav1SelectedFreq", "/instrumentation/nav/frequencies/selected-mhz"); obj._triggeredPublisher.addPropMap("Nav1StandbyFreq", "/instrumentation/nav/frequencies/standby-mhz"); - obj._periodicPublisher.addPropMap("Nav1ID", "/instrumentation/nav/nav-id"); + obj._triggeredPublisher.addPropMap("Nav1ID", "/instrumentation/nav/nav-id"); obj._periodicPublisher.addPropMap("Nav1InRange", "/instrumentation/nav/in-range"); obj._periodicPublisher.addPropMap("Nav1HeadingDeg", "/instrumentation/nav/heading-deg"); obj._periodicPublisher.addPropMap("Nav1RadialDeg", "/instrumentation/nav/radials/selected-deg"); @@ -76,7 +77,7 @@ var GenericNavComPublisher = obj._periodicPublisher.addPropMap("Nav1GSInRange", "/instrumentation/nav/gs-in-range"); obj._periodicPublisher.addPropMap("Nav1From", "/instrumentation/nav/from-flag"); - obj._triggeredPublisher.addPropMap("Nav1Volume", "/instrumentation/nav/nav-volume"); + obj._triggeredPublisher.addPropMap("Nav1Volume", "/instrumentation/nav/volume"); obj._triggeredPublisher.addPropMap("Nav1AudioID", "/instrumentation/nav/audio-btn"); obj._triggeredPublisher.addPropMap("Nav1Serviceable", "/instrumentation/nav/operable"); @@ -94,8 +95,6 @@ var GenericNavComPublisher = obj._periodicPublisher.addPropMap("Nav2GSDeflection", "/instrumentation/nav[1]/gs-needle-deflection-norm"); obj._periodicPublisher.addPropMap("Nav2GSInRange", "/instrumentation/nav[1]/gs-in-range"); obj._periodicPublisher.addPropMap("Nav2From", "/instrumentation/nav/from-flag"); - - obj._triggeredPublisher.addPropMap("Nav2Volume", "/instrumentation/nav[1]/nav-volume"); obj._triggeredPublisher.addPropMap("Nav2AudioID", "/instrumentation/nav[1]/audio-btn"); obj._triggeredPublisher.addPropMap("Nav2Serviceable", "/instrumentation/nav[1]/operable"); diff --git a/Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericNavComUpdater.nas b/Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericNavComUpdater.nas index f2e7a24fa..f1a7da375 100644 --- a/Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericNavComUpdater.nas +++ b/Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericNavComUpdater.nas @@ -33,40 +33,26 @@ var GenericNavComUpdater = # Hack to handle cases where there is no selected COMM or NAV frequency if (getprop("/instrumentation/com-selected") == nil) setprop("/instrumentation/com-selected", 1); if (getprop("/instrumentation/nav-selected") == nil) setprop("/instrumentation/nav-selected", 1); - + obj.addPropMap("Comm1SelectedFreq", "/instrumentation/comm/frequencies/selected-mhz"); obj.addPropMap("Comm1StandbyFreq", "/instrumentation/comm/frequencies/standby-mhz"); - obj.addPropMap("Comm1AirportID", "/instrumentation/comm/airport-id"); - obj.addPropMap("Comm1StationName", "/instrumentation/comm/station-name"); - obj.addPropMap("Comm1StationType", "/instrumentation/comm/station-type"); obj.addPropMap("Comm1Volume", "/instrumentation/comm/volume"); - obj.addPropMap("Comm1Serviceable", "/instrumentation/comm/serviceable"); obj.addPropMap("Comm2SelectedFreq", "/instrumentation/comm[1]/frequencies/selected-mhz"); obj.addPropMap("Comm2StandbyFreq", "/instrumentation/comm[1]/frequencies/standby-mhz"); - obj.addPropMap("Comm2AirportID", "/instrumentation/comm[1]/airport-id"); - obj.addPropMap("Comm2StationName", "/instrumentation/comm[1]/station-name"); - obj.addPropMap("Comm2StationType", "/instrumentation/comm[1]/station-type"); obj.addPropMap("Comm2Volume", "/instrumentation/comm[1]/volume"); - obj.addPropMap("Comm2Serviceable", "/instrumentation/comm[1]/serviceable"); obj.addPropMap("CommSelected", "/instrumentation/com-selected"); obj.addPropMap("Nav1SelectedFreq", "/instrumentation/nav/frequencies/selected-mhz"); obj.addPropMap("Nav1StandbyFreq", "/instrumentation/nav/frequencies/standby-mhz"); - obj.addPropMap("Nav1ID", "/instrumentation/nav/nav-id"); obj.addPropMap("Nav1RadialDeg", "/instrumentation/nav/radials/selected-deg"); - obj.addPropMap("Nav1Volume", "/instrumentation/nav/nav-volume"); - obj.addPropMap("Nav1AudioID", "/instrumentation/nav/audio-btn"); - obj.addPropMap("Nav1Serviceable", "/instrumentation/nav/operable"); + obj.addPropMap("Nav1Volume", "/instrumentation/nav/volume"); obj.addPropMap("Nav2SelectedFreq", "/instrumentation/nav[1]/frequencies/selected-mhz"); obj.addPropMap("Nav2StandbyFreq", "/instrumentation/nav[1]/frequencies/standby-mhz"); - obj.addPropMap("Nav2ID", "/instrumentation/nav[1]/nav-id"); obj.addPropMap("Nav2RadialDeg", "/instrumentation/nav[1]/radials/selected-deg"); - obj.addPropMap("Nav2Volume", "/instrumentation/nav[1]/nav-volume"); - obj.addPropMap("Nav2AudioID", "/instrumentation/nav[1]/audio-btn"); - obj.addPropMap("Nav2Serviceable", "/instrumentation/nav[1]/operable"); + obj.addPropMap("Nav2Volume", "/instrumentation/nav[1]/volume"); obj.addPropMap("NavSelected", "/instrumentation/nav-selected"); diff --git a/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/Surround/Surround.nas b/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/Surround/Surround.nas index 4e46c357a..e91f885eb 100644 --- a/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/Surround/Surround.nas +++ b/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/Surround/Surround.nas @@ -109,15 +109,22 @@ var Surround = var textElements = [ "Comm1StandbyFreq", "Comm1SelectedFreq", "Comm2StandbyFreq", "Comm2SelectedFreq", + "CommVolume", "Nav1StandbyFreq", "Nav1SelectedFreq", "Nav2StandbyFreq", "Nav2SelectedFreq", "Nav1ID", "Nav2ID", + "NavVolume", ]; - + var fdTextElements = ["HeaderAPLateralArmed", "HeaderAPLateralActive", "HeaderAPVerticalArmed", "HeaderAPVerticalActive", "HeaderAPVerticalReference"]; + # Labels that show and hide for volume notification + var volumeLabelElements = ["Comm2Label","CommVolumeLabel","Nav2Label","NavVolumeLabel"]; + obj.addTextElements(textElements); - + + obj.addElements(volumeLabelElements); + if (pfd) { obj.addTextElements(["HeaderFrom", "HeaderTo", "LegDistance", "LegBRG"]); obj.addTextElements(fdTextElements, FD_STATUS_STYLE); @@ -151,6 +158,8 @@ var Surround = obj._menuVisible = 0; obj._selectedPageGroup = 0; obj._selectedPage = 0; + obj._selected_comm = 1; + obj._selected_nav = 1; obj._elements = {}; @@ -174,15 +183,24 @@ var Surround = obj._hideMenuTimer = maketimer(3, obj, obj.hideMenu); obj._hideMenuTimer.singleShot = 1; + obj._hideCommVolumeTimer = maketimer(2, obj, obj.hideCommVolume); + obj._hideCommVolumeTimer.singleShot = 1; + + obj._hideNavVolumeTimer = maketimer(2, obj, obj.hideNavVolume); + obj._hideNavVolumeTimer.singleShot = 1; + obj._loadPageTimer = maketimer(0.5, obj, obj.loadPage); obj._loadPageTimer.singleShot = 1; obj.hideMenu(); - + obj.setController(fg1000.SurroundController.new(obj, svg, pfd)); + obj.hideCommVolume(); + obj.hideNavVolume(); + return obj; }, - + handleNavComData : func(data) { foreach(var name; keys(data)) { var val = data[name]; @@ -209,9 +227,11 @@ var Surround = if (name == "CommSelected") { if (val == 1) { + me._selected_comm=1; me._comm1selected.setVisible(1); me._comm2selected.setVisible(0); } else { + me._selected_comm=2; me._comm1selected.setVisible(0); me._comm2selected.setVisible(1); } @@ -239,24 +259,95 @@ var Surround = if (name == "NavSelected") { if (val == 1) { + me._selected_nav=1; me._nav1selected.setVisible(1); me._nav2selected.setVisible(0); } else { + me._selected_nav=2; me._nav1selected.setVisible(0); me._nav2selected.setVisible(1); } } - if (name == "Nav1ID") me.setTextElement("Nav1ID", val); - if (name == "Nav2ID") me.setTextElement("Nav2ID", val); - - # TODO - COM Volume - display the current volume for 2 seconds in place of the + if (name == "Nav1ID") { + if (val==0) { + me.setTextElement("Nav1ID", ""); + } else { + me.setTextElement("Nav1ID", val); + } + } + if (name == "Nav2ID") { + if (val==0) { + me.setTextElement("Nav2ID", ""); + } else { + me.setTextElement("Nav2ID", val); + } + } + + # NAV/COM Volume - display the current volume for 2 seconds in place of the # standby frequency. - - + + if (name == "Nav1Volume" or name == "Nav2Volume") { + me.showNavVolume(val); + } + if (name == "Comm1Volume" or name == "Comm2Volume") { + me.showCommVolume(val); + } } }, - + showCommVolume: func(val) { + var commvol = sprintf("%d%%",int(val*100)); + if (me.getTextValue("CommVolume") == commvol) return; + + # Hide com2 standby and label + me.getTextElement("Comm2StandbyFreq").setVisible(0); + me.getElement("Comm2Label").setVisible(0); + if (me._selected_comm == 2) me._comm2selected.setVisible(0); + + # Set and show COM volume + me.setTextElement("CommVolume",commvol); + me.getTextElement("CommVolume").setVisible(1); + me.getElement("CommVolumeLabel").setVisible(1); + + # Start hide timer (2 secs according to the manual) + me._hideCommVolumeTimer.stop(); + me._hideCommVolumeTimer.restart(2); + }, + + hideCommVolume: func() { + # Hide comm vol and restore standby and label + me.getTextElement("CommVolume").setVisible(0); + me.getElement("CommVolumeLabel").setVisible(0); + me.getTextElement("Comm2StandbyFreq").setVisible(1); + me.getElement("Comm2Label").setVisible(1); + if (me._selected_comm == 2) me._comm2selected.setVisible(1); + }, + showNavVolume: func(val) { + var navvol = sprintf("%d%%",int(val*100)); + if (me.getTextValue("NavVolume") == navvol) return; + + # Hide NAV2 standdby + me.getTextElement("Nav2StandbyFreq").setVisible(0); + me.getElement("Nav2Label").setVisible(0); + if (me._selected_nav == 2) me._nav2selected.setVisible(0); + + # Set and show NAV volume + me.setTextElement("NavVolume",navvol); + me.getTextElement("NavVolume").setVisible(1); + me.getElement("NavVolumeLabel").setVisible(1); + + # Start hide timer (2 secs according to the manual) + me._hideNavVolumeTimer.stop(); + me._hideNavVolumeTimer.restart(2); + }, + hideNavVolume: func() { + # Hide Nav volume and show NAV2 standby again + me.getTextElement("NavVolume").setVisible(0); + me.getElement("NavVolumeLabel").setVisible(0); + me.getTextElement("Nav2StandbyFreq").setVisible(1); + me.getElement("Nav2Label").setVisible(1); + if (me._selected_nav == 2) me._nav2selected.setVisible(1); + }, # Update Header data with FMS or ADC data. updateHeaderData : func(data) { @@ -496,5 +587,4 @@ var Surround = return me._menuVisible; }, - }; diff --git a/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/Surround/SurroundController.nas b/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/Surround/SurroundController.nas index 63f2595c8..91ab0c720 100644 --- a/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/Surround/SurroundController.nas +++ b/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/Surround/SurroundController.nas @@ -30,6 +30,7 @@ var SurroundController = _com1standby : 0.0, _com2active : 0.0, _com2standby : 0.0, + _commvolume : 0.0, _nav1active : 0.0, _nav1standby : 0.0, _nav1radial : 0.0, @@ -38,6 +39,7 @@ var SurroundController = _nav2standby : 0.0, _nav2radial : 0.0, _nav2_heading_deg : 0.0, + _navvolume : 0.0, _pressure_settings_inhg : 0.0, _selected_alt_ft : 0.0, _heading_bug_deg : 0.0, @@ -82,19 +84,24 @@ var SurroundController = if (data["Comm1SelectedFreq"] != nil) me._com1active = data["Comm1SelectedFreq"]; if (data["Comm1StandbyFreq"] != nil) me._com1standby = data["Comm1StandbyFreq"]; + if (data["Comm1Volume"] != nil and me._commvolume != data["Comm1Volume"]) me._commvolume = data["Comm1Volume"]; if (data["Comm2SelectedFreq"] != nil) me._com2active = data["Comm2SelectedFreq"]; if (data["Comm2StandbyFreq"] != nil) me._com2standby = data["Comm2StandbyFreq"]; - + if (data["Comm2Volume"] != nil and me._commvolume != data["Comm2Volume"]) me._commvolume = data["Comm2Volume"]; + if (data["Nav1SelectedFreq"] != nil) me._nav1active = data["Nav1SelectedFreq"]; if (data["Nav1StandbyFreq"] != nil) me._nav1standby = data["Nav1StandbyFreq"]; if (data["Nav1RadialDeg"] != nil) me._nav1radial = data["Nav1RadialDeg"]; if (data["Nav1HeadingDeg"] != nil) me._nav1_heading_deg = data["Nav1HeadingDeg"]; - + if (data["Nav1Volume"] != nil and me._navvolume != data["Nav1Volume"]) me._navvolume = data["Nav1Volume"]; + if (data["Nav2SelectedFreq"] != nil) me._nav2active = data["Nav2SelectedFreq"]; if (data["Nav2StandbyFreq"] != nil) me._nav2standby = data["Nav2StandbyFreq"]; if (data["Nav2RadialDeg"] != nil) me._nav2radial = data["Nav2RadialDeg"]; if (data["Nav2HeadingDeg"] != nil) me._nav2_heading_deg = data["Nav2HeadingDeg"]; - + if (data["Nav2Volume"] != nil and me._navvolume != data["Nav2Volume"]) me._navvolume = data["Nav2Volume"]; + + # pass through to the page me._page.handleNavComData(data); return emesary.Transmitter.ReceiptStatus_OK; @@ -120,14 +127,11 @@ var SurroundController = # Handle the various COM and NAV controls at the top left and top right of the Fascia # handleNavVol : func (value) { - var data={}; - - if (me._navselected == 1) { - data["Nav1Volume"] = value; - } else { - data["Nav2Volume"] = value; - } - + var data={}; + var incr_or_decr = (value > 0) ? 0.01 : -0.01; + var vol = math.max(0,math.min(1,me._navvolume + incr_or_decr)); + data["Nav1Volume"] = vol; + data["Nav2Volume"] = vol; me.sendNavComDataNotification(data); return emesary.Transmitter.ReceiptStatus_Finished; }, @@ -367,13 +371,10 @@ var SurroundController = handleComVol : func (value) { var data={}; - - if (me._comselected == 1) { - data["Comm1Volume"] = value; - } else { - data["Comm2Volume"] = value; - } - + var incr_or_decr = (value > 0) ? 0.01 : -0.01; + var vol = math.max(0,math.min(1,me._commvolume + incr_or_decr)); + data["Comm1Volume"] = vol; + data["Comm2Volume"] = vol; me.sendNavComDataNotification(data); return emesary.Transmitter.ReceiptStatus_Finished; },