Jump to content

Replacing Pots with Encoders in DCS Bios


Extranajero

Recommended Posts

As per the title really, what do I have to do in order to substitute an encoder for a pot ?

---------------------------------------------------------

PC specs:- Intel 386DX, 2mb memory, onboard graphics, 14" 640x480 monitor

Modules owned:- Bachem Natter, Cessna 150, Project Pluto, Sopwith Snipe

Link to comment
Share on other sites

Even I am able to help you here!

 

for example, on the TACAN panel, you have the following

 

DcsBios::RotaryEncoder tacan1("TACAN_1", "DEC", "INC", PIN_A, PIN_B);

 

You would connect the centre pin of the rotary encoder to GND, then the pin you want to make the TACAN decrease is what you use in PIN_A, and the one to increase PIN_B,

 

So for example if you were using to pin 11 to decrease, and 10 to increase, the string would be

 

DcsBios::RotaryEncoder tacan1("TACAN_1", "DEC", "INC", 11, 10);

 

 

Hope this helps

 

Les

Link to comment
Share on other sites

But what if the control reference specifies a pot and I want to use an encoder ?

 

Like changing this :-

 

DcsBios: Potentiometer gunsightknob("GunsightKnob", PIN);

 

to an encoder somehow ?


Edited by Extranajero
Stupid smilies appearing in code

---------------------------------------------------------

PC specs:- Intel 386DX, 2mb memory, onboard graphics, 14" 640x480 monitor

Modules owned:- Bachem Natter, Cessna 150, Project Pluto, Sopwith Snipe

Link to comment
Share on other sites

using the A10C again with the TACAN as an example where the two exist

 

DcsBios:: Potentiometer tacanVol("TACAN_VOL", PIN); **Note, space inserted before capital P in Potentiometer to prevent it being shown as a character

 

becomes

 

DcsBios::RotaryEncoder tacanVol("TACAN_VOL", "-3200", "+3200", PIN_A, PIN_B);

 

so, try replacing 'Potentiomenter' with 'RotaryEncoder' and 'PIN' with ' "-value", "+value", 11, 10' where value is a number you can change to increase or decrease by an amount,

 

or try replacing 'Potentiomenter' with 'RotaryEncoder' and 'PIN' with ' "DEC", "INC", 11, 10'

 

Cheers

 

Les

Link to comment
Share on other sites

Thanks a lot Les, it's for the A-4E - I think I get the gist of it now. Easier than I thought :)

---------------------------------------------------------

PC specs:- Intel 386DX, 2mb memory, onboard graphics, 14" 640x480 monitor

Modules owned:- Bachem Natter, Cessna 150, Project Pluto, Sopwith Snipe

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...