forked from flybywiresim/aircraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bring in a380x instruments @2dc636d7 (flybywiresim#8289)
* chore: bring in a380 instruments @2dc636d7 Build scripts and imports have been adjusted for the monorepo environment. * fix: eslintrc path * fix: unignore and commit mach config * chore: copy eslintrc from a32nx * build: disable fms-v2 tests * build: disable a380x lint * doc: merge local var docs from a380x repo Co-authored-by: Sven Czarnian <devel@svcz.de> Co-authored-by: Richard Pilbery <email@pilbery.co.uk> Co-authored-by: Benedict Etzel <developer@beheh.de> Co-authored-by: svengcz <64070348+svengcz@users.noreply.github.com> Co-authored-by: BBK <22713769+BlueberryKing@users.noreply.github.com> Co-authored-by: ErickSharp <titaninmc@gmail.com> Co-authored-by: 2hwk <reasonstouninstall@tutanota.com> Co-authored-by: Nufflee <zifcani@gmail.com> Co-authored-by: davydecorps <38904654+crocket63@users.noreply.github.com> Co-authored-by: Taz5150 <roldan5150@gmail.com>
- Loading branch information
1 parent
4b10ad4
commit e1bf51e
Showing
538 changed files
with
67,981 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
const imagePlugin = require('esbuild-plugin-inline-image'); | ||
const postCssPlugin = require('esbuild-style-plugin'); | ||
// const tailwind = require('tailwindcss'); | ||
const postCssColorFunctionalNotation = require('postcss-color-functional-notation'); | ||
const postCssInset = require('postcss-inset'); | ||
const { typecheckingPlugin } = require("#build-utils"); | ||
|
||
/** @type { import('@synaptic-simulations/mach').MachConfig } */ | ||
module.exports = { | ||
packageName: 'A380X', | ||
packageDir: 'out/flybywire-aircraft-a380-842', | ||
plugins: [ | ||
imagePlugin({ limit: -1 }), | ||
postCssPlugin({ | ||
extract: true, | ||
postcss: { | ||
plugins: [ | ||
// tailwind('src/systems/instruments/src/EFB/tailwind.config.js'), | ||
|
||
// transform: hsl(x y z / alpha) -> hsl(x, y, z, alpha) | ||
postCssColorFunctionalNotation(), | ||
|
||
// transform: inset: 0; -> top/right/left/bottom: 0; | ||
postCssInset(), | ||
], | ||
} | ||
}), | ||
typecheckingPlugin(), | ||
], | ||
instruments: [ | ||
msfsAvionicsInstrument('PFD'), | ||
|
||
reactInstrument('EWD'), | ||
reactInstrument('MFD'), | ||
reactInstrument('OIT'), | ||
reactInstrument('RMP'), | ||
reactInstrument('SD'), | ||
], | ||
}; | ||
|
||
function msfsAvionicsInstrument(name, folder = name) { | ||
return { | ||
name, | ||
index: `src/systems/instruments/src/${folder}/instrument.tsx`, | ||
simulatorPackage: { | ||
type: 'baseInstrument', | ||
templateId: `A380X_${name}`, | ||
mountElementId: `${name}_CONTENT`, | ||
fileName: name.toLowerCase(), | ||
imports: ['/JS/dataStorage.js'], | ||
}, | ||
}; | ||
} | ||
|
||
function reactInstrument(name, additionalImports) { | ||
return { | ||
name, | ||
index: `src/systems/instruments/src/${name}/index.tsx`, | ||
simulatorPackage: { | ||
type: 'react', | ||
isInteractive: false, | ||
fileName: name.toLowerCase(), | ||
imports: ['/JS/dataStorage.js','/JS/fbw-a380x/A380X_Simvars.js', ...(additionalImports ?? [])], | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
root: true, | ||
env: { browser: true }, | ||
extends: [ | ||
'@flybywiresim/eslint-config', | ||
'plugin:jest/recommended', | ||
'plugin:jest/style', | ||
'plugin:tailwindcss/recommended', | ||
], | ||
plugins: [ | ||
'@typescript-eslint', | ||
'tailwindcss', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
ignorePatterns: [ | ||
'mcdu-server/client/build/**', | ||
// disabled all for now as the A380 code is not up to standard | ||
'**/*', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: 'script', | ||
requireConfigFile: false, | ||
}, | ||
settings: { | ||
'tailwindcss': { groupByResponsive: true }, | ||
'import/resolver': { node: { extensions: ['.js', '.mjs', '.jsx', '.ts', '.tsx'] } }, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.jsx', '*.tsx'], | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaFeatures: { jsx: true }, | ||
}, | ||
}, | ||
{ | ||
files: ['*.mjs', '*.ts', '*.d.ts'], | ||
parserOptions: { sourceType: 'module' }, | ||
}, | ||
], | ||
// overrides airbnb, use sparingly | ||
rules: { | ||
'tailwindcss/no-custom-classname': 'off', | ||
'no-bitwise': 'off', | ||
'no-mixed-operators': 'off', | ||
'arrow-parens': ['error', 'always'], | ||
'brace-style': ['error', '1tbs', { allowSingleLine: false }], | ||
'class-methods-use-this': 'off', | ||
'curly': ['error', 'multi-line'], | ||
'import/prefer-default-export': 'off', | ||
'import/no-extraneous-dependencies': ['error', { devDependencies: true }], | ||
'indent': ['error', 4], | ||
'react/jsx-filename-extension': [2, { extensions: ['.jsx', '.tsx'] }], | ||
'react/jsx-indent': ['error', 4], | ||
'no-restricted-syntax': 'off', | ||
'quote-props': ['error', 'consistent-as-needed'], | ||
'strict': ['error', 'global'], | ||
|
||
'no-case-declarations': 'off', | ||
|
||
'no-plusplus': 'off', | ||
'no-shadow': 'off', | ||
'no-continue': 'off', | ||
'no-return-assign': 'off', | ||
'radix': 'off', | ||
'max-classes-per-file': 'off', | ||
'no-useless-constructor': 'off', | ||
'@typescript-eslint/no-useless-constructor': ['error'], | ||
'no-empty-function': ['error', { allow: ['constructors', 'arrowFunctions'] }], | ||
'@typescript-eslint/no-empty-function': 'off', | ||
|
||
// buggy | ||
'prefer-destructuring': 'off', | ||
|
||
// Avoid typescript-eslint conflicts | ||
'no-unused-vars': 'off', | ||
'import/no-unresolved': 'off', | ||
'@typescript-eslint/no-unused-vars': ['error', { | ||
vars: 'all', | ||
varsIgnorePattern: '^_|^FSComponent$', | ||
args: 'after-used', | ||
argsIgnorePattern: '^_|^node$|^deltaTime$', | ||
}], | ||
|
||
'no-use-before-define': 'off', | ||
|
||
'react/jsx-indent-props': 'off', | ||
|
||
// not relevant now | ||
'react/no-unused-state': 'off', | ||
|
||
// useless | ||
'react/prop-types': 'off', | ||
'react/require-default-props': 'off', | ||
'react/no-unused-prop-types': 'off', | ||
'react/destructuring-assignment': 'off', | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/no-unescaped-entities': 'off', | ||
|
||
// Not needed with react 17+ | ||
'react/jsx-uses-react': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
|
||
'import/extensions': 'off', | ||
'no-param-reassign': 'off', | ||
'no-undef-init': 'off', | ||
'no-undef': 'off', | ||
'max-len': ['error', { code: 192 }], | ||
|
||
// Irrelevant for our use | ||
'jsx-a11y/alt-text': 'off', | ||
'jsx-a11y/no-static-element-interactions': 'off', | ||
'jsx-a11y/click-events-have-key-events': 'off', | ||
'jsx-a11y/anchor-is-valid': 'off', | ||
'object-curly-newline': ['error', { multiline: true }], | ||
'linebreak-style': 'off', | ||
|
||
// allow typescript overloads | ||
'no-redeclare': 'off', | ||
'@typescript-eslint/no-redeclare': ['error'], | ||
'lines-between-class-members': 'off', | ||
'@typescript-eslint/lines-between-class-members': ['error'], | ||
'no-dupe-class-members': 'off', | ||
'@typescript-eslint/no-dupe-class-members': ['error'], | ||
|
||
// allow console logging | ||
'no-console': 'off', | ||
}, | ||
globals: { | ||
Simplane: 'readonly', | ||
SimVar: 'readonly', | ||
Utils: 'readonly', | ||
JSX: 'readonly', | ||
Coherent: 'readonly', | ||
ViewListener: 'readonly', | ||
RegisterViewListener: 'readonly', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+8.84 KB
fbw-a380x/src/base/flybywire-aircraft-a380-842/html_ui/Fonts/A380X_FCU.ttf
Binary file not shown.
Binary file added
BIN
+13.4 KB
fbw-a380x/src/base/flybywire-aircraft-a380-842/html_ui/Fonts/ECAMFontRegular.ttf
Binary file not shown.
Binary file added
BIN
+6.57 KB
fbw-a380x/src/base/flybywire-aircraft-a380-842/html_ui/Fonts/FBW-Display-RMP-10.ttf
Binary file not shown.
Binary file added
BIN
+5.46 KB
fbw-a380x/src/base/flybywire-aircraft-a380-842/html_ui/Fonts/FBW-Display-RMP-11.ttf
Binary file not shown.
Binary file added
BIN
+4.98 KB
fbw-a380x/src/base/flybywire-aircraft-a380-842/html_ui/Fonts/FBW-Display-RMP-13.ttf
Binary file not shown.
Binary file added
BIN
+5.97 KB
fbw-a380x/src/base/flybywire-aircraft-a380-842/html_ui/Fonts/FBW-Display-RMP-16(1).ttf
Binary file not shown.
Binary file added
BIN
+6.05 KB
fbw-a380x/src/base/flybywire-aircraft-a380-842/html_ui/Fonts/FBW-Display-RMP-19.ttf
Binary file not shown.
Binary file added
BIN
+43.5 KB
...c/base/flybywire-aircraft-a380-842/html_ui/Images/Engine-Hyd-Bleed-Dithered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+56 KB
fbw-a380x/src/base/flybywire-aircraft-a380-842/html_ui/Images/HYD_8-7_TRIMMED.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+104 KB
fbw-a380x/src/base/flybywire-aircraft-a380-842/html_ui/Images/TRIM_INDICATOR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.