Skip to content

Commit

Permalink
Add default/base items
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeelio committed Aug 6, 2024
1 parent c794767 commit 9562851
Show file tree
Hide file tree
Showing 32 changed files with 2,634 additions and 16 deletions.
130 changes: 130 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,133 @@ fabric.properties

# Built Visual Studio Code Extensions
*.vsix

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
64 changes: 64 additions & 0 deletions aircraft/AerosoftA333.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
export default class AerosoftA333Airbus {
meta = {
name: 'aerosoft a333',
priority: 2,
sim: 'fsuipc',
}

features = {
beaconLights: false,
landingLights: false,
navigationLights: false,
strobeLights: false,
taxiLights: false,
flaps: {
0: 'UP',
1: 'CONF 1',
2: 'CONF 1+F',
3: 'CONF 2',
4: 'CONF 3',
5: 'FULL',
},
}

/**
*
* @param {string} title The title of the aircraft, lowercased
* @param {string=} icao The ICAO of the aircraft. Might not be available
* @param {string=} config_path Path to the aircraft config. Might not be there
* @return {boolean}
*/
match(title, icao, config_path) {
// Should match aerosfot + a333/a3
return ['aerosoft', 'a3'].every((w) => title.includes(w.toLowerCase()))
}

beaconLights(value) {
return null
}

landingLights(value) {
return null
}

navigationLights(value) {
return null
}

strobeLights(value) {
return null
}

taxiLights(value) {
return null
}

/**
* Get the right text for the flaps
* @param {int} value
* @returns {string}
*/
flaps(value) {
return this.features.flaps[value] || value
}
}
86 changes: 86 additions & 0 deletions aircraft/Felis742.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
export default class Felis742 {
meta = {
name: 'Felis 742',
priority: 5,
sim: 'xplane',
}

features = {
beaconLights: false,
landingLights: {
'B742/ext_light/landing_inbd_L_sw': 'int',
'B742/ext_light/landing_inbd_R_sw': 'int',
'B742/ext_light/landing_outbd_L_sw': 'int',
'B742/ext_light/landing_outbd_R_sw': 'int',
},
logoLights: {
'B742/ext_light/logo_sw': 'int',
},
navigationLights: false,
strobeLights: false,
taxiLights: {
'B742/ext_light/runway_turnoff_L_sw': 'int',
'B742/ext_light/runway_turnoff_R_sw': 'int',
},
wingLights: {
'B742/ext_light/wing_sw': 'int',
},
flaps: {
0: 'UP',
1: 'CONF 1',
2: 'CONF 1+F',
3: 'CONF 2',
4: 'CONF 3',
5: 'FULL',
},
}

/**
* Determine if this config map should be used for the given aircraft
*
* @param {string} title The title of the aircraft, lowercased
* @param {string=} icao The ICAO of the aircraft. Might not be available
* @param {string=} config_path Path to the aircraft config. Might not be there
* @return {boolean}
*/
match(title, icao, config_path) {
return ['boeing', '747-200'].every((w) => title.includes(w.toLowerCase()))
}

beaconLights(value) {
return null
}

landingLights(inbd_l, inbd_r, outb_l, outb_r) {
return inbd_l === 1 && inbd_r === 1 && outb_l === 1 && outb_r === 1
}

logoLights(value) {
return value === 1
}

navigationLights(value) {
return null
}

strobeLights(value) {
return null
}

taxiLights(turnoff_l, turnoff_r) {
return turnoff_l === 1 && turnoff_r === 1
}

wingLights(value) {
return value === 1
}

/**
* Get the right text for the flaps
* @param {int} value
* @returns {string}
*/
flaps(value) {
return this.features.flaps[value] || value
}
}
70 changes: 70 additions & 0 deletions aircraft/FenixA320.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
export default class FenixA320 {
meta = {
name: 'Fenix A320',
priority: 4,
sim: 'msfs',
author: 'B.Fatih KOZ <https://github.com/FatihKoz>',
}

features = {
landingLights: {
S_OH_EXT_LT_LANDING_L: 'int',
S_OH_EXT_LT_LANDING_R: 'int',
},
beaconLights: {
S_OH_EXT_LT_BEACON: 'int',
},
navigationLights: {
S_OH_EXT_LT_NAV_LOGO: 'int',
},
strobeLights: {
S_OH_EXT_LT_STROBE: 'int',
},
taxiLights: {
S_OH_EXT_LT_NOSE: 'int',
},
flaps: {
0: 'UP',
1: 'CONF 1',
2: 'CONF 1+F',
3: 'CONF 2',
4: 'CONF 3',
5: 'FULL',
},
}

match(title, icao, config_path) {
return (
['Fenix', 'A320'].every((w) => title.includes(w.toLowerCase())) ||
['FenixA320'].every((w) => title.includes(w.toLowerCase()))
)
}

beaconLights(value) {
return value === 1
}

landingLights(left, right) {
return left === 2 && right === 2
}

navigationLights(value) {
return value === 1 || value === 2
}

strobeLights(value) {
if (value === 1) {
return null
}

return value === 2
}

taxiLights(value) {
return value === 1 || value === 2
}

flaps(value) {
return this.features.flaps[value] || value
}
}
Loading

0 comments on commit 9562851

Please sign in to comment.