-
Posts
583 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Sprool
-
Yep that kills the rotation, its a digital on/off thing not scaling up ana analog number, I need to be able to increase (double) the number of keypresses sent out. I think!
-
Do you mean: Joystick.button(rotaries[i].ccwchar * 2, 1); delay(50); Joystick.button(rotaries[i].ccwchar * 2, 0);?
-
No dont do that, I'll guess you are looking to edit the wrong file. the code form your first post, is it from saved games/dcsopenbeta/config/input/FA-18C_hornet/Joystick folder? If so, then thats the wrong file. You want to be editing Eagle Dynamics/DCS World Open Beta/Mods/Aircraft/FA-18C/Input/FA-18C/joystick/default.lua. The line controlling the master arm switch is line 149
-
isnt the 1 or zero just acting as a flag on/off to register the rotary has changed position, cw or ccw? If so then making the number bigger will not achieve anything, if I get it to output 2, 3 or 4 pulses each time it moves then maybe that would work ?
-
This version compiled ok, if I left it as rotaries = rotaries * 2; i got an error; void CheckAllEncoders(void) { for (int i=0;i<NUMROTARIES;i++) { unsigned char result = rotary_process(i); if (result == DIR_CCW) { Joystick.button(rotaries[i].ccwchar, 1); delay(50); Joystick.button(rotaries[i].ccwchar, 0); rotaries[i].ccwchar = rotaries[i].ccwchar*2; }; if (result == DIR_CW) { Joystick.button(rotaries[i].cwchar, 1); delay(50); Joystick.button(rotaries[i].cwchar, 0); rotaries[i].cwchar = rotaries[i].cwchar*2; };However the knob doesnt turn at all now in game?
-
Heres the code covering the 4 rotaries, void rotary_init() { for (int i=0;i<NUMROTARIES;i++) { pinMode(rotaries[i].pin1, INPUT); pinMode(rotaries[i].pin2, INPUT); #ifdef ENABLE_PULLUPS digitalWrite(rotaries[i].pin1, HIGH); digitalWrite(rotaries[i].pin2, HIGH); #endif } } unsigned char rotary_process(int _i) { unsigned char pinstate = (digitalRead(rotaries[_i].pin2) << 1) | digitalRead(rotaries[_i].pin1); rotaries[_i].state = ttable[rotaries[_i].state & 0xf][pinstate]; return (rotaries[_i].state & 0x30); } void CheckAllEncoders(void) { for (int i=0;i<NUMROTARIES;i++) { unsigned char result = rotary_process(i); if (result == DIR_CCW) { Joystick.button(rotaries[i].ccwchar, 1); delay(25); Joystick.button(rotaries[i].ccwchar, 0); Joystick.button(rotaries[i].ccwchar, 0); }; if (result == DIR_CW) { Joystick.button(rotaries[i].cwchar, 1); delay(25); Joystick.button(rotaries[i].cwchar, 0); }; } } Really not sure which i can edit to give more movement, what are you like on arduino code? All its doing is going through the 4 encoders then outputting (digital write) one pulse CW or one pulse CCW if it detects any of the encoder state have changed. How can I get DCS to amplify the response to move the knob/dial a lot more per pulse?
-
In my current button box build I have a matrix of 4 rotary encoders, and I want the on-screen dial/knob rotation to mimic the rotation of the rotary encoder on the panel. Since a lot of the DCS key mapping allows for keypresses to increment a parameter up or down, such as cockpit instrument light brightness or heading indicator, using a rotary encoder each small rotation step results in what the joystick controller recognises as a button depress, that just nudges the dial or setting one small increment up or down. The result is for a knob on the game to turn one revolution you have to turn the rotary encoder about 20 revolutions. Is there a way I can get it to turn on 1:1 ratio? Some setting in game or default lua, or some extra code I could add - its Arduino-board driven?
-
Great build - nicely done :)
-
Especially on the joystick axes its vital there's only one controller giving the input. All 3 you show here are fighting to control same axis. Delete the ones you dont need to leave only one for each control parameter. THen use tune axis to modify settings, null zone, curves.
-
Post #708 shows: {down = SMS_commands.MasterArmSw, up = SMS_commands.MasterArmSw, cockpit_device_id = devices.SMS, value_down = 1.0, value_up = 0.0, name = _('Master Arm Switch 2-Pos ARM/SAFE'), category = {_('Instrument Panel'), _('Master Arm Panel')}}, This for the default.lua Joystick for Hornet. I'm going to give it a try. /edit: yep works fine. I now have 2 spst on/off switches on my button box, one controls quick start, the other controls master arm on/safe. Note: This code is all lua inside dcs, nothing to do with bodnar or arduino (which I'm using as the button interface with windows joystick controller) The file to edit (make a backup first) is DCSworld/mods/aircraft/FA-18C/input/joystick/default.lua If you need any help on the rotaries, gimme a shout.
-
that post is now 81 pages long! I'm looking to do same with a button box (+ rotary encoders) so I'll post back if I find something more helpful.
-
Me too, love helo missions ;)
-
some stuff here maybe worth investigation: https://forum.pjrc.com/threads/48783-Encoder-Acceleration-help but geting that to work in a 4-encoder matrix may be beyond my current powers
-
its ok, finally sorted thx, s'thing in the saved games folder corrupted, as per aceviper advice, now working, though to be safe I had to scrap entire saved games folder and all the setting s so its back to remapping all the keys & settings from scratch, but at least its running again.
-
SO I put together a couple of button boxes with switches adn rotary encoders. All works finer but Id like to use the rotary encoder to control course and heading in F-18. Trouble is, one complete turn of the encoder only moves the heading 1 or 2 degrees. How can I get the resolution to be a lot coarser?
-
Ive been playing DCS since Jan so yes it meets min specs. 2nd reinstall and new saved games folder has allowed it to run, now Im just re-downloading all my modules. Should be done sometime next week. What is GPU scheduling?
-
Since yesterday evening DCS refused to run, all I get is a black window on the screen, then it just sits there, nothing happens. I removed DCS Openbeta last night and did a fresh install but no luck, exactly same thing happens. It wont run any more. The black window just sits there all the time. Any ideas?
-
Playing Music In Cockpit??
Sprool replied to msmith301's topic in Utility/Program Mods for DCS World
Go get the Edge 340, it has a built-in MP3 player and you can upload your own playlists -
Knowing which end of Runway to approach?
Sprool replied to bunraku's topic in DCS World Tutorial & Help Requests
IRL its normally down to wind direction but the tower should advise recommended approach -
Whats this got to do with livery/skinning?
-
Impportant - any reports about hiots on frame rate for this map? Channel is not playable in MP for low to average PC's
-
E:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\Ka-50\Cockpit\Textures\Cockpit-Ka-50_3_textures.zip
-
I never tried mine on red mode, but seems to be pretty stable and allows enough rotation
-
I think this template has no mesh layer on it? Is there one available with the mesh so you can accurately wrap textures from one panel to the next?
-
Helmet ring displacement setting: I did a search for info on this setting in DCS but found nothing, what does this do and how does it function? Is it for tuning in the sight position with your track-ir? What do you have yours set to?