-
Posts
229 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Devon Custard
-
hey smirk. Looking at that error im betting its not the code, its the data youre passing into it. Can you send me your export.lua? In fact if you could zip up your project and attach to the thread ill look at it. In the meantime ill add some error checking to the code to validate the incoming data. DC
-
heya, im nearly back to the land of cockpit builders, man cave is full of fridges right now and as soon as i get the wife to work out where they go im up and running. Good to see you posting this tiger. Theres an interesting divide between me and tiger. HE wants to do it all via export.lua whereas i would rather just use Gadrocs excellent helios work and then use a C# app to breakout the various udp packets. I can see why he would want to do that and its definitely a valid approach. My thoughts are this 1. Gadrocs already optimised the export of data pretty efficiently. No need to do it again 2. If i have more than 2 or 3 ethernet arduinos which i almost certainly will do its going to be an absolute arse to maintain that export.lua. 3. I can write c# interfaces that self heal broken connections, reset controls and perform startup routines in a multithreaded function outside of the export.lua and game function. Basically its a self contained balck box as far as DCS is concerned. It just needs the raw input. 4. c# is a damn sight faster when coded (multi threaded!!!) than a single threaded scripting engine. 5. The last one is the real kicker for me. Im more comfortable with writing C# than lua. Honestly i think doing as little as possible with LUA is preferable, scripting is fine but its a blunt tool compared with what you can do with a decent compiled language.
-
I paint an acrylic sheet and then engrave through the paint, and then finally cut the buttons. The buttons are glued onto laser transparency sheets. Its one of many approaches. Depends what you have to work with. I was tempted to create a mold and make some rubber buttons but engraving the letters felt like it would awkward/difficult. Also considered 3d printing them, however i wanted transparency buttons for backlighting. So went with acrylic. I however have a laser engraver so not difficult. A cnc would be just as good if you have one.
-
:thumbup:I think thats a great idea, im determined to design and build my own as thats the main reason for taking on this project so not for me.. However for those looking to fast track some of the build its a great idea.
-
Good point, however even the basic measurements of the panel I.e. Width and height would save most people a lot of pain.
-
Anything you post is going to be greatly appreciated. With all the pit builder here im still amazed there isnt a complete set of drawings for panels. The frame and seat seems to be done to death but panel drawings are sparse. Major kudos to those who do post them.
-
Gotta love dealing with the yanks, ordered some bits from digikey and they misshipped. I may not get the bits, i may end up chasing them for weeks, but damn theyre polite and friendly. I dont care if they get off the phone and curse me roundly, they answer the phone and are goddamn NICE. Sigh, if only us Brits could be like that. Anyway, MAX7219's arrived today, rebuilding my caution panel and starting on my radio panels now using them. No more 595s or 4511's, thank god. Anyone else using a Wiz820io? Thats a W5200 on a small form factor board. Got one of those to evaluate.
-
Lol, Basically youre getting responses from every end of the DIY spectrum starting with the MacGyver (this is going to get me out of a fix and save my life) thru to the A-Team (damn it i want to build a tank from a bathtub and a few nails, shoot people but not actually kill them ) to the wise old craftsmans approach (yeah i can build this, but id rather debate the tensile strength and durability of the materials for a month before i actually do anything). Go read my post about how to engrave and quail in terror as the experts proceed to baffle the hell out of you :) Whatever you do, if youre not 100% certain, dont do anything permanent you cant live with if it goes to hell. Trial and error is a tried and tested path from novice to journeyman to master. dont be afraid to try several things. :) This was probably no help whatsoever but im in one of those whimsical moods today....
-
And those LEDs look really cool. Gonna buy a couple reels.
-
@ warhog Pretty much most panels, im editing my own designs at present from reactorones pdfs but there are many missing. Mostly its the dimensions, height and width. If i get the outline with the dzus cutouts so much the better. Ive got CMSP done actually, but thats a good reference design to compare against. So send me ALL youve got :) you got my email(sent it in pm the other week) DXF is fine.
-
@HMA Ive got two potential solutions for Arduino in mind, for straight output to Arduino i.e just driving gauges or lamps USB will do, or if im feeling flush then ethernet. For panels containing switches etc , i.e pushing data BACK to DCS it has to be ethernet/UDP. Im ordering Wiz820io as these seem to be pretty neat / tidy and will work with any Arduino. Im close to showcasing my bridge software it just needs tidying up. Spent a lot of time looking y2kiahs thread and stumbled over his IDE/Bridge environment. Seems that many people are doing the same thing. Right now im desperate to find panel measurements, seems to be a distinct lack of panel designs freely available. If there was an uptodate manual for the A10C id buy one in a heartbeat if it had schematics that i could share readily. Wonder if DCS would share......
-
Moving house saga is taking its toll, i retreated to the sanctuary of my mancave this weekend and..... Finalised my painting/engraving process. White trannslucent acrylic. Painted black with acrylic paint. (airbrushed) Cut and engrave. Done. The paint was the key, every other paint ive used burnt as soon as i engraved on it. This stuff doesnt even notice the laser it evaporates and doesnt burn the surrounding areas. And of course the white acrylic underneath just looks clean. I was grinding my teeth when metalnwood was saying it was so easy and i was probably not focusing right. it was the paint choice all along. Acrylic paint ftw!! Also built a working switch matrix with shift registers for the arduino. Can turn my arduino into a 64 input device with 11 pins. Thats first pass, when i find a suitable multiplexer i can reduce that down to probably 6 pins. Means im not buying megas :) Gearing up to tackling steam gauges, ive been putting that off, but as ive solved most other technical issues its just down to those. I have the opencockpit servo cards so its just a matter of hooking up servos and tuning the scripts... (just he says!!) Noticed that the forums been slow, is everyone enjoying summer or something? DC
-
Lets just say ill be very glad when its all over....
-
Err tks for your interest grainny.... I think? :) Packing away the pit hasn't meant that construction has stopped. Im concentrating heavily on my own version of a UDP bridge. Similar in style to Boltz's A2DCS but not focused on the Arduino its a generic bridging solution. Slowly working my way through all the various switches and controls to ensure Ive got working code to handle everything.
-
Never said your way was wrong.... .:) Youre right. My way (and to my way of thinking )is more efficient in its use of connections on the bodnar board. They arent cheaper than writing code :) As i said, you do whats feels right, as i frequently point out, most people will go thru several iterations of code and board design as they learn more about how these things work. The fun is in the learning. Hopefully by reading this you'll have a lightbulb moment at some point in the future and say to yourself "ah now i know what that arrogant idiot was talking about!!!!" :doh:, I know ive had several, and one only just last week :music_whistling:
-
Nope you can only wire one terminal to a single connection on the Bodnar boards. You basically connect B2 to GRD via a switch. Some smart alec might try to confuse this by talking about a matrix and yes you can go that route but i would strongly advise you to solve the coding first because you HAVE to do that for DCS no matter what route you take. Plus going the matrix route also involves a much more intricate coding issue. Its also worth pointing out that DCS only uses state for certain actions, which is why you really need to understand this.
-
Regarding what i was saying about state. State is common concept in programming. Its a way to persist information about something between function iterations. Its incredibly difficult to describe without resorting to programming terms but ill try. Every time you call a function in code, any variables normally defined within that function are reset to default values. To maintain state or "remember" what that value was the last time you called the function you need to define a static variable (doesnt get reset) or use a variable that is defined outside the function (commonly called a public or global variable) So in this case we would define a global variable called HOG(because LUA doesnt support static vairables). We start with saying that HOG is equal to null. We have a switch called X. We define a function called ReadSwitch that reads the switch state of X and compares it to HOG. The first time this runs it HAS to be different because we set HOG to null and the switch can only return 1 or 0 or ON or OFF. If the switch state was different we call another function called ClickSwitch. ClickSwitch performs the steps necessary to send the data to DCS i.e. performClickable...... Finally ReadSwitch updates the value of HOG to the new switchstate. Because youre reading the voltage differential you are only dealing with On and Off which in Arduino is 1 and 0. The next time you call ReadSwitch it checks the state of the switch against the value stored in HOG. If it didnot change then nothing happens. Arduino constantly runs in a loop so it will call ReadSwitch ad infinitum or until you pull the power. lather rinse repeat. The important thing to consider here is how fast the arduino is going to do this, for a switch that is constantly on you are going to read that switch potentially millions of times before it changes again. Therefore you really only want to do something when it changes state. Once you grasp that simple logic (take the time to think it through you'll get there) you can then start to extend it to perfom more complex steps. Ive started to write about this on the wiki http://deadfrogstudios.com/warthogpit/index.php?title=Category:Importing_Data its by no means complete and is a temporary page but its a start. PM if you want to exchange email about this. More than happy to talk about your specific setup if you want to.
-
No worries hog, we all start somewhere. I feel just like this when im reading my engraving thread, im so far out of my depth there i feel like im drowning in a puddle. Re your question theres no simple guide because its all about what you want to do achieve. Send me a pm with what you want to do and i can walk you thru the tutorial and show you how to do it. Im a more teach a man to fish person than give a man a fish. if you catch my drift....
-
Actually you can do it with the same toggle switch. You just need to manage a static variable that you update when the toggle state changes. When the state changes then you do the performClickableAction. In lua youre effectively using a global variable to do this. Going the On On route requires you to use two of the Bodnar switch terminals instead of one. Youre going to halve your boards capacity for the sake of taking the slightly easier route. Personally i prefer to do the control/switch logic at the microcontroller as it keeps it modular. The more complex you make the lua the slower it takes to process it and the more likely you are to break it. Hopwever it took several iterations to arrive at that point - which is why i have 2 Bodnar boards myself sitting there doing nothing :) Enjoy the ride. In the end, do whats right for you, if i were in your position id get it working one way and then the other. In arduino i do this void GetSwitches() { static int state_tswitch=0; int v=digitalRead(tswitch); if (v!=state_tswitch) { state_tswitch=v; SendCommand("UFC Master Caution Button",String(state_tswitch)); } } The SendCommand only executes when the switch state changes. Also when you start using double throw switches (3 positions) youre going to hit the same issue and it gets harder to source switches cheaply that will do what your want. Oh and btw this is exactly the same for momentary switches whether they are the tactile push kind or the toggle kind.
-
Im in the process of moving, about 2 weeks until exchange of contracts and its at the tense moment. Youre dead right about the flying bit, and actually ive had to pack up the sim PC. Right DC Industries is focusing on software development. Ive been working on my personal version of a UDP Bridge since i started my tutorial on it and its nearing completion. Right now ive got a working import of all the LUA files that allows me to browse all the objects, kind of an interactive database of the cockpit panels.
-
Tutorial: Using Export.lua to export data to Export.log
Devon Custard replied to DerekM's topic in Home Cockpits
Yup, the point being that you cant export it via lua, the radio frequencies you can export. I did it as my first experiment. -
Tutorial: Using Export.lua to export data to Export.log
Devon Custard replied to DerekM's topic in Home Cockpits
Got it in one, however you picked the one of the few things you cant export via lua. the CMSP digital readout can only(afaik) be output via screen capture or OCR, but there are plenty of solutions for that here in the forums. -
Tutorial: Using Export.lua to export data to Export.log
Devon Custard replied to DerekM's topic in Home Cockpits
The export.lua installed with HELIOS does pretty much everything hog. Really good place to start. The important thing is understanding whats being exported and how to use it. -
Doh reread your post you only want a radio panel? Yeah that wont last long, next it will be a caution panel....
-
I bought a couple of bodnar boards. VERY GOOD. Plug n play no worrying about soldering diodes etc. Then i contacted brydling thanks to the reviews here, overall for a big cockpit project his 256 board is probably more cost effiicent, but youre going to have to incorporate diodes into your wiring. Or theres the overpro route or equivalent which is more advanced etc, i would not start there until youve got a few circuits under your belt and you understand how the arduino or whatever microcontroller is going to work for you. No matter what you choose i guarantee you're going to reevaluate shortly after as you start to grasp more and more whats possible and whats out there. I would heartily recommend playing with an arduino to start with as its cheap, get the bare minimum of components to wire up a few test switches and then go from there. Plus there is a lot of arduino users here. Theres a good argument for playing with I2C as well given the recent board activity and posts, however i cant speak for I2C as i havent played with it yet. Can only recommend what i know. I started last Xmas with Arduino and i havent looked back. The total outlay for a full cockpit is going to dwarf any initial expenditure you lay out for your first example interface/panel. And yes buy cheap, Amazon/ebay do really good deals on chinese stuff. One last thing to consider is how youre going to code any interfacing back to DCS, if youre going the HELIOS EOS route then i strongly recommend sticking with Arduinos. However EOS isnt fully completed yet and im not sure what the roadmap is for it. Boltz's A2DCS is looking good for its first release and is a good Arduino solution. And theres rumours of another Arduino bridging solution out there, just not released *Ahem*.