Skip to content

Commit

Permalink
F-4E: Add Seat Device (#815)
Browse files Browse the repository at this point in the history
Fixes #645
  • Loading branch information
charliefoxtwo authored Jul 7, 2024
1 parent 11914e3 commit e452df5
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 35 deletions.
74 changes: 40 additions & 34 deletions Scripts/DCS-BIOS/doc/Addresses.h
Original file line number Diff line number Diff line change
Expand Up @@ -13279,8 +13279,8 @@
#define F_4E_PLT_COCKPIT_MIRROR_RIGHT_AM 0x2A4A, 0x8000
#define F_4E_PLT_COCKPIT_MIRROR_TOP 0x2A4A, 0x2000, 13
#define F_4E_PLT_COCKPIT_MIRROR_TOP_AM 0x2A4A, 0x2000
#define F_4E_PLT_COCKPIT_PRESSURE_EMERGENCY_RELEASE 0x2D8E, 0x4000, 14
#define F_4E_PLT_COCKPIT_PRESSURE_EMERGENCY_RELEASE_AM 0x2D8E, 0x4000
#define F_4E_PLT_COCKPIT_PRESSURE_EMERGENCY_RELEASE 0x2D94, 0x0004, 2
#define F_4E_PLT_COCKPIT_PRESSURE_EMERGENCY_RELEASE_AM 0x2D94, 0x0004
#define F_4E_PLT_COMPASS_BANK 0x2C3A, 0xFFFF, 0
#define F_4E_PLT_COMPASS_BANK_A 0x2C3A
#define F_4E_PLT_COMPASS_GYRO_MODE 0x2C22, 0x0200, 9
Expand Down Expand Up @@ -13352,11 +13352,11 @@
#define F_4E_PLT_ENGINE_TACH_R_SMALL_A 0x2AEC
#define F_4E_PLT_EXT_LIGHT_ANTI_COLL 0x2CF0, 0x3000, 12
#define F_4E_PLT_EXT_LIGHT_FLASH_MODE 0x2CF0, 0xC000, 14
#define F_4E_PLT_EXT_LIGHT_FORMATION_BRIGHTNESS 0x2D92, 0xFFFF, 0
#define F_4E_PLT_EXT_LIGHT_FORMATION_BRIGHTNESS_A 0x2D92
#define F_4E_PLT_EXT_LIGHT_FORMATION_MODE 0x2D90, 0x0003, 0
#define F_4E_PLT_EXT_LIGHT_FORMATION_BRIGHTNESS 0x2D96, 0xFFFF, 0
#define F_4E_PLT_EXT_LIGHT_FORMATION_BRIGHTNESS_A 0x2D96
#define F_4E_PLT_EXT_LIGHT_FORMATION_MODE 0x2D94, 0x0030, 4
#define F_4E_PLT_EXT_LIGHT_TAIL_BRIGHTNESS 0x2CF4, 0x0003, 0
#define F_4E_PLT_EXT_LIGHT_TAXI_LAND 0x2D8E, 0x3000, 12
#define F_4E_PLT_EXT_LIGHT_TAXI_LAND 0x2D94, 0x0003, 0
#define F_4E_PLT_EXT_LIGHT_WING_BRIGHTNESS 0x2CF4, 0x000C, 2
#define F_4E_PLT_FDC_FLIGHT_DIRECTOR 0x2BE2, 0x0400, 10
#define F_4E_PLT_FDC_FLIGHT_DIRECTOR_AM 0x2BE2, 0x0400
Expand Down Expand Up @@ -13591,8 +13591,8 @@
#define F_4E_PLT_O2_SUPPLY_AM 0x2B12, 0x0008
#define F_4E_PLT_O2_TEST 0x2AE4, 0x8000, 15
#define F_4E_PLT_O2_TEST_AM 0x2AE4, 0x8000
#define F_4E_PLT_PITOT_HEAT 0x2D8E, 0x8000, 15
#define F_4E_PLT_PITOT_HEAT_AM 0x2D8E, 0x8000
#define F_4E_PLT_PITOT_HEAT 0x2D94, 0x0008, 3
#define F_4E_PLT_PITOT_HEAT_AM 0x2D94, 0x0008
#define F_4E_PLT_PNEUMATIC_GAUGE 0x2ACC, 0xFFFF, 0
#define F_4E_PLT_PNEUMATIC_GAUGE_A 0x2ACC
#define F_4E_PLT_RADAR_10 0x2C22, 0x0004, 2
Expand Down Expand Up @@ -13706,6 +13706,9 @@
#define F_4E_PLT_SAI_TRIM_A 0x2BCA
#define F_4E_PLT_SAI_TRIM_BAR 0x2BD0, 0xFFFF, 0
#define F_4E_PLT_SAI_TRIM_BAR_A 0x2BD0
#define F_4E_PLT_SEAT_ADJUST 0x2D78, 0x0600, 9
#define F_4E_PLT_SEAT_HEIGHT 0x2D90, 0xFFFF, 0
#define F_4E_PLT_SEAT_HEIGHT_A 0x2D90
#define F_4E_PLT_SHAKE_BRAKE_HANDLE 0x2C88, 0xFFFF, 0
#define F_4E_PLT_SHAKE_BRAKE_HANDLE_A 0x2C88
#define F_4E_PLT_SHAKE_CANOPY_HANDLE 0x2C86, 0xFFFF, 0
Expand Down Expand Up @@ -13770,12 +13773,12 @@
#define F_4E_PLT_SHAKE_SYNC_SWITCH_A 0x2CA2
#define F_4E_PLT_SHAKE_WEAPON_LIGHTS 0x2C7E, 0xFFFF, 0
#define F_4E_PLT_SHAKE_WEAPON_LIGHTS_A 0x2C7E
#define F_4E_PLT_STICK_AFCS_EMERGENCY_RELEASE 0x2D78, 0x0800, 11
#define F_4E_PLT_STICK_AFCS_EMERGENCY_RELEASE_AM 0x2D78, 0x0800
#define F_4E_PLT_STICK_AIR_REFUEL_RELEASE 0x2D78, 0x0200, 9
#define F_4E_PLT_STICK_AIR_REFUEL_RELEASE_AM 0x2D78, 0x0200
#define F_4E_PLT_STICK_NWS 0x2D78, 0x0400, 10
#define F_4E_PLT_STICK_NWS_AM 0x2D78, 0x0400
#define F_4E_PLT_STICK_AFCS_EMERGENCY_RELEASE 0x2D78, 0x8000, 15
#define F_4E_PLT_STICK_AFCS_EMERGENCY_RELEASE_AM 0x2D78, 0x8000
#define F_4E_PLT_STICK_AIR_REFUEL_RELEASE 0x2D78, 0x2000, 13
#define F_4E_PLT_STICK_AIR_REFUEL_RELEASE_AM 0x2D78, 0x2000
#define F_4E_PLT_STICK_NWS 0x2D78, 0x4000, 14
#define F_4E_PLT_STICK_NWS_AM 0x2D78, 0x4000
#define F_4E_PLT_TACAN_CHANNEL_A 0x2BDA
#define F_4E_PLT_TACAN_COMMAND_LIGHT 0x2BD8, 0x0010, 4
#define F_4E_PLT_TACAN_COMMAND_LIGHT_AM 0x2BD8, 0x0010
Expand All @@ -13795,20 +13798,20 @@
#define F_4E_PLT_TACAN_VOLUME 0x2BD6, 0xFFFF, 0
#define F_4E_PLT_TACAN_VOLUME_A 0x2BD6
#define F_4E_PLT_TAS_A 0x2BA8
#define F_4E_PLT_THROTTLE_CM_DISPENSE 0x2D7C, 0x2000, 13
#define F_4E_PLT_THROTTLE_CM_DISPENSE_AM 0x2D7C, 0x2000
#define F_4E_PLT_THROTTLE_DETENT_L 0x2D7C, 0x4000, 14
#define F_4E_PLT_THROTTLE_DETENT_L_AM 0x2D7C, 0x4000
#define F_4E_PLT_THROTTLE_DETENT_R 0x2D7C, 0x8000, 15
#define F_4E_PLT_THROTTLE_DETENT_R_AM 0x2D7C, 0x8000
#define F_4E_PLT_THROTTLE_IGNITION_L 0x2D78, 0x4000, 14
#define F_4E_PLT_THROTTLE_IGNITION_L_AM 0x2D78, 0x4000
#define F_4E_PLT_THROTTLE_IGNITION_R 0x2D78, 0x8000, 15
#define F_4E_PLT_THROTTLE_IGNITION_R_AM 0x2D78, 0x8000
#define F_4E_PLT_THROTTLE_MIC 0x2D7C, 0x0C00, 10
#define F_4E_PLT_THROTTLE_SPEED_BRAKE 0x2D7C, 0x0300, 8
#define F_4E_PLT_THROTTLE_WPN_CAGE 0x2D7C, 0x1000, 12
#define F_4E_PLT_THROTTLE_WPN_CAGE_AM 0x2D7C, 0x1000
#define F_4E_PLT_THROTTLE_CM_DISPENSE 0x2D8E, 0x0200, 9
#define F_4E_PLT_THROTTLE_CM_DISPENSE_AM 0x2D8E, 0x0200
#define F_4E_PLT_THROTTLE_DETENT_L 0x2D8E, 0x0400, 10
#define F_4E_PLT_THROTTLE_DETENT_L_AM 0x2D8E, 0x0400
#define F_4E_PLT_THROTTLE_DETENT_R 0x2D8E, 0x0800, 11
#define F_4E_PLT_THROTTLE_DETENT_R_AM 0x2D8E, 0x0800
#define F_4E_PLT_THROTTLE_IGNITION_L 0x2D7C, 0x0400, 10
#define F_4E_PLT_THROTTLE_IGNITION_L_AM 0x2D7C, 0x0400
#define F_4E_PLT_THROTTLE_IGNITION_R 0x2D7C, 0x0800, 11
#define F_4E_PLT_THROTTLE_IGNITION_R_AM 0x2D7C, 0x0800
#define F_4E_PLT_THROTTLE_MIC 0x2D7C, 0xC000, 14
#define F_4E_PLT_THROTTLE_SPEED_BRAKE 0x2D7C, 0x3000, 12
#define F_4E_PLT_THROTTLE_WPN_CAGE 0x2D8E, 0x0100, 8
#define F_4E_PLT_THROTTLE_WPN_CAGE_AM 0x2D8E, 0x0100
#define F_4E_PLT_TURN_BALL 0x2B56, 0xFFFF, 0
#define F_4E_PLT_TURN_BALL_A 0x2B56
#define F_4E_PLT_TURN_INDICATOR 0x2B58, 0xFFFF, 0
Expand Down Expand Up @@ -14548,10 +14551,13 @@
#define F_4E_WSO_RWR_UNKNOWN_LIGHT_BOT_AM 0x2CE2, 0x0100
#define F_4E_WSO_RWR_UNKNOWN_LIGHT_TOP 0x2CE2, 0x0080, 7
#define F_4E_WSO_RWR_UNKNOWN_LIGHT_TOP_AM 0x2CE2, 0x0080
#define F_4E_WSO_STICK_AFCS_EMERGENCY_RELEASE 0x2D78, 0x2000, 13
#define F_4E_WSO_STICK_AFCS_EMERGENCY_RELEASE_AM 0x2D78, 0x2000
#define F_4E_WSO_STICK_NWS 0x2D78, 0x1000, 12
#define F_4E_WSO_STICK_NWS_AM 0x2D78, 0x1000
#define F_4E_WSO_SEAT_ADJUST 0x2D78, 0x1800, 11
#define F_4E_WSO_SEAT_HEIGHT 0x2D92, 0xFFFF, 0
#define F_4E_WSO_SEAT_HEIGHT_A 0x2D92
#define F_4E_WSO_STICK_AFCS_EMERGENCY_RELEASE 0x2D7C, 0x0200, 9
#define F_4E_WSO_STICK_AFCS_EMERGENCY_RELEASE_AM 0x2D7C, 0x0200
#define F_4E_WSO_STICK_NWS 0x2D7C, 0x0100, 8
#define F_4E_WSO_STICK_NWS_AM 0x2D7C, 0x0100
#define F_4E_WSO_TACAN_CHANNEL_A 0x2BE4
#define F_4E_WSO_TACAN_COMMAND_LIGHT 0x2BE2, 0x0010, 4
#define F_4E_WSO_TACAN_COMMAND_LIGHT_AM 0x2BE2, 0x0010
Expand Down Expand Up @@ -14615,8 +14621,8 @@
#define F_4E_WSO_TGT_DESIGNATOR_STOW_AM 0x2C5C, 0x0002
#define F_4E_WSO_TGT_DESIGNATOR_WRCS_OUT 0x2C5C, 0x0100, 8
#define F_4E_WSO_TGT_DESIGNATOR_WRCS_OUT_AM 0x2C5C, 0x0100
#define F_4E_WSO_THROTTLE_MIC 0x2D8E, 0x0C00, 10
#define F_4E_WSO_THROTTLE_SPEED_BRAKE 0x2D8E, 0x0300, 8
#define F_4E_WSO_THROTTLE_MIC 0x2D8E, 0xC000, 14
#define F_4E_WSO_THROTTLE_SPEED_BRAKE 0x2D8E, 0x3000, 12
#define F_4E_WSO_TURN_BALL 0x2B5A, 0xFFFF, 0
#define F_4E_WSO_TURN_BALL_A 0x2B5A
#define F_4E_WSO_TURN_INDICATOR 0x2B5C, 0xFFFF, 0
Expand Down
16 changes: 15 additions & 1 deletion Scripts/DCS-BIOS/lib/modules/aircraft_modules/F-4E.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,21 @@ F_4E:defineToggleSwitch("WSO_GREASE_PENCIL", GREASE_PENCIL_DEVICE_ID, 3003, 3037
-- local CIRCUIT_BREAKERS_DEVICE_ID = 84

-- Seat
-- local SEAT_DEVICE_ID = 85
local SEAT_DEVICE_ID = 85

-- Pilot Seat
local PILOT_SEAT = "PLT Seat"

F_4E:defineSpringloaded_3PosTumb("PLT_SEAT_ADJUST", SEAT_DEVICE_ID, 3001, 3001, 3041, PILOT_SEAT, "Change Seat Position")
F_4E:defineFullRangeFloat("PLT_SEAT_HEIGHT", 3042, PILOT_SEAT, "Seat Height")

-- WSO Seat
local WSO_SEAT = "WSO Seat"

F_4E:defineSpringloaded_3PosTumb("WSO_SEAT_ADJUST", SEAT_DEVICE_ID, 3002, 3002, 3043, WSO_SEAT, "Change Seat Position")
F_4E:defineFullRangeFloat("WSO_SEAT_HEIGHT", 3044, WSO_SEAT, "Seat Height")

-- todo: seat pos draw arg

-- ECM
-- local ECM_DEVICE_ID = 91
Expand Down

0 comments on commit e452df5

Please sign in to comment.