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

Optics - Fixed magnification text flickering at 1.0x zoom level #1583

Merged
merged 3 commits into from
Aug 29, 2023

Conversation

johnb432
Copy link
Contributor

@johnb432 johnb432 commented Jul 9, 2023

When merged this pull request will:

  • Stops the magnification text in the top right corner from flickering when the magnification level is 1.0x.

0.25 call CBA_fnc_getFov select 1

does not return a stable value (it oscillates lightly around 1).

An example scope is the hlc_optic_atacr from NIArms.

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
@PabstMirror PabstMirror added this to the 3.15.9 milestone Jul 30, 2023
@commy2
Copy link
Contributor

commy2 commented Jul 31, 2023

Now it flickers even harder at 0.995 +-x

Instead, it should remember the last value and only update if delta > threshold.

@PabstMirror
Copy link
Contributor

are there any scopes with magnification less than 1?

@johnb432
Copy link
Contributor Author

Now it flickers even harder at 0.995 +-x

Instead, it should remember the last value and only update if delta > threshold.

Good idea - any suggestions for a delta?

@commy2
Copy link
Contributor

commy2 commented Aug 1, 2023

If you had success with x=0.995, maybe dx=0.005. Doesn't have to be a constant either, can depend on magnification if that helps. Needs trial and error.

@johnb432
Copy link
Contributor Author

johnb432 commented Aug 2, 2023

are there any scopes with magnification less than 1?

It doesn't cache magnification levels below 1, so I'm not sure if there are any/if it's even supported at all.

In 669eddd I moved that code. I'm not sure if it's a good or bad idea to cache magnification levels >= 1 only. I tried without the >= 1 limitation briefly with BWMod and NIArms scopes and it seemed to work, but the tests weren't thorough. With the limitation I tested a bit more thoroughly albeit not enough, I couldn't find any problems.

@PabstMirror PabstMirror merged commit 6ce801b into CBATeam:master Aug 29, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants