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

Mi-24P: Fix ALT_SHUTTER controls out of range #803

Conversation

charliefoxtwo
Copy link
Member

Fixes #791

This control maps a range from dcs of { 0.822, 0.75 } to our {0, 65535}. This means we're mapping floats within a span of 0.072 to a span of 65535 - meaning every increment of one on our end equates to an increment of 0.0000011 within the simulation. This is pushing the limits of floating point precision.

Instead, we can catch this at the outset with a reasonable epsilon. An epsilon of 0.000072 means we'll "stick" to the ends within the first 0.1% (65 / 65535), which shouldn't be noticeable for any consumer.

@charliefoxtwo charliefoxtwo linked an issue Jul 6, 2024 that may be closed by this pull request
@charliefoxtwo charliefoxtwo added this pull request to the merge queue Jul 6, 2024
Merged via the queue into DCS-Skunkworks:master with commit 535c73a Jul 6, 2024
3 checks passed
@charliefoxtwo charliefoxtwo deleted the bugfix/shutter-out-of-range branch July 6, 2024 21:45
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.

[BUG] Mi-24P: ALT_SHUTTER out of range Mi-24P: Values out of range
1 participant