Skip to content

Commit

Permalink
feat(efb): flyPadOS 3 (#6528) @12226f0e1
Browse files Browse the repository at this point in the history
  • Loading branch information
ErickSharp authored and aguther committed May 4, 2022
1 parent 6e3df93 commit 02215d4
Show file tree
Hide file tree
Showing 296 changed files with 37,139 additions and 10,621 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

* text=auto

# Ensure LF for shell files, even on Windows, so that bash inside Docker does not panic
*.sh text eol=lf

# Ensure the language files update during build are not marked as changed due to different
# line endings.
/src/instruments/src/EFB/Localization/*.json text eol=lf
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
1. [MISC] Added custom Autobrake event for SimConnect - @aguther (Andreas Guther)
1. [EWD] Fixed failures not re-triggering when resolved - @tricky_dicky (Richard Pilbery)
1. [SOUND] Prevent autopilot disconnect from sounding on C+D spawn - @tricky_dicky (Richard Pilbery) and @saschl (saschl#9432)
1. [EFB] Presets for Lighting and Aircraft states - @frankkopp (Frank Kopp)

## 0.7.0

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
echo CLIENT_SECRET=${{ secrets.NAVIGRAPH_CLIENT_SECRET }} >> .env
echo CHARTFOX_SECRET=${{ secrets.CHARTFOX_SECRET }} >> .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
echo CLIENT_SECRET=${{ secrets.NAVIGRAPH_CLIENT_SECRET }} >> .env
echo CHARTFOX_SECRET=${{ secrets.CHARTFOX_SECRET }} >> .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
echo CLIENT_SECRET=${{ secrets.NAVIGRAPH_CLIENT_SECRET }} >> .env
echo CHARTFOX_SECRET=${{ secrets.CHARTFOX_SECRET }} >> .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
echo CLIENT_SECRET=${{ secrets.NAVIGRAPH_CLIENT_SECRET }} >> .env
echo CHARTFOX_SECRET=${{ secrets.CHARTFOX_SECRET }} >> .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
echo CLIENT_SECRET=${{ secrets.NAVIGRAPH_CLIENT_SECRET }} >> .env
echo CHARTFOX_SECRET=${{ secrets.CHARTFOX_SECRET }} >> .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ node_modules
/src/fbw/obj/
/src/fdr2csv/build/
/src/fadec/obj/
/src/presets/obj/
.env
src/instruments/buildSrc/custom/*
/flybywire-aircraft-a320-neo/MCDU SERVER/
Expand All @@ -70,3 +71,5 @@ src/instruments/buildSrc/custom/*
/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/TEXTURE/A320NEO_COCKPIT_DECALSTEXT_ALBD.TIF.dds
msfs-avionics-mirror/src/sdk/build/**
*.tgz
/src/instruments/src/EFB/Localization/downloaded/*.json
/.ace/
2 changes: 1 addition & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
}
],
"version": 4
}
}
30 changes: 30 additions & 0 deletions docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,36 @@
0 or greater | Seconds elapsed
-1 | Empty value

- A32NX_LOAD_LIGHTING_PRESET
- Number
- ID for preset
- When set to >0 the corresponding preset will be loaded if defined
- Will be reset to 0 after loading is done

- A32NX_SAVE_LIGHTING_PRESET
- Number
- ID for preset
- When set to >0 the corresponding preset will be overwritten and saved to an ini file
- Will be reset to 0 after saving is done

- A32NX_LOAD_AIRCRAFT_PRESET
- Number
- ID for preset (1..5)
- When set to >0 the corresponding preset will be loaded if defined
- Will be reset to 0 after loading is done
- When set to 0 during loading will stop and cancel the loading process
- Value | Meaning
--- | ---
1 | Cold & Dark
2 | Turnaround
3 | Ready for Pushback
4 | Ready for Taxi
5 | Ready for Takeoff

- A32NX_LOAD_AIRCRAFT_PRESET_PROGRESS
- Number (0.0..1.0)
- While loading a preset this will contain the percentage of the total progress of loading

## EIS Display System

- A32NX_EFIS_{side}_NAVAID_{1|2}_MODE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ background_color=0,0,0
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=systems.wasm&wasm_gauge=systems, 0,0,1,1
htmlgauge01=WasmInstrument/WasmInstrument.html?wasm_module=fbw.wasm&wasm_gauge=fbw, 0,0,1,1
htmlgauge02=WasmInstrument/WasmInstrument.html?wasm_module=fadec.wasm&wasm_gauge=FadecGauge, 0,0,1,1
htmlgauge03=WasmInstrument/WasmInstrument.html?wasm_module=presets.wasm&wasm_gauge=Presets, 0,0,1,1

[VPainting01]
size_mm = 2048,512
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class A32NX_Core {
name: 'Speeds',
module: new A32NX_Speeds(),
updateInterval: 500,
},
}
];
this.moduleThrottlers = {};
for (const moduleDefinition of this.modules) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
class A32NX_Pushback {
constructor() {}

init() {
SimVar.SetSimVarValue('L:A32NX_PUSHBACK_TUG_DIRECTION_FACTOR', 'number', -1);
console.log("A32NX Pushback Initialized.");
}

update(_deltaTime) {
const simOnGround = SimVar.GetSimVarValue('SIM ON GROUND', 'number');
const pushBackAttached = SimVar.GetSimVarValue('Pushback Attached', 'bool');

if (!(pushBackAttached && simOnGround)) {
return;
}
console.log(SimVar.GetSimVarValue('A:RUDDER POSITION', 'number'));
const tugSpeed = SimVar.GetSimVarValue('L:A32NX_TUG_SPEED', 'number');
const parkingBrakeEngaged = SimVar.GetSimVarValue('L:A32NX_PARK_BRAKE_LEVER_POS', 'Bool');
const commandedTugDirectionFactor = SimVar.GetSimVarValue('L:A32NX_PUSHBACK_TUG_DIRECTION_FACTOR', 'number');
const commandedTugHeadingFactor = SimVar.GetSimVarValue('L:A32NX_PUSHBACK_TUG_HEADING_FACTOR', 'number');

SimVar.SetSimVarValue('VELOCITY BODY X', 'Number', 0);
SimVar.SetSimVarValue('VELOCITY BODY Y', 'Number', 0);
SimVar.SetSimVarValue('VELOCITY BODY Z', 'Number', tugSpeed * (parkingBrakeEngaged ? 0.75 : 8) * commandedTugDirectionFactor);

SimVar.SetSimVarValue('ROTATION VELOCITY BODY X', 'Number', 0);
SimVar.SetSimVarValue('ROTATION VELOCITY BODY Y', 'Number', tugSpeed * (parkingBrakeEngaged ? 0.015 : 0.16) * commandedTugHeadingFactor * commandedTugDirectionFactor);
SimVar.SetSimVarValue('ROTATION VELOCITY BODY Z', 'Number', 0);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link rel="stylesheet" href="A320_Neo_CDU.css" />
<link rel="stylesheet" href="A320_Neo_CDU.css"/>

<script type="text/html" id="A320_Neo_CDU">
<glasscockpit-highlight id="highlight"></glasscockpit-highlight>
Expand Down
17 changes: 16 additions & 1 deletion igniter.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@ import { ExecTask, TaskOfTasks } from '@flybywiresim/igniter';
import { getInstrumentsIgniterTasks } from './src/instruments/buildSrc/igniter/tasks.mjs';

export default new TaskOfTasks('a32nx', [
new TaskOfTasks('preparation', [
new ExecTask('efb-translation', 'npm run build:efb-translation'),
]),

new TaskOfTasks('build', [
new TaskOfTasks('instruments', [...getInstrumentsIgniterTasks(), new ExecTask('pfd','npm run build:pfd', ['src/instruments/src/PFD','flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX/PFD'])], true),
new TaskOfTasks('instruments',
[...getInstrumentsIgniterTasks(),
new ExecTask('pfd',
'npm run build:pfd',
['src/instruments/src/PFD','flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX/PFD']
)
],
true),
new ExecTask('atsu','npm run build:atsu', ['src/atsu', 'flybywire-aircraft-a320-neo/html_ui/JS/atsu']),
new ExecTask('sentry-client','npm run build:sentry-client', ['src/sentry-client', 'flybywire-aircraft-a320-neo/html_ui/JS/sentry-client']),
new ExecTask('failures','npm run build:failures', ['src/failures', 'flybywire-aircraft-a320-neo/html_ui/JS/generated/failures.js']),
Expand All @@ -22,6 +33,10 @@ export default new TaskOfTasks('a32nx', [
'src/fadec/build.sh',
'wasm-opt -O1 -o flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/fadec.wasm flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/fadec.wasm'
], ['src/fadec', 'flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/fadec.wasm']),
new ExecTask('presets', [
'src/presets/build.sh',
'wasm-opt -O1 -o flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/presets.wasm flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/presets.wasm'
], ['src/presets', 'flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/presets.wasm']),
new TaskOfTasks('mcdu-server', [
new ExecTask('client', ['npm run build:mcdu-client'], ['src/mcdu-server/client', 'src/mcdu-server/client/build']),
new ExecTask('server', ['npm run build:mcdu-server'], ['src/mcdu-server', 'flybywire-aircraft-a320-neo/MCDU SERVER/server.exe']),
Expand Down
Loading

0 comments on commit 02215d4

Please sign in to comment.