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

Request: support for F-5E module; G-meter and fuel qty gauge #33

Open
Bagger13 opened this issue Sep 18, 2023 · 1 comment
Open

Request: support for F-5E module; G-meter and fuel qty gauge #33

Bagger13 opened this issue Sep 18, 2023 · 1 comment

Comments

@Bagger13
Copy link

I want to develop support for the F-5E module. I managed to add a "profile" for the F-5E and get it working following the guidance provided.

I would like to display aircraft G, and fuel qty as shown in the cockpit gauge but totalized (L and R quantities added together, and shown in LBS).

Any advice on where to start? I have zero coding skills, but willing to learn enough lua to make this work.

@Bagger13 Bagger13 changed the title Support for F-5E module; G-meter and fuel qty gauge Request: support for F-5E module; G-meter and fuel qty gauge Sep 18, 2023
@llamaXc
Copy link
Owner

llamaXc commented Sep 18, 2023

Hey, message me on discord and happy to help more in-depth: @papiplanes on discord, I also have a discord channel you can find it at papiplanes.com and I can help in there as well!

If you have a working profile and are able to show the default text from the example, then this should help you make some progress, I have not ran this code so there might be errors, but in general it will look likt this.

local ufcUtils = require("ufcPatch\\utilities\\ufcPatchUtils")

ufcPatchCustomModuleExample = {}


function ufcPatchCustomModuleExample.generateUFCData()
    log.write("WWT", log.INFO, "Trying to load F-5E example")

    -- Good help file with examples
    -- https://wiki.hoggitworld.com/view/DCS_Export_Script

    -- This might be a percent in the F5, might be in KG, or in LBS, might need to do some testing
    local Fuelpercentage = "F" .. string.format("%03d", math.floor(LoGetEngineInfo().fuel_internal * 100))

    -- This in the G
    local GAcceleration = "G: "..LoGetAccelerationUnits().y


    return ufcUtils.buildSimAppProUFCPayload({
        option1=GAcceleration,
        option2=Fuelpercentage,
        option3="---",
        option4="---",
        option5="F-5E",
        scratchPadNumbers="",
        scratchPadString1="",
        scratchPadString2="",
        com1="",
        com2="",
        selectedWindows={}
    })
end

return ufcPatchCustomModuleExample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants