-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add engine offsets * refact: move helicopter specific engine data to proper offset
- Loading branch information
1 parent
22b5071
commit 546e8e1
Showing
34 changed files
with
5,266 additions
and
16 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
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,261 @@ | ||
import { Type } from 'fsuipc'; | ||
|
||
import { OffsetList } from '@shared/offset-list'; | ||
import { Offset } from '@shared/offset'; | ||
import { OffsetCategory } from '@shared/offset-category'; | ||
|
||
export const engine1: OffsetList = { | ||
engine1ThrottleLever: new Offset({ | ||
value: 0x88C, | ||
name: 'engine1ThrottleLever', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine 1 throttle lever - percent - negative = reverse', | ||
convert: 'Math.round({VAL} < 0 ? {VAL} / 4096 * 100 : {VAL} / 16384 * 100)', | ||
type: Type.Int16, | ||
permission: 'r', | ||
}), | ||
engine1PropLever: new Offset({ | ||
value: 0x88E, | ||
name: 'engine1PropLever', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine 1 prop lever - percent - negative = reverse', | ||
convert: 'Math.round({VAL} < 0 ? {VAL} / 4096 * 100 : {VAL} / 16384 * 100)', | ||
type: Type.Int16, | ||
permission: 'rw', | ||
}), | ||
engine1MixtureLever: new Offset({ | ||
value: 0x890, | ||
name: 'engine1MixtureLever', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine 1 prop lever - percent', | ||
convert: '{VAL} / 16384 * 100', | ||
type: Type.UInt16, | ||
permission: 'rw', | ||
}), | ||
engine1StarterSwitchPosition: new Offset({ | ||
value: 0x892, | ||
name: 'engine1StarterSwitchPosition', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 start switch position - JET: 0=off 1=start 2=gen/alt - PROP: 0=off 1=right 2=left 3=both 4=start', | ||
type: Type.UInt16, | ||
permission: 'rw', | ||
}), | ||
engine1Firing: new Offset({ | ||
value: 0x894, | ||
name: 'engine1Firing', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine 1 combustion', | ||
convert: '!!{VAL}', | ||
type: Type.UInt16, | ||
permission: 'r', | ||
}), | ||
engine1N2: new Offset({ | ||
value: 0x896, | ||
name: 'engine1N2', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine 1 N2 - also helo RPM %', | ||
convert: '{VAL} / 16384 * 100', | ||
type: Type.UInt16, | ||
permission: 'rw', | ||
}), | ||
engine1N1: new Offset({ | ||
value: 0x898, | ||
name: 'engine1N1', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine 1 N1 - also helo RPM %', | ||
convert: '{VAL} / 16384 * 100', | ||
type: Type.Int16, | ||
permission: 'rw', | ||
}), | ||
engine1PropRPM: new Offset({ | ||
value: 0x898, | ||
name: 'engine1PropRPM', | ||
category: OffsetCategory.ENGINE, | ||
description: 'derive RPM by multiplying by - negative = counter-rotating propeller', | ||
convert: '{VAL} / 16384 / 65536', | ||
type: Type.Int16, | ||
permission: 'rw', | ||
}), | ||
engine1ThrottleLeverControl: new Offset({ | ||
value: 0x89A, | ||
name: 'engine1ThrottleLeverControl', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 throttle lever control - -4096 to +16384', | ||
type: Type.Int16, | ||
permission: 'rw', | ||
}), | ||
engine1FuelFlowLbHourSSL: new Offset({ | ||
value: 0x8A0, | ||
name: 'engine1FuelFlowLbHourSSL', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 fuel flow (lb per hour, sea level)', | ||
convert: '{VAL} / 128', | ||
type: Type.UInt16, | ||
permission: 'r', | ||
}), | ||
engine1AntiIce: new Offset({ | ||
value: 0x8B2, | ||
name: 'engine1AntiIce', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 anti-ice/carb heat active', | ||
convert: '!!{VAL}', | ||
type: Type.UInt16, | ||
permission: 'r', | ||
}), | ||
engine1OilTemp: new Offset({ | ||
value: 0x8B8, | ||
name: 'engine1OilTemp', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 oil temp - celsius', | ||
convert: 'Math.round({VAL} * 140 / 16384)', | ||
type: Type.UInt16, | ||
permission: 'r', | ||
}), | ||
engine1OilPres: new Offset({ | ||
value: 0x8BA, | ||
name: 'engine1OilPres', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 oil pressure - PSI', | ||
convert: 'Math.round({VAL} * 55 / 16384)', | ||
type: Type.UInt16, | ||
permission: 'r', | ||
}), | ||
engine1PressureRatio: new Offset({ | ||
value: 0x8BC, | ||
name: 'engine1PressureRatio', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 pressure ratio', | ||
convert: '{VAL} * 1.6 / 16384', | ||
type: Type.UInt16, | ||
permission: 'r', | ||
}), | ||
engine1EGT: new Offset({ | ||
value: 0x8BE, | ||
name: 'engine1EGT', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 exhaust gas temperature - Trust only on jet engine - celsius', | ||
convert: 'Math.round({VAL} * 860 / 16384)', | ||
type: Type.UInt16, | ||
permission: 'r', | ||
}), | ||
engine1MP: new Offset({ | ||
value: 0x8C0, | ||
name: 'engine1MP', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 manifold pressure - inHg', | ||
convert: '{VAL} / 1024', | ||
type: Type.UInt16, | ||
permission: 'r', | ||
}), | ||
engine1RPMScaler: new Offset({ | ||
value: 0x8C8, | ||
name: 'engine1RPMScaler', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 RPM Scaler - props: used to calculate RPM', | ||
type: Type.UInt16, | ||
permission: 'r', | ||
}), | ||
engine1OilQuantity: new Offset({ | ||
value: 0x8D0, | ||
name: 'engine1OilQuantity', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 oil quantity - percent', | ||
convert: 'Math.round({VAL} / 16384 * 100)', | ||
type: Type.UInt32, | ||
permission: 'r', | ||
}), | ||
engine1Vibration: new Offset({ | ||
value: 0x8D4, | ||
name: 'engine1Vibration', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 vibration', | ||
convert: 'Math.round({VAL} * 5 / 16384)', | ||
type: Type.UInt32, | ||
permission: 'r', | ||
}), | ||
engine1HydPres: new Offset({ | ||
value: 0x8D8, | ||
name: 'engine1HydPres', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 hydraulic pressure - PSI', | ||
convert: '{VAL} / 4', | ||
type: Type.UInt32, | ||
permission: 'r', | ||
}), | ||
engine1HydQuantity: new Offset({ | ||
value: 0x8DC, | ||
name: 'engine1HydQuantity', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 hydraulic quantity - PSI', | ||
convert: '{VAL} / 16384 * 100', | ||
type: Type.UInt32, | ||
permission: 'r', | ||
}), | ||
engine1CHT: new Offset({ | ||
value: 0x8E8, | ||
name: 'engine1CHT', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 cylinder head temperature - F', | ||
type: Type.Double, | ||
permission: 'r', | ||
}), | ||
engine1ITT: new Offset({ | ||
value: 0x8F0, | ||
name: 'engine1ITT', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 turbine temperature - C', | ||
convert: '{VAL} / 16384', | ||
type: Type.UInt32, | ||
permission: 'r', | ||
}), | ||
engine1Torque: new Offset({ | ||
value: 0x8F4, | ||
name: 'engine1Torque', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 torque - trust only for helo - percent', | ||
convert: '{VAL} / 16384 * 100', | ||
type: Type.UInt32, | ||
permission: 'r', | ||
}), | ||
engine1FuelPres: new Offset({ | ||
value: 0x8F8, | ||
name: 'engine1FuelPres', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 fuel pressure - PSI', | ||
convert: '{VAL} / 144', | ||
type: Type.UInt32, | ||
permission: 'r', | ||
}), | ||
engine1FuelUsedSinceStart: new Offset({ | ||
value: 0x90C, | ||
name: 'engine1FuelUsedSinceStart', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 used fuel since start - lb', | ||
type: Type.Single, | ||
permission: 'r', | ||
}), | ||
engine1FuelElapsedTime: new Offset({ | ||
value: 0x910, | ||
name: 'engine1FuelElapsedTime', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 fuel elapsed time - h', | ||
type: Type.Single, | ||
permission: 'r', | ||
}), | ||
engine1FuelFlowLbHour: new Offset({ | ||
value: 0x918, | ||
name: 'engine1FuelFlowLbHour', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 fuel elapsed time - lb/h', | ||
type: Type.Double, | ||
permission: 'r', | ||
}), | ||
engine1TorqueFtLb: new Offset({ | ||
value: 0x920, | ||
name: 'engine1TorqueFtLb', | ||
category: OffsetCategory.ENGINE, | ||
description: 'engine1 fuel elapsed time - ft lb', | ||
type: Type.Single, | ||
permission: 'r', | ||
}), | ||
}; |
Oops, something went wrong.