

Felm
Members-
Posts
58 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Felm
-
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Hey Ian the partial string exports are fixed but the glitches still occur (both with the control reference and without). It's still the same glitches: digits disappear and reappear or their values change to wrong ones . This affects both the digits receiving instructions and those who are not. You still want a video? -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
all classes done for shift registers except the rotary encoders class. Once I'm done with the rots I'll post all the code. If anyone needs it NOW just post here. I have some trouble understanding how to modify the read state and switch/quadrature case . I'm pretty sure the solution lies in there because I managed to get constant INC/DEC flooding by using > and < and ==0 (pressing button stops the flooding) operators instead of ==4/-4. Two main issues I can think of: 1) Logic need to be inverted since we are not using the internal pullups 2) What values does "readState" return when using shift registers? Solution is in here somewhere: Anybody have any ideas shoot -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
here is the code for the actionbutton class. the !=0 was tricky. not sure if there is a better way to do this http://pastebin.com/gan5V9SR -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Thank you! I couldn't have done it without your help and everyone else who contributed. It was tough especially since it's my first time coding. It got really frustrating in the end because I knew it *should* work but it didn't... Ouch, that i =+2 is evil... So now I'm gonna do the rest of the classes. Shouldnt be much of a problem except maybe the Multiposition and rotary encoders. Then I'll do the output shift registers. Then.....I don't know. maybe I can do analog mux/demux for pots. -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
You....you fixed it. You removed a _ and fixed it. I have no words, thank you. -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
I give up. I will take a break from working on this since it's taking up all my time and I'm not getting anywhere. I'll make a post over at avrfreaks in a while but in the meanwhile here is some (faulty) code. I'll post the link so I don't flood this thread anymore. If you scratch your head looking at this, it's because I have no idea what I am doing. I've probably tried a million different variations of what is in the code with no success. Ian, if the code stabbed me in the face I wouldnt be surprised! 1) http://pastebin.com/7W13Zycw Here is the initial code that was giving me the "works only once unless I slow down the game". It also resets my arduino for some reason. I don't think that it's hardware related (checked the code with a printin function rather than a DcsBios and no resets). 2) http://pastebin.com/JMEjH0vZ This is the new code I was trying to write but it has consistently failed. 3) here is a quick and dirty schematic http://i.imgur.com/HkqIn28.png -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
the issues is internal to the code. The arduino resets for some reason when the data gets exported. I'm rewriting the whole thing so its useless to post code at this point. -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
That was a bit confusing you are right. I meant that there is a a message in the command line and an effect in cockpit the first time I push the button but after that there is neither a message in the command line or an effect in cockpit. If I slow the game down then there is a a message in the command line and an effect in cockpit for several button presses, until at some point both cease to happen again. Ill post the code and schematic when Im back from work tonight -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Small update: I slowed the game down a lot (alt + z) and managed to send a message more than once. However at some point it still stops reading them. I don't know why...on some runs it was twenty or more, on others only once, or twice. -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Thanks Janko! I read up on them a bit yesterday, useful but I'm not sure if I'll need them since the register is setting the bits. Still, good to know. Ian, I have encountered an issue: if I have the listener running without the game it reads the inputs fine ([ED:FIXED]well almost, it gets confused if I press the button too long or too fast[ED:FIXED]) but once I start up the game and the data starts flowing it will only catch the first input and then ignores the rest. If I press escape and give it a bit of time it starts working again fine (while the game is still paused). If I unpause the game the same behaviour starts again. Does that indicate to a problem external to my code? -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
hmmm well the code works better now with your bitmask advice but I seem to be flooding the listener with inputs. almost as if my switches are floating. probably messed something up somewhere, I look into it tomorrow. thanks again for the pointers -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
I will probably do that (post in another forum) if I dont figure it out by myself. I managed to send inputs to dcsbios with shift registers but it's at a very primitive state right now. I am making progress but very very slowly. I probably should just bite the bullet and start from zero rather than trying to understand other peoples' code and modify it. You mean about the 7seg screens code I wrote a few days before? I didnt do the math ( I actually did quite some time ago and misplaced the paper) but an external power supply (nothing crazy just a couple Amps or so) will be necessary if your are connecting a lot of them. USB is limited to 500mA and the ptc fuse will pop if you try to pull more than that. I just got a 2A 9v supply and a 5v regulator from ebay they are very cheap. I'm using a 68k resistor on the max7219 and they are bright enough. Depending on the led you can usually get away with driving them at 50% current. Yup I am reading up on the bitmasks. Biggest problem for me right now is to understand the bigger picture of how to send the data where I want it. Thanks! I understand the first 4 lines but I didnt yet encounter the ~ so I'll study that now and see if I make any progress. -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Ian I'll try the radios again tonight and let you know how it goes with the new version. I'm still banging my head against the shift registers. I'm not sure how to get a pointer to a specific bit in the variable (to see if its 0 or 1). Should I make some sort of array? -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
I managed to get get input working somewhat with the shift registers. Although I think I'm not doing it correctly because I'm relying on if statements within the sketch rather than on the library pointers. It also only sends the input once, I have to restart the listener for it to work again. I'll look into it tomorrow, it's stupid late right now. -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Great that's what I meant by general advice. I'll get to it, thanks! -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Hey Ian could you please give me a couple pointers on how to go about getting the shift registers to work with dcs bios? I mean just the general logic/steps behind the process. you don't need to go into super detail. Just a little something to get me started in the right direction :) -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Unfortunately I didnt get enough time to test the shift registers. the circuit is ready but no code yet. hopefully I'll have a few hours here and there during the week to try and get them to send data to dcs bios. Otherwise next weekend. -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Hey Ian just a trivial mistake I noticed: In the UHF section of the control reference you mislabeled the 0.25mhz selector as a UHF 10MHz Selector. It's just the title that's wrong, the message itself is correct so it has no ill effect. :) -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
-
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Maybe it's something to do with serial speed or something else serial related? it feels like a communication issue -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
I checked with the interactive reference and managed to reproduce the same behaviour. - lag (it will miss an input and refresh the digit with the correct value a bit later) - it will change to a wrong value and then revert back to the correct one - other digits will change value and then revert to the correct one - other digits will switch off and on - the digit you are interacting with will switch off and on I noticed that if you do it (ed: do it = change frequencies) slowly there's less glitches. Lag still occurs but the other glitches not so much (they still happen though). The faster you do it the more glitches. I didnt experience a digit getting stuck on a wrong value though, they all eventually display the correct values. I could upload a video if you want tomorrow if you think it will help. -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
here is today's work: VHF AHM code UHF CODE (with a rotary encoder for testing) so far so good I guess. it's not perfect but it works. there might be some refreshing or serial comm issues. when testing the rotary it did miss quite a few turns or lagged a bit until updating. -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
One more issue I noticed is that there are some small glitches here and there: when changing values sometimes the digit will switch off for a second or so and then the new value will be displayed. sometimes when changing values of one frequency another one will change briefly to a wrong value and then come back to the correct one. so far I tested the vhf am and uhf. the ufh seems to be a bit less affected by this (ed: seems to be affected the same) -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
it works like you said "3 " but now the onVhfamFreq4Change (the last two numbers on am/fm freq) only displays "0 " instead of "00". 25,50,75 work ok so far (no missing values). It used to work ok before I upgraded to the new version so I shouldnt blame my code right? -
Major Announcement: New software to to connect panels to DCS
Felm replied to FSFIan's topic in Home Cockpits
Ok downloading now, will let you know how it goes in a bit! :)