Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
1.10 update backports
Browse files Browse the repository at this point in the history
  • Loading branch information
kaosfere committed Oct 29, 2020
1 parent 748c80d commit 5ec6a15
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@
0%, 100% {
visibility: hidden; } }

html {
height: 100%;
width: 100%;
overflow: hidden; }
html body {
-webkit-user-select: none;
font-family: Roboto-Regular;
font-size: calc(var(--viewportHeightRatio) * (36px / 21.6) * var(--currentPageHeight) / 100);
color: white;
height: 100%;
width: 100%;
margin: 0;
padding: 0; }

#highlight {
position: absolute;
height: 100%;
Expand Down Expand Up @@ -263,7 +277,7 @@ as1000-mfd-element {
width: 10vw;
height: calc( 2.5 * 1vh * var(--bodyHeightScale));
background-color: #1a1d21;
color: #8ed0d5;
color: #8ed0d5;
border: solid 1px white; }
as1000-mfd-element #Mainframe #Electricity #CenterDisplay #MainDisplayArea #RightInfos #Map #WindData {
position: absolute;
Expand All @@ -281,7 +295,7 @@ as1000-mfd-element {
display: flex;
justify-content: flex-end;
align-items: flex-end;
text-align: center;
text-align: center;
border: solid 1px white; }
as1000-mfd-element #Mainframe #Electricity #CenterDisplay #MainDisplayArea #RightInfos #Map #MapRange .range {
font-size: calc( 3 * 1vh * var(--bodyHeightScale));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class AS1000_MFD extends BaseAS1000 {
new AS1000_MFD_MainMap(this.engineDisplay),
new AS1000_MFD_Radar()
]);
}
}
}
disconnectedCallback() {
}
Expand Down Expand Up @@ -107,8 +107,8 @@ class AS1000_MFD extends BaseAS1000 {
break;
}
}
Update() {
super.Update();
onUpdate(_deltaTime) {
super.onUpdate(_deltaTime);
SimVar.SetSimVarValue("L:Glasscockpit_MFD_Started", "number", this.isStarted ? 1 : 0);
}

Expand Down Expand Up @@ -422,7 +422,7 @@ class AS1000_MFD_ApproachWaypointLine extends MFD_ApproachWaypointLine {
new SoftKeyElement("ACT LEG", this.element.activateLeg.bind(this.element, this.index, true)),
new SoftKeyElement(""),
new SoftKeyElement(""),
];
];
this.mapMenu.init(this, this.element.gps);
}
}
Expand Down Expand Up @@ -581,7 +581,7 @@ class AS1000_MFD_AirportInfos1 extends NavSystemElement {
}
if ("designation" in infos.runways[this.selectedRunway]) {
this.runwayNameElement.textContent = infos.runways[this.selectedRunway].designation;
}
}
this.runwaySizeElement.textContent = Math.round(infos.runways[this.selectedRunway].length * 3.28084) + "FT x " + Math.round(infos.runways[this.selectedRunway].width * 3.28084) + "FT";
switch (infos.runways[this.selectedRunway].surface) {
case 0:
Expand Down Expand Up @@ -752,7 +752,7 @@ class AS1000_MFD_AirportInfos2 extends NavSystemElement {
this.rootElement.setAttribute("state", "Infos2");
this.mapContainer.appendChild(this.mapElement);
this.mapElement.setAttribute("bing-mode", "vfr");
this.gps.mapElement.instrument.setTrackUpDisabled(true);
this.gps.mapElement.instrument.setTrackUpDisabled(true);
}
onUpdate(_deltaTime) {
this.icaoSearchField.Update();
Expand Down Expand Up @@ -1137,7 +1137,7 @@ class AS1000_MapMenu {
break;
}
}
return "None";
return "None";
}
}
class AS1000_EngineMenu {
Expand Down Expand Up @@ -1165,7 +1165,7 @@ class AS1000_EngineMenu {

for(let i = 0; i < extraElements.length; i++) {
elements[i + numEngineDisplayPages + 1] = extraElements[i];
}
}

elements[10] = new SoftKeyElement("BACK", this.close.bind(this));

Expand All @@ -1178,7 +1178,7 @@ class AS1000_EngineMenu {
this.switchMenu(this.getSoftKeyMenu(page.buttons.map(button => new SoftKeyElement(button.text, this.performSubAction.bind(this,button)))));
}
performSubAction(button) {

}
open() {
this.originalMenu = Object.assign({}, this.owner.softKeys);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,23 @@ class AS1000_PFD extends BaseAS1000 {
}

onUpdate(_deltaTime) {
if (this.handleReversionaryMode) {
this.reversionaryMode = false;
if (document.body.hasAttribute("reversionary")) {
var attr = document.body.getAttribute("reversionary");
if (attr == "true") {
this.reversionaryMode = true;
}
}
}
if (this._pfdConfigDone) {
let avionicsKnobValueNow = SimVar.GetSimVarValue("A:LIGHT POTENTIOMETER:" + this.avionicsKnobIndex, "number") * 100;
if (avionicsKnobValueNow != this.avionicsKnobValue) {
this.setBrightness("PFD", avionicsKnobValueNow);
this.setBrightness("MFD", avionicsKnobValueNow);
this.avionicsKnobValue = avionicsKnobValueNow;
}
}
}
}

onEvent(_event) {
Expand Down Expand Up @@ -130,19 +139,6 @@ class AS1000_PFD extends BaseAS1000 {
disconnectedCallback() {
super.disconnectedCallback();
}

Update() {
super.Update();
if (this.handleReversionaryMode) {
this.reversionaryMode = false;
if (document.body.hasAttribute("reversionary")) {
var attr = document.body.getAttribute("reversionary");
if (attr == "true") {
this.reversionaryMode = true;
}
}
}
}
}
class AS1000_PFD_MainPage extends NavSystemPage {
constructor() {
Expand Down Expand Up @@ -285,7 +281,7 @@ class AS1000_PFD_MainPage extends NavSystemPage {
new SoftKeyElement(""),
new SoftKeyElement("BACK", this.switchToMenu.bind(this, this.pfdMenu)),
this.alertSoftkey,
];
];
this.windMenu.elements = [
new SoftKeyElement(""),
new SoftKeyElement(""),
Expand Down Expand Up @@ -328,7 +324,7 @@ class AS1000_PFD_MainPage extends NavSystemPage {
}
softkeyBaroStatus(_state) {
return this.gps.getElementOfType(PFD_Altimeter).getCurrentBaroMode() == _state ? "White" : "None";
}
}
softkeyHsiStatus(_arc) {
return (SimVar.GetSimVarValue("L:Glasscockpit_HSI_Arc", "number") == 0) == _arc ? "None" : "White";
}
Expand All @@ -352,9 +348,9 @@ class AS1000_PFD_MainPage extends NavSystemPage {
toggleSyntheticVision() {
this.setSyntheticVision(!this.syntheticVision);
}
setSyntheticVision(enabled) {
setSyntheticVision(enabled) {
this.syntheticVision = enabled;
this.attitude.setSyntheticVisionEnabled(this.syntheticVision);
this.attitude.setSyntheticVisionEnabled(this.syntheticVision);
this.gps.getChildById("SyntheticVision").setAttribute("show-bing-map", this.syntheticVision ? "true" : "false");
this.gps.getChildById("SyntheticVision").style.display = this.syntheticVision ? "block" : "none";
}
Expand Down Expand Up @@ -636,7 +632,7 @@ class AS1000_PFD_ConfigMenu extends NavSystemElement {
}
onUpdate(_deltaTime) {
this.pfdBrightLevel.textContent = this.gps.getBrightness("PFD") + "%";
this.mfdBrightLevel.textContent = this.gps.getBrightness("MFD") + "%";
this.mfdBrightLevel.textContent = this.gps.getBrightness("MFD") + "%";
}
onExit() {
this.pfdConfWindow.setAttribute("state", "Inactive");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@
0%, 100% {
visibility: hidden; } }

html {
height: 100%;
width: 100%;
overflow: hidden; }
html body {
-webkit-user-select: none;
font-family: Roboto-Regular;
font-size: calc(var(--viewportHeightRatio) * (36px / 21.6) * var(--currentPageHeight) / 100);
color: white;
height: 100%;
width: 100%;
margin: 0;
padding: 0; }

#highlight {
position: absolute;
height: 100%;
Expand Down Expand Up @@ -2388,7 +2402,7 @@ as3x-touch-element {
top: 0%;
text-align: center;
font-size: 3vh; }

as3x-touch-element #MFD #MapMenu .subpart {
position: absolute;
border: 0.4vh solid white; }
Expand Down Expand Up @@ -2424,7 +2438,7 @@ as3x-touch-element #MFD #MapMenu #orientation {
left: 5%;
width: 90%;
height: 21%; }

as3x-touch-element #MFD #MapMenu #MapMenu_Orient_North {
left: 4%;
width: 28%}
Expand All @@ -2446,8 +2460,8 @@ as3x-touch-element #MFD #MapMenu #features {
as3x-touch-element #MFD #MapMenu #MapMenu_Weather {
top: 19%;
left: 4%;
width: 44%;}
width: 44%;}

as3x-touch-element #MFD #MapMenu #MapMenu_Topo {
top: 19%;
left: 52%;
Expand All @@ -2456,12 +2470,12 @@ as3x-touch-element #MFD #MapMenu #features {
as3x-touch-element #MFD #MapMenu #MapMenu_RangeRing {
left: 4%;
width: 44%;
bottom: .5vh;}
bottom: .5vh;}

as3x-touch-element #MFD #MapMenu #MapMenu_Arc {
left: 52%;
width: 44%;
bottom: .5vh;}
bottom: .5vh;}

as3x-touch-element #MFD #MapMenu #range {
top: 73%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AS3X_Touch extends NavSystemTouch {
this.pageMenu = new NavSystemElementContainer("Page menu", "PageMenu", new AS3X_Touch_PageMenu());
this.pageMenu.setGPS(this);
this.mapMenu = new NavSystemElementContainer("Map menu", "MapMenu", new AS3X_Touch_MapMenu());
this.mapMenu.setGPS(this);
this.mapMenu.setGPS(this);
this.fullKeyboard = new NavSystemElementContainer("Full Keyboard", "fullKeyboard", new AS3X_Touch_FullKeyboard());
this.fullKeyboard.setGPS(this);
this.duplicateWaypointSelection = new NavSystemElementContainer("Waypoint Duplicates", "WaypointDuplicateWindow", new AS3X_Touch_DuplicateWaypointSelection());
Expand Down Expand Up @@ -193,8 +193,8 @@ class AS3X_Touch extends NavSystemTouch {
super.disconnectedCallback();
}

Update() {
super.Update();
onUpdate(_deltaTime) {
super.onUpdate(_deltaTime);
if (this.autoPitotHeat) {
let temp = SimVar.GetSimVarValue("AMBIENT TEMPERATURE", "celsius");
let pitotHeat = SimVar.GetSimVarValue("PITOT HEAT", "bool");
Expand Down Expand Up @@ -1065,7 +1065,7 @@ class AS3X_Touch_NavSystemPage extends NavSystemPage {
onEvent(_event) {
if (_event == 'Menu_Push' && this._menuCb) {
this._menuCb();
}
}
}
onEnter() {
super.onEnter();
Expand Down Expand Up @@ -1190,7 +1190,7 @@ class AS3X_Touch_PFD_Menu extends NavSystemElement {
}
}
timer_Reset() {
this.timerStartTime = -1;
this.timerStartTime = -1;
this.pauseTime = 0;
this.isTimerOn = false;
this.timerStartStop_action.textContent = "Start";
Expand Down
Loading

0 comments on commit 5ec6a15

Please sign in to comment.