Skip to content

Commit

Permalink
F-4E: Add Grease Pencil Device (#814)
Browse files Browse the repository at this point in the history
Fixes #643
  • Loading branch information
charliefoxtwo authored Jul 7, 2024
1 parent 98d0065 commit 11914e3
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 35 deletions.
72 changes: 38 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, 0x1000, 12
#define F_4E_PLT_COCKPIT_PRESSURE_EMERGENCY_RELEASE_AM 0x2D8E, 0x1000
#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_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 0x2D90, 0xFFFF, 0
#define F_4E_PLT_EXT_LIGHT_FORMATION_BRIGHTNESS_A 0x2D90
#define F_4E_PLT_EXT_LIGHT_FORMATION_MODE 0x2D8E, 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_TAIL_BRIGHTNESS 0x2CF4, 0x0003, 0
#define F_4E_PLT_EXT_LIGHT_TAXI_LAND 0x2D8E, 0x0C00, 10
#define F_4E_PLT_EXT_LIGHT_TAXI_LAND 0x2D8E, 0x3000, 12
#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 @@ -13425,6 +13425,8 @@
#define F_4E_PLT_GEAR_LEVER_LIGHT_AM 0x2A8A, 0x8000
#define F_4E_PLT_GEAR_WHEELS_LIGHT 0x2AA2, 0x0100, 8
#define F_4E_PLT_GEAR_WHEELS_LIGHT_AM 0x2AA2, 0x0100
#define F_4E_PLT_GREASE_PENCIL 0x2D50, 0x8000, 15
#define F_4E_PLT_GREASE_PENCIL_AM 0x2D50, 0x8000
#define F_4E_PLT_HSI_BEARING_POINTER 0x2BEE, 0xFFFF, 0
#define F_4E_PLT_HSI_BEARING_POINTER_A 0x2BEE
#define F_4E_PLT_HSI_COMPASS_ROTATION 0x2BEC, 0xFFFF, 0
Expand Down Expand Up @@ -13589,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, 0x2000, 13
#define F_4E_PLT_PITOT_HEAT_AM 0x2D8E, 0x2000
#define F_4E_PLT_PITOT_HEAT 0x2D8E, 0x8000, 15
#define F_4E_PLT_PITOT_HEAT_AM 0x2D8E, 0x8000
#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 @@ -13768,12 +13770,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, 0x0200, 9
#define F_4E_PLT_STICK_AFCS_EMERGENCY_RELEASE_AM 0x2D78, 0x0200
#define F_4E_PLT_STICK_AIR_REFUEL_RELEASE 0x2D50, 0x8000, 15
#define F_4E_PLT_STICK_AIR_REFUEL_RELEASE_AM 0x2D50, 0x8000
#define F_4E_PLT_STICK_NWS 0x2D78, 0x0100, 8
#define F_4E_PLT_STICK_NWS_AM 0x2D78, 0x0100
#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_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 @@ -13793,20 +13795,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, 0x0800, 11
#define F_4E_PLT_THROTTLE_CM_DISPENSE_AM 0x2D7C, 0x0800
#define F_4E_PLT_THROTTLE_DETENT_L 0x2D7C, 0x1000, 12
#define F_4E_PLT_THROTTLE_DETENT_L_AM 0x2D7C, 0x1000
#define F_4E_PLT_THROTTLE_DETENT_R 0x2D7C, 0x2000, 13
#define F_4E_PLT_THROTTLE_DETENT_R_AM 0x2D7C, 0x2000
#define F_4E_PLT_THROTTLE_IGNITION_L 0x2D78, 0x1000, 12
#define F_4E_PLT_THROTTLE_IGNITION_L_AM 0x2D78, 0x1000
#define F_4E_PLT_THROTTLE_IGNITION_R 0x2D78, 0x2000, 13
#define F_4E_PLT_THROTTLE_IGNITION_R_AM 0x2D78, 0x2000
#define F_4E_PLT_THROTTLE_MIC 0x2D7C, 0x0300, 8
#define F_4E_PLT_THROTTLE_SPEED_BRAKE 0x2D78, 0xC000, 14
#define F_4E_PLT_THROTTLE_WPN_CAGE 0x2D7C, 0x0400, 10
#define F_4E_PLT_THROTTLE_WPN_CAGE_AM 0x2D7C, 0x0400
#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_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 @@ -14263,6 +14265,8 @@
#define F_4E_WSO_GEAR_INDICATOR_LEFT 0x2AA6, 0x3000, 12
#define F_4E_WSO_GEAR_INDICATOR_NOSE 0x2AA6, 0xC000, 14
#define F_4E_WSO_GEAR_INDICATOR_RIGHT 0x2AAA, 0x0300, 8
#define F_4E_WSO_GREASE_PENCIL 0x2D78, 0x0100, 8
#define F_4E_WSO_GREASE_PENCIL_AM 0x2D78, 0x0100
#define F_4E_WSO_GSI_A 0x2BC6
#define F_4E_WSO_ICS_AMPLIFIER 0x2A0E, 0x0003, 0
#define F_4E_WSO_ICS_INTERCOM_VOL 0x2A0C, 0xFFFF, 0
Expand Down Expand Up @@ -14544,10 +14548,10 @@
#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, 0x0800, 11
#define F_4E_WSO_STICK_AFCS_EMERGENCY_RELEASE_AM 0x2D78, 0x0800
#define F_4E_WSO_STICK_NWS 0x2D78, 0x0400, 10
#define F_4E_WSO_STICK_NWS_AM 0x2D78, 0x0400
#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_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 @@ -14611,8 +14615,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, 0x0300, 8
#define F_4E_WSO_THROTTLE_SPEED_BRAKE 0x2D7C, 0xC000, 14
#define F_4E_WSO_THROTTLE_MIC 0x2D8E, 0x0C00, 10
#define F_4E_WSO_THROTTLE_SPEED_BRAKE 0x2D8E, 0x0300, 8
#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
12 changes: 11 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 @@ -2163,7 +2163,17 @@ F_4E:defineInputOnlyPushButton("WSO_JESTER_OPTION_RIGHT", JESTER_WHEEL_DEVICE_ID
F_4E:defineInputOnlyPushButton("WSO_JESTER_UI_ACTION", JESTER_WHEEL_DEVICE_ID, 3152, WSO_JESTER_WHEEL, "Jester UI Action (short, hold)")

-- Grease Pencil
-- local GREASE_PENCIL_DEVICE_ID = 82
local GREASE_PENCIL_DEVICE_ID = 82

-- Pilot Grease Pencil
local PILOT_GREASE_PENCIL = "PLT Grease Pencil"

F_4E:defineToggleSwitch("PLT_GREASE_PENCIL", GREASE_PENCIL_DEVICE_ID, 3001, 3036, PILOT_GREASE_PENCIL, "Hide/Show Grease Pencil")

-- WSO Grease Pencil
local WSO_GREASE_PENCIL = "WSO Grease Pencil"

F_4E:defineToggleSwitch("WSO_GREASE_PENCIL", GREASE_PENCIL_DEVICE_ID, 3003, 3037, WSO_GREASE_PENCIL, "Hide/Show Grease Pencil")

-- Circuit Breakers
-- local CIRCUIT_BREAKERS_DEVICE_ID = 84
Expand Down

0 comments on commit 11914e3

Please sign in to comment.