Brun Posted April 2, 2019 Posted April 2, 2019 (edited) 4 position switch here, and others in the 'similar items'... https://www.ebay.co.uk/itm/Fan-4-Position-3-Way-Selector-Rotary-Switch-13A-120VAC-With-Knob-In-UK/163403530697? Edit: Mouser have hundreds of 4-position and 8-position switches listed. Googling the manufacturer part numbers will hopefully find you a local supplier. Edited April 2, 2019 by Brun Asus Z690 Hero | 12900K | 64GB G.Skill 6000 | 4090FE | Reverb G2 | VPC MongoosT-50CM2 + TM Grips | Winwing Orion2 Throttle | MFG Crosswind Pedals
LeCuvier Posted April 2, 2019 Posted April 2, 2019 4 position 360 rotation encoder - nothing comes up. wrong search. You don't need rotary encoders but multi-position switches. LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
Sokol1_br Posted April 2, 2019 Posted April 2, 2019 And, in BU0836 rotary switches (multi-position switches) can be configured for emulate encoder operation: press one button if turned clockwise, press another button if turned counterclockwise. The benefit of type is a clear click when change positions, what with encoder is just a faint click. ;)
jocko417 Posted April 3, 2019 Posted April 3, 2019 (edited) Another question for the default.lua experts... Have been following this thread and have made progress with assigning an axis for the ADF Tuning Crank in the F-86 cockpit. I have added this line to the default.lua in the \Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-86\Input\F-86F\joystick folder: {action = radio_compass_commands.ARN6_TUNING_CRANK_AXIS, cockpit_device_id = devices.AN_ARN_6_RADIO_COMPASS, name = _('AN/ARN-6 Audio Tuning Crank'), category = {_('AN/ARN-6 Radio Compass'), _('Right Side Panel')}}, The pot I am using (10-turn) works in both the Windows control panel and in the DCS Control Assignment screen (white bar moves all the way left and right from center when winding multi-turn pot from one end of range to the other), but the cockpit control will not move in the game. Do I have the syntax correct in the lua code line? Does DCS need a different title for the tuning crank control? It is usually controlled by button commands (CCW or CW like button commands for controlling radio volume knobs, lighting rheostats, etc.) in the default settings. Thanks in advance :) Edited April 3, 2019 by jocko417
LeCuvier Posted April 3, 2019 Posted April 3, 2019 Another question for the default.lua experts... Have been following this thread and have made progress with assigning an axis for the ADF Tuning Crank in the F-86 cockpit.... Your syntax is ok, but you didn't pick the right text field for the command. You obviously found this line in "clickabledata.lua": elements["TUNING_CONTROL"] = default_axis(_("AN/ARN-6 Tuning Crank"), devices.AN_ARN_6_RADIO_COMPASS, [b]radio_compass_commands.ARN6_TUNE_FREQUENCY[/b], null, 0.3, 0.01, false, false)You used the first text field, which is the hint, for the command code. You need to use the 3rd text field (bold characters above). The correct line in "default.lua" then is: {action = radio_compass_commands.ARN6_TUNE_FREQUENCY, cockpit_device_id = devices.AN_ARN_6_RADIO_COMPASS, name = _('AN/ARN-6 Audio Tuning Crank'), category = {_('AN/ARN-6 Radio Compass'), _('Right Side Panel')}},This works in principle but with a normal slider like my throttle it's hyper-fast. With your 10-turn pot you'll probably be ok. However I think that DCS World uses only a small part of the axis value range. So you may have to work with dead zone and saturation, or define a curve, to achieve satisfactory operation. Good luck! LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
jocko417 Posted April 3, 2019 Posted April 3, 2019 Definite progress, it’s actually working now, thank you very much! You are right about the insane sensitivity, but the real problem is the axis is not behaving the way I expected. I need the axis to act like a volume knob, with a few turns to get from min to max value, and change of state pausing when the control is released. The axis is currently acting like an aircraft axis of movement, with the neutral position in the middle and change of value accelerating the further the control is held away from neutral in either direction. I guess what I’m trying to say is I need this axis to act like a volume knob, or a zoom control on a slider, not like a pitch/roll/yaw axis. Any ideas? Thanks again!
Sokol1_br Posted April 4, 2019 Posted April 4, 2019 (edited) Tick "Slider" and the axis will have no neutral (center): https://forums.eagle.ru/attachment.php?attachmentid=207546&stc=1&d=1553860335 Edited April 4, 2019 by Sokol1_br
jocko417 Posted April 4, 2019 Posted April 4, 2019 (edited) Thanks Sokol, but I have already tried that, and numerous other combinations and curves. Pot always behaves the same way, center of range of travel of wiper is neutral point of the axis. Twisting the shaft away from neutral in either direction starts the frequency changing, but it speeds up the further from the neutral position you twist the shaft, like the steering wheel on a car. I need to have the axis behave like a volume knob or tuning knob on an old radio (or radio compass :)) Edited April 4, 2019 by jocko417
LeCuvier Posted April 4, 2019 Posted April 4, 2019 Thanks Sokol, but I have already tried that, and numerous other combinations and curves. Pot always behaves the same way, center of range of travel of wiper is neutral point of the axis. Twisting the shaft away from neutral in either direction starts the frequency changing, but it speeds up the further from the neutral position you twist the shaft, like the steering wheel on a car. I need to have the axis behave like a volume knob or tuning knob on an old radio (or radio compass :)) Unfortunately we cannot see the program code of that object. In "clickabledata.lua" you see that this command uses the function "default_axis". You can compare the parameters with those of other commands that use the same function. Identify one that works as desired and try its parameters on the tune crank. This is a tedious process, but as we have no visibility of the code, or a functional specification, trial and error is the only possibility. LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
LeCuvier Posted April 4, 2019 Posted April 4, 2019 I have taken a closer look at the function "default_axis" and noticed something that doesn't look right. Here is the code of the function: function default_axis(hint_,device_,command_,arg_, default_, gain_,updatable_,relative_,cycled_) local default = default_ or 1 local gain = gain_ or 0.1 local updatable = updatable_ or false local relative = relative_ or false return { class = {class_type.LEV}, hint = hint_, device = device_, action = {command_}, arg = {arg_}, arg_value = {default}, arg_lim = {{0,1}}, updatable = updatable, use_OBB = true, gain = {gain}, relative = {relative}, cycle = cycled_ or false, -- sound = {{SOUND_SW6}} } endIn all other functions, the last line within the curly brackets does not have a comma at the end. And that makes sense: the last item in a comma-separated list should not be followed by a comma! In the "default_axis" that was also true, until somebody commented the last line ("sound...") out with the double-minus sign. Now the line starting with "cycle" is the last line, but they forgot to remove the comma. You may want to take that comma out and see if that improves something. I cannot take it any further because I don't have a 10-turn potentiometer on my HOTAS. What I did though was to enter a user curve with values from 45 to 55 in steps of 1. This allows me now to tune from 410 to 850 over just a small range of my throttle lever. In my opinion this axis is misprogrammed and we are wasting time trying to find a work-around. This should really be fixed by the developer. LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
jocko417 Posted April 5, 2019 Posted April 5, 2019 (edited) Well, I learned some new stuff anyway :) Thanks again for all the help, I've posted a request for new axes here: https://forums.eagle.ru/showthread.php?t=236778 Until we can get an axis for the Radio Compass tuner that behaves correctly, I'll probably just go back to using a rotary encoder for the tuning crank for the time being. Do you have any suggestions for a high pulse encoder that would work with Bodnar boards, the ones I have right now are 16 detents per 360 degrees of rotation, so it takes a fair amount of time (and turns) to go from one end to the other of the ARN-6 freq range. Edited April 5, 2019 by jocko417
LeCuvier Posted April 5, 2019 Posted April 5, 2019 I use a 3-position ON-OFF-ON toggle switch and find the rate of dial rotation quite suitable. LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
The LT Posted August 16, 2021 Posted August 16, 2021 On 3/29/2019 at 2:11 PM, LeCuvier said: I fiddled a bit more and it works here. You need a user curve that goes from 100 down to 50 in steps of 5. Do not invert the axis! As the attached screen shot shows, the resulting curve "jumps" at its extremes. Therefore you should not set your slider to one of the extremes. It's unfortunate we have to jump through these hoops. ED hasn't done a nice job there. I have the same situation with the Bf-109K trim wheel axis. PS: I had posted a "how-to" document about creating commands: https://forums.eagle.ru/showpost.php?p=2862001&postcount=214 I should probably add a paragraph on adding axis commands. EXCELLENT POST! Thank you so much, it helped me get the Mi-24 asp gunsight range custom axis working as intended as it also had limited range. My controls & seat Main controls: , BRD-N v4 Flightstick (Kreml C5 controller), TM Warthog Throttle (Kreml F3 controller), BRD-F2 Restyling Bf-109 Pedals w. damper, TrackIR5, Gametrix KW-908 (integrated into RAV4 seat) Stick grips: Thrustmaster Warthog Thrustmaster Cougar (x2) Thrustmaster F-16 FLCS BRD KG13 Standby controls: BRD-M2 Mi-8 Pedals (Ruddermaster controller) BRD-N v3 Flightstick w. exch. grip upgrade (Kreml C5 controller) Thrustmaster Cougar Throttle Pilot seat
Recommended Posts