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 AH-64D.lua #335

Merged
merged 1 commit into from
Oct 3, 2023
Merged
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
20 changes: 10 additions & 10 deletions Scripts/DCS-BIOS/lib/modules/aircraft_modules/AH-64D.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module("AH-64D", package.seeall)
local Functions = require("Functions")
local JSONHelper = require("JSONHelper")
local Module = require("Module")
local functions = require("Functions")
local json = require("JSONHelper")

--- @class AH_64D: Module
local AH_64D = Module:new("AH-64D", 0x8000, { "AH-64D_BLK_II" })
Expand Down Expand Up @@ -30,7 +30,7 @@ local function parse_ku(indicator_id)
if not ku then
return ""
end
return functions.coerce_nil_to_string(ku.Standby_text)
return Functions.coerce_nil_to_string(ku.Standby_text)
end

--MPD Left
Expand Down Expand Up @@ -397,7 +397,7 @@ AH_64D:defineString("CPG_KU_DISPLAY", function()
end, 22, "CPG Keyboard Unit", "Gunner Keyboard Unit Display")

-- Enhanced Up-Front Display
local eufd_indicator_data = json.decode_from_file(lfs.writedir() .. [[Scripts/DCS-BIOS/src/json/AH-64D_EUFD.json]])
local eufd_indicator_data = JSONHelper.decode_from_file(lfs.writedir() .. [[Scripts/DCS-BIOS/src/json/AH-64D_EUFD.json]])
local LINE_LEN = 56

local function parse_eufd(indicator_id)
Expand Down Expand Up @@ -828,8 +828,8 @@ AH_64D:addExportHook(function()

if is_test_page then
cmws_page = "TEST"
bit_line_1 = functions.coerce_nil_to_string(cmws["#42#"])
bit_line_2 = functions.coerce_nil_to_string(cmws["#43#"])
bit_line_1 = Functions.coerce_nil_to_string(cmws["#42#"])
bit_line_2 = Functions.coerce_nil_to_string(cmws["#43#"])

-- these values are all guesses
d_light_dim = nil_state_to_int_flag(cmws["#45#"])
Expand All @@ -840,10 +840,10 @@ AH_64D:addExportHook(function()
fwd_right_sector_dim = nil_state_to_int_flag(cmws["#9#"])
else
cmws_page = "MAIN"
flare_letter = functions.coerce_nil_to_string(cmws["#83#"])
chaff_letter = functions.coerce_nil_to_string(cmws["#84#"])
flare_count = functions.coerce_nil_to_string(cmws["#85#"])
chaff_count = functions.coerce_nil_to_string(cmws["#86#"])
flare_letter = Functions.coerce_nil_to_string(cmws["#83#"])
chaff_letter = Functions.coerce_nil_to_string(cmws["#84#"])
flare_count = Functions.coerce_nil_to_string(cmws["#85#"])
chaff_count = Functions.coerce_nil_to_string(cmws["#86#"])
d_light_bright = nil_state_to_int_flag(cmws["#88#"])
d_light_dim = nil_state_to_int_flag(cmws["#90#"])
r_light_bright = nil_state_to_int_flag(cmws["#87#"])
Expand Down
Loading