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

Update f18Functions.lua #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
23 changes: 13 additions & 10 deletions dcs-dtc/DCS/DCSDTC/f18Functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ end

function DTC_FA18C_ExecCmd_UnSelectStore(device, b1, b2, b3, b4, b5, delay, act)
local table = DTC_GetDisplay(2)
local button1Selected = table["_1__id:134.2.BP_6_Break_X_Root.1"]
local button2Selected = table["_1__id:137.2.BP_7_Break_X_Root.1"]
local button3Selected = table["_1__id:140.2.BP_8_Break_X_Root.1"]
local button4Selected = table["_1__id:143.2.BP_9_Break_X_Root.1"]
local button5Selected = table["_1__id:146.2.BP_10_Break_X_Root.1"]
local button1Selected = table["_1__id:136.2.BP_6_Break_X_Root.1"]
local button2Selected = table["_1__id:139.2.BP_7_Break_X_Root.1"]
local button3Selected = table["_1__id:142.2.BP_8_Break_X_Root.1"]
local button4Selected = table["_1__id:145.2.BP_9_Break_X_Root.1"]
local button5Selected = table["_1__id:148.2.BP_10_Break_X_Root.1"]

if button1Selected == "" then
DTC_ExecCommand(device, b1, delay, act)
Expand All @@ -440,15 +440,18 @@ function DTC_FA18C_ExecCmd_SelectStore(store, device, b1, b2, b3, b4, b5, delay,
DTC_Wait()

local table = DTC_GetDisplay(2)
local sta2 = table["_1__id:134.1"] or "";
local sta3 = table["_1__id:137.1"] or "";
local sta7 = table["_1__id:143.1"] or "";
local sta8 = table["_1__id:146.1"] or "";
local sta2 = table["_1__id:136.1"] or "";
local sta3 = table["_1__id:139.1"] or "";
local sta5 = table["_1__id:142.1"] or "";
local sta7 = table["_1__id:145.1"] or "";
local sta8 = table["_1__id:148.1"] or "";

if sta2 == store then
DTC_ExecCommand(device, b1, delay, act)
elseif sta3 == store then
DTC_ExecCommand(device, b2, delay, act)
elseif sta5 == store then
DTC_ExecCommand(device, b3, delay, act)
elseif sta7 == store then
DTC_ExecCommand(device, b4, delay, act)
elseif sta8 == store then
Expand Down Expand Up @@ -610,4 +613,4 @@ function DTC_FA18C_AfterNextFrame(params)
if ipButton == 1 then params["uploadCommand"] = "1" end
if hudVideoSwitch >= 0.2 then params["showDTCCommand"] = "1" end
if hudVideoSwitch > 0 and hudVideoSwitch < 0.2 then params["hideDTCCommand"] = "1" end
end
end