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

AH-64D Both Pilot and Gunner Signal Light (color) is 0-1 should be 0-65535 #135

Closed
flanker0ne opened this issue Dec 24, 2022 · 10 comments
Closed

Comments

@flanker0ne
Copy link

knob
Code

@WarLord211 WarLord211 transferred this issue from DCS-Skunkworks/DCSFlightpanels Dec 24, 2022
WarLord211 added a commit that referenced this issue Dec 24, 2022
@WarLord211
Copy link
Member

Pls test

@flanker0ne
Copy link
Author

flanker0ne commented Dec 25, 2022

Hi, I've make some test and the read from the potentiometer are now in the range supposed to be, thanks ;-)

But unfortunately I've noticed another issue, this time with the PRIMARY potentiometer.

Primary Panel Lighting 50%
At 50% of it's excursion, the output is around 10%....

Primary Panel Lighting 100%
... while at 100% is 90%. It can't reach 65535
And the output it is not linear, but maybe this is intentional

@WarLord211
Copy link
Member

WarLord211 commented Dec 25, 2022

the problem is that these vales were nowhere in the code, they were guessed from the model itself.
since i dont know the apache, i programmed as i guessed and need feedback from users ;)
i look into it

@WarLord211
Copy link
Member

can you give me the name oft the Poti? the Panel lighting readout from your screenshot is only the light intensity.

@flanker0ne
Copy link
Author

flanker0ne commented Dec 25, 2022

Yes I can only try to figure out the problem. The complexity of your work grow with the number of modules and with the complexity of that particular module.
I'm gratefull and happy to make a little part in your effort

@flanker0ne
Copy link
Author

flanker0ne commented Dec 25, 2022

can you give me the name oft the Poti? the Panel lighting readout from your screenshot is only the light intensity.

Pilot Primary Lights Control Knob

Remember the CPG cockpit have those controls as well =b

Potentiometer:
Gunner Primary Lights Control Knob
Gunner Signal Lights Control Knob
Actual LED intensity:
Gunner Signal Light (multi color) from the name changed I suppose you already addressed
Gunner Panel Lightning (light green) (I've not tested yet)

@WarLord211
Copy link
Member

i checked the code. BIOS works with the Model Arguments and these 2 are linear in the Cockpit Model. booth work from 0 to 1. so something in the code must be strange. Needs more investigation. since to late for today i look into it when i have more time

@flanker0ne
Copy link
Author

Take your time, and happy holydays

@DeadMeatDCS
Copy link

@flanker0ne Looks like this is a quirk of the module itself in DCS. The panel light (primary lights) knob models a logarithmic potentiometer (well rheostat probably) in that you gotta turn past 50% to get to just 10% intensity and then it takes off towards the end. I have not seen this modeled in any other module in this way.

The cockpit animation goes all the way from 0-100% in the model itself but this is not reachable in the sim as you point out. This may be similar to the pressure setting counter on the F18 that had part of the range outside of user reach. Strange way to implement it - perhaps a bug in DCS, but not really in DCS-BIOS I'd say.

If you want linear output for your LEDs you could:
A) Base LED output on the knob position which is 0-100% linear. You could check that light intensity output is >0 for when to allow the LEDs to turn on in the first place to ensure they only come on when you have power on the bus.
B) Remap the light intensity output from DCS-BIOS in several steps to approximate a linear output.

@flanker0ne
Copy link
Author

flanker0ne commented Feb 1, 2023

Hi guys, thanks for your attention
From my perspective, issue closed if both of you agree

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

3 participants