Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OH-58D: Add TGT/TRQ Indicator #871

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions Scripts/DCS-BIOS/doc/Addresses.h
Original file line number Diff line number Diff line change
Expand Up @@ -29765,6 +29765,118 @@
#define OH_58D_SCAS_TEST_AM 0x8A4E, 0x0008
#define OH_58D_SCAS_YAW 0x8A4E, 0x0002, 1
#define OH_58D_SCAS_YAW_AM 0x8A4E, 0x0002
#define OH_58D_TGT_1 0x8BD6, 0xFFFF, 0
#define OH_58D_TGT_10 0x8BE8, 0xFFFF, 0
#define OH_58D_TGT_10_A 0x8BE8
#define OH_58D_TGT_11 0x8BEA, 0xFFFF, 0
#define OH_58D_TGT_11_A 0x8BEA
#define OH_58D_TGT_12 0x8BEC, 0xFFFF, 0
#define OH_58D_TGT_12_A 0x8BEC
#define OH_58D_TGT_13 0x8BEE, 0xFFFF, 0
#define OH_58D_TGT_13_A 0x8BEE
#define OH_58D_TGT_14 0x8BF0, 0xFFFF, 0
#define OH_58D_TGT_14_A 0x8BF0
#define OH_58D_TGT_15 0x8BF2, 0xFFFF, 0
#define OH_58D_TGT_15_A 0x8BF2
#define OH_58D_TGT_16 0x8BF4, 0xFFFF, 0
#define OH_58D_TGT_16_A 0x8BF4
#define OH_58D_TGT_17 0x8BF6, 0xFFFF, 0
#define OH_58D_TGT_17_A 0x8BF6
#define OH_58D_TGT_18 0x8BF8, 0xFFFF, 0
#define OH_58D_TGT_18_A 0x8BF8
#define OH_58D_TGT_19 0x8BFA, 0xFFFF, 0
#define OH_58D_TGT_19_A 0x8BFA
#define OH_58D_TGT_1_A 0x8BD6
#define OH_58D_TGT_2 0x8BD8, 0xFFFF, 0
#define OH_58D_TGT_20 0x8BFC, 0xFFFF, 0
#define OH_58D_TGT_20_A 0x8BFC
#define OH_58D_TGT_21 0x8BFE, 0xFFFF, 0
#define OH_58D_TGT_21_A 0x8BFE
#define OH_58D_TGT_22 0x8C00, 0xFFFF, 0
#define OH_58D_TGT_22_A 0x8C00
#define OH_58D_TGT_23 0x8C02, 0xFFFF, 0
#define OH_58D_TGT_23_A 0x8C02
#define OH_58D_TGT_24 0x8C04, 0xFFFF, 0
#define OH_58D_TGT_24_A 0x8C04
#define OH_58D_TGT_25 0x8C06, 0xFFFF, 0
#define OH_58D_TGT_25_A 0x8C06
#define OH_58D_TGT_26 0x8C08, 0xFFFF, 0
#define OH_58D_TGT_26_A 0x8C08
#define OH_58D_TGT_27 0x8C0A, 0xFFFF, 0
#define OH_58D_TGT_27_A 0x8C0A
#define OH_58D_TGT_2_A 0x8BD8
#define OH_58D_TGT_3 0x8BDA, 0xFFFF, 0
#define OH_58D_TGT_3_A 0x8BDA
#define OH_58D_TGT_4 0x8BDC, 0xFFFF, 0
#define OH_58D_TGT_4_A 0x8BDC
#define OH_58D_TGT_5 0x8BDE, 0xFFFF, 0
#define OH_58D_TGT_5_A 0x8BDE
#define OH_58D_TGT_6 0x8BE0, 0xFFFF, 0
#define OH_58D_TGT_6_A 0x8BE0
#define OH_58D_TGT_7 0x8BE2, 0xFFFF, 0
#define OH_58D_TGT_7_A 0x8BE2
#define OH_58D_TGT_8 0x8BE4, 0xFFFF, 0
#define OH_58D_TGT_8_A 0x8BE4
#define OH_58D_TGT_9 0x8BE6, 0xFFFF, 0
#define OH_58D_TGT_9_A 0x8BE6
#define OH_58D_TGT_DISPLAY_A 0x8BCE
#define OH_58D_TRQ_1 0x8C0C, 0xFFFF, 0
#define OH_58D_TRQ_10 0x8C1E, 0xFFFF, 0
#define OH_58D_TRQ_10_A 0x8C1E
#define OH_58D_TRQ_11 0x8C20, 0xFFFF, 0
#define OH_58D_TRQ_11_A 0x8C20
#define OH_58D_TRQ_12 0x8C22, 0xFFFF, 0
#define OH_58D_TRQ_12_A 0x8C22
#define OH_58D_TRQ_13 0x8C24, 0xFFFF, 0
#define OH_58D_TRQ_13_A 0x8C24
#define OH_58D_TRQ_14 0x8C26, 0xFFFF, 0
#define OH_58D_TRQ_14_A 0x8C26
#define OH_58D_TRQ_15 0x8C28, 0xFFFF, 0
#define OH_58D_TRQ_15_A 0x8C28
#define OH_58D_TRQ_16 0x8C2A, 0xFFFF, 0
#define OH_58D_TRQ_16_A 0x8C2A
#define OH_58D_TRQ_17 0x8C2C, 0xFFFF, 0
#define OH_58D_TRQ_17_A 0x8C2C
#define OH_58D_TRQ_18 0x8C2E, 0xFFFF, 0
#define OH_58D_TRQ_18_A 0x8C2E
#define OH_58D_TRQ_19 0x8C30, 0xFFFF, 0
#define OH_58D_TRQ_19_A 0x8C30
#define OH_58D_TRQ_1_A 0x8C0C
#define OH_58D_TRQ_2 0x8C0E, 0xFFFF, 0
#define OH_58D_TRQ_20 0x8C32, 0xFFFF, 0
#define OH_58D_TRQ_20_A 0x8C32
#define OH_58D_TRQ_21 0x8C34, 0xFFFF, 0
#define OH_58D_TRQ_21_A 0x8C34
#define OH_58D_TRQ_22 0x8C36, 0xFFFF, 0
#define OH_58D_TRQ_22_A 0x8C36
#define OH_58D_TRQ_23 0x8C38, 0xFFFF, 0
#define OH_58D_TRQ_23_A 0x8C38
#define OH_58D_TRQ_24 0x8C3A, 0xFFFF, 0
#define OH_58D_TRQ_24_A 0x8C3A
#define OH_58D_TRQ_25 0x8C3C, 0xFFFF, 0
#define OH_58D_TRQ_25_A 0x8C3C
#define OH_58D_TRQ_26 0x8C3E, 0xFFFF, 0
#define OH_58D_TRQ_26_A 0x8C3E
#define OH_58D_TRQ_27 0x8C40, 0xFFFF, 0
#define OH_58D_TRQ_27_A 0x8C40
#define OH_58D_TRQ_28 0x8C42, 0xFFFF, 0
#define OH_58D_TRQ_28_A 0x8C42
#define OH_58D_TRQ_2_A 0x8C0E
#define OH_58D_TRQ_3 0x8C10, 0xFFFF, 0
#define OH_58D_TRQ_3_A 0x8C10
#define OH_58D_TRQ_4 0x8C12, 0xFFFF, 0
#define OH_58D_TRQ_4_A 0x8C12
#define OH_58D_TRQ_5 0x8C14, 0xFFFF, 0
#define OH_58D_TRQ_5_A 0x8C14
#define OH_58D_TRQ_6 0x8C16, 0xFFFF, 0
#define OH_58D_TRQ_6_A 0x8C16
#define OH_58D_TRQ_7 0x8C18, 0xFFFF, 0
#define OH_58D_TRQ_7_A 0x8C18
#define OH_58D_TRQ_8 0x8C1A, 0xFFFF, 0
#define OH_58D_TRQ_8_A 0x8C1A
#define OH_58D_TRQ_9 0x8C1C, 0xFFFF, 0
#define OH_58D_TRQ_9_A 0x8C1C
#define OH_58D_TRQ_DISPLAY_A 0x8BD2
#define P_47D_3GAUGE_FUEL_PRESS 0x527C, 0xFFFF, 0
#define P_47D_3GAUGE_FUEL_PRESS_A 0x527C
#define P_47D_3GAUGE_OIL_PRESS 0x527A, 0xFFFF, 0
Expand Down
83 changes: 80 additions & 3 deletions Scripts/DCS-BIOS/lib/modules/aircraft_modules/OH-58D.lua
Original file line number Diff line number Diff line change
Expand Up @@ -765,10 +765,87 @@ OH_58D:defineLadderChiclet("RPM_NP_31", NP_RPM, 30, RPM_SCALE, NP_RPM_DESCRIPTIO
OH_58D:defineLadderChiclet("RPM_NP_32", NP_RPM, 31, RPM_SCALE, NP_RPM_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("RPM_NP_33", NP_RPM, 32, RPM_SCALE, NP_RPM_DESCRIPTION, "red")

-- indication 2 (also tgt/trq)

-- TGT/TRQ Indicator
-- local TGT_TRQ = "TGT/TRQ Indicator"
local TGT_TRQ = "TGT/TRQ Indicator"

local tgt_trq = {}

OH_58D:addExportHook(function(_)
tgt_trq = Module.parse_indication(2)
end)

OH_58D:defineString("TGT_DISPLAY", function(_)
return Functions.pad_left(tgt_trq["TGTDisplay"], 3)
end, 3, TGT_TRQ, "TGT Display")

OH_58D:defineString("TRQ_DISPLAY", function(_)
return Functions.pad_left(tgt_trq["TRQDisplay"], 3)
end, 3, TGT_TRQ, "TRQ Display")

-- TGT
local TGT = "TGT"
local TGT_DESCRIPTION = "TGT"

OH_58D:defineLadderChiclet("TGT_1", TGT, 0, TGT_TRQ, TGT_DESCRIPTION, "blue")
OH_58D:defineLadderChiclet("TGT_2", TGT, 1, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_3", TGT, 2, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_4", TGT, 3, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_5", TGT, 4, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_6", TGT, 5, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_7", TGT, 6, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_8", TGT, 7, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_9", TGT, 8, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_10", TGT, 9, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_11", TGT, 10, TGT_TRQ, TGT_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TGT_12", TGT, 11, TGT_TRQ, TGT_DESCRIPTION, "yellow")
OH_58D:defineLadderChiclet("TGT_13", TGT, 12, TGT_TRQ, TGT_DESCRIPTION, "yellow")
OH_58D:defineLadderChiclet("TGT_14", TGT, 13, TGT_TRQ, TGT_DESCRIPTION, "yellow")
OH_58D:defineLadderChiclet("TGT_15", TGT, 14, TGT_TRQ, TGT_DESCRIPTION, "yellow")
OH_58D:defineLadderChiclet("TGT_16", TGT, 15, TGT_TRQ, TGT_DESCRIPTION, "yellow")
OH_58D:defineLadderChiclet("TGT_17", TGT, 16, TGT_TRQ, TGT_DESCRIPTION, "yellow")
OH_58D:defineLadderChiclet("TGT_18", TGT, 17, TGT_TRQ, TGT_DESCRIPTION, "yellow")
OH_58D:defineLadderChiclet("TGT_19", TGT, 18, TGT_TRQ, TGT_DESCRIPTION, "yellow")
OH_58D:defineLadderChiclet("TGT_20", TGT, 19, TGT_TRQ, TGT_DESCRIPTION, "yellow")
OH_58D:defineLadderChiclet("TGT_21", TGT, 20, TGT_TRQ, TGT_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TGT_22", TGT, 21, TGT_TRQ, TGT_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TGT_23", TGT, 22, TGT_TRQ, TGT_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TGT_24", TGT, 23, TGT_TRQ, TGT_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TGT_25", TGT, 24, TGT_TRQ, TGT_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TGT_26", TGT, 25, TGT_TRQ, TGT_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TGT_27", TGT, 26, TGT_TRQ, TGT_DESCRIPTION, "red")

-- TRQ
local TRQ = "TRQ"
local TRQ_DESCRIPTION = "TRQ"

OH_58D:defineLadderChiclet("TRQ_1", TRQ, 0, TGT_TRQ, TRQ_DESCRIPTION, "blue")
OH_58D:defineLadderChiclet("TRQ_2", TRQ, 1, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_3", TRQ, 2, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_4", TRQ, 3, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_5", TRQ, 4, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_6", TRQ, 5, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_7", TRQ, 6, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_8", TRQ, 7, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_9", TRQ, 8, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_10", TRQ, 9, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_11", TRQ, 10, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_12", TRQ, 11, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_13", TRQ, 12, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_14", TRQ, 13, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_15", TRQ, 14, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_16", TRQ, 15, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_17", TRQ, 16, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_18", TRQ, 17, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_19", TRQ, 18, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_20", TRQ, 19, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_21", TRQ, 20, TGT_TRQ, TRQ_DESCRIPTION, "green")
OH_58D:defineLadderChiclet("TRQ_22", TRQ, 21, TGT_TRQ, TRQ_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TRQ_23", TRQ, 22, TGT_TRQ, TRQ_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TRQ_24", TRQ, 23, TGT_TRQ, TRQ_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TRQ_25", TRQ, 24, TGT_TRQ, TRQ_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TRQ_26", TRQ, 25, TGT_TRQ, TRQ_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TRQ_27", TRQ, 26, TGT_TRQ, TRQ_DESCRIPTION, "red")
OH_58D:defineLadderChiclet("TRQ_28", TRQ, 27, TGT_TRQ, TRQ_DESCRIPTION, "red")

-- Pilot MPD
-- local MPD_PILOT = "MPD (Pilot)"
Expand Down
Loading