Extranajero Posted June 26, 2019 Share Posted June 26, 2019 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 More sharing options...
lesthegrngo Posted June 26, 2019 Share Posted June 26, 2019 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 More sharing options...
Extranajero Posted June 26, 2019 Author Share Posted June 26, 2019 (edited) 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 June 26, 2019 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 More sharing options...
lesthegrngo Posted June 26, 2019 Share Posted June 26, 2019 which aircraft? Cheers Les Link to comment Share on other sites More sharing options...
lesthegrngo Posted June 26, 2019 Share Posted June 26, 2019 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 More sharing options...
Extranajero Posted June 26, 2019 Author Share Posted June 26, 2019 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 More sharing options...
Jester_ITA Posted June 28, 2019 Share Posted June 28, 2019 Les, to avoid inserting spaces, use the tag CODE ... the "#" button in the editor DcsBios::Potentiometer tacanVol("TACAN_VOL", PIN); It treats the text as ... well ... code! And get rid of those emoticons! :thumbup: Link to comment Share on other sites More sharing options...
Recommended Posts