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

FC3 migration to Module #276

Merged
merged 10 commits into from
Sep 30, 2023
Merged

FC3 migration to Module #276

merged 10 commits into from
Sep 30, 2023

Conversation

jdahlblom
Copy link
Contributor

No description provided.

Scripts/DCS-BIOS/lib/modules/aircraft_modules/FC3.lua Outdated Show resolved Hide resolved
Scripts/DCS-BIOS/lib/modules/aircraft_modules/FC3.lua Outdated Show resolved Hide resolved
Scripts/DCS-BIOS/lib/modules/Module.lua Outdated Show resolved Hide resolved
@@ -98,6 +98,29 @@ function Module:defineFloat(identifier, arg_number, limits, category, descriptio
return control
end

function Module:define8BitFloatFromGetter(identifier, func, limits, category, description)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to add documentation, and also tests for any new control

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you be adding tests to ModuleTests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I will try.

Scripts/DCS-BIOS/lib/modules/aircraft_modules/FC3.lua Outdated Show resolved Hide resolved
Copy link
Member

@charliefoxtwo charliefoxtwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should really get the define8BitFloatFromGetter added to the module tests before merging this so we can make sure it's tested and correct.

@jdahlblom
Copy link
Contributor Author

We should really get the define8BitFloatFromGetter added to the module tests before merging this so we can make sure it's tested and correct.

OK. So that is quite a lot of work isn't it?

@charliefoxtwo
Copy link
Member

It should be really similar to the tests for defineIntegerFromGetter. Check out IntegerFromGetterTests.lua

FC3 added to test suite
Test pattern for module name changed to allow _UPDATE_COUNTER
Module:define8BitFloatFromGetter documented
Removed old code remnant from Module
DCS_API* files list_indication documentation corrected
@jdahlblom
Copy link
Contributor Author

I see these changes in FC3 json because of the new define8BitFloatFromGetter(). I flew master and this and the values all seems to work. Compared them when on runway also.

fc3

@charliefoxtwo
Copy link
Member

I see these changes in FC3 json because of the new define8BitFloatFromGetter(). I flew master and this and the values all seems to work. Compared them when on runway also.

Good catch. I wasn't aware of the value_range field in the json. We should look at what that's actually for. If that's the dcs output, then it doesn't really serve any value and we can remove it.

@jdahlblom
Copy link
Contributor Author

We should really get the define8BitFloatFromGetter added to the module tests before merging this so we can make sure it's tested and correct.

Done!

charliefoxtwo
charliefoxtwo previously approved these changes Sep 30, 2023
Copy link
Member

@charliefoxtwo charliefoxtwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor opportunities to clean things up a bit more, but otherwise looks good!

Scripts/DCS-BIOS/lib/modules/aircraft_modules/FC3.lua Outdated Show resolved Hide resolved
Scripts/DCS-BIOS/lib/modules/aircraft_modules/FC3.lua Outdated Show resolved Hide resolved
Scripts/DCS-BIOS/lib/modules/aircraft_modules/FC3.lua Outdated Show resolved Hide resolved
@jdahlblom jdahlblom merged commit bfaaae5 into DCS-Skunkworks:master Sep 30, 2023
@jdahlblom jdahlblom deleted the fc3-migration branch September 30, 2023 18:49
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

Successfully merging this pull request may close these issues.

2 participants