Jump to content

y2kiah

Members
  • Posts

    418
  • Joined

  • Last visited

Everything posted by y2kiah

  1. I only have it working in 32 bit mode, the newest TrackIRFixer that I've used will only patch the 32 bit dll
  2. we should start collecting AH-64 panels now while they are cheap... just in case :thumbup:
  3. oh yes I think it's just not working for A-10, thanks for the correction
  4. nice, that should allow us to push events instead of having to poll for changes, have you tried it yet?
  5. Is it possible this is not working because you're using io.write and io.flush? As I pointed out in this thread that method of io in lua has not worked in prior betas (not sure about beta 4 since I have not tried it yet) edit: oh sorry I just realized it's only your debug function that has io.write in it. You might need to change those lines in order to debug
  6. sure, first I override the print function dofile("./Scripts/Aircrafts/A-10C/Cockpit/devices.lua") dofile("./Scripts/Aircrafts/A-10C/Cockpit/command_defs.lua") function print(printObj) function recurse(printObj, level) if level > 10 then return "" end if type(printObj) == "string" then return printObj; elseif type(printObj) == "number" then return string.format("%.7g", printObj); elseif type(printObj) == "boolean" then if printObj then return "true" else return "false" end elseif type(printObj) == "table" then local tblStr = "{\n"; for k,v in pairs(printObj) do -- prevent recursion issues if (v ~= printObj and not (level > 1 and k == "_G") and not (level > 2 and k == "package")) then tblStr = tblStr..string.rep("\t",level)..k.." = "..recurse(v, level+1).."\n"; end end return tblStr .. string.rep("\t",level-1) .. "}"; elseif type(printObj) == "userdata" then local mt = getmetatable(printObj); if mt then return recurse(mt, level) end return tostring(printObj); else return tostring(printObj); end end writeStr = recurse(printObj,1); if (writeStr) then file:write(writeStr); file:flush(); end end function println(val) print(val); print("\n"); end devices["MAIN_PANEL"] = 0 then to dump all devices I would do this for k,v in pairs(devices) do local dev = GetDevice(v); local mDev = getmetatable(dev); print("devices."..k.." = "); println(mDev); end and to dump the global table is also very simple println(_G); I like to use the optional semicolon when I write lua as you can see :music_whistling: I haven't had a chance to check out beta 4 yet, I'm out of town for a few more days, can't wait to see it though. edit: I should also mention that the print function assumes a global var "file" is open for writing, so change as appropriate
  7. y2kiah

    Warthog Covers

    hey man I was ready to order then I remembered that my throttle will be embedded in the pit, so the cover won't fit over it correctly. Do you have any plans to design one that fits just over the throttle handle? If not, any way I can get just the joystick cover?
  8. y2kiah

    Warthog Covers

    Great job man, ordering mine today!
  9. hello snipes! 1. Yep, it's one way to do it 2. Stay away from the USB monitors, which are the only common small ones sold retail. You may need to go to ebay to find some small monitors with VGA input. They all come directly from sellers in China from what I've seen 3. the card will only support 2 monitor outputs. You can hook up a TripleHead2go to turn many monitors into one, but that does not solve your problem 4. If your motherboard has another PCIe slot available, get a second card which will give you two or more additional outputs. 5. Yes you will have some setup to do in one of the config files, but it's not difficult. Game performance will slow down because you are pushing more pixels, and you will have to run in windowed mode.
  10. hmm this is a shot in the dark but I can't see what else it might be, and I vaguely recall having an issue with the word "device" as a variable name some time in the past... though it could just be my imagination. Try this... function TwoPositionCoverAndSwitch(pValue, pDevice, pNumber, pCoverNumber, pOnValue, pInvert) if pInvert then if pValue == 1 then pValue = 0 else pValue = 1 end end local dev = GetDevice(pDevice) if pValue == 1 then -- flipping it on, open the cover first dev:performClickableAction(pCoverNumber + 3000, pValue * pOnValue) dev:performClickableAction(pNumber + 3000, pValue * pOnValue) else -- flipping it off, close the cover last dev:performClickableAction(pNumber + 3000, pValue * pOnValue) dev:performClickableAction(pCoverNumber + 3000, pValue * pOnValue) end end
  11. You can solve this problem without SIOC. The simplest method I can see to do it would be to write a function similar to TwoPositionSwitch but call it something like TwoPositionCoverAndSwitch. That function would toggle the cover along with the switch, and take two control id's as arguments instead of just 1, the first for the switch and the second for the cover. So this code: [1] = {TwoPositionSwitch, 2, 1, 1} [2] = {TwoPositionSwitch, 2, 2, 1} would become something like: [1] = {TwoPositionCoverAndSwitch, 2, 1, 2, 1} and in the ExportSupport.lua script you would add the following: function TwoPositionCoverAndSwitch(pValue, pDevice, pNumber, pCoverNumber, pOnValue, pInvert) if pInvert then if pValue == 1 then pValue = 0 else pValue = 1 end end local device = GetDevice(pDevice) if pValue == 1 then -- flipping it on, open the cover first device:performClickableAction(pCoverNumber + 3000, pValue * pOnValue) device:performClickableAction(pNumber + 3000, pValue * pOnValue) else -- flipping it off, close the cover last device:performClickableAction(pNumber + 3000, pValue * pOnValue) device:performClickableAction(pCoverNumber + 3000, pValue * pOnValue) end end Oakes' script that I am referencing supports up to 8 arguments by default after the function name in the "command" table (between the {}) of which we are only using 4. This can be extended of course, but 8 should be enough for anything. please keep in mind I have not tested the code as-is
  12. It does look delicious doesn't it?
  13. They are being unreasonable by selling off of known back-order from China (probably, or wherever) when it's known that international shipments can take weeks to clear customs or will never clear at all. They should sell from current stock only, or make the wait time very well known. Are they drop shipping from an overseas supplier??? I should hope not. They should not have charged you until mailed to you from them. I did learn quite a bit from that site and found the ideas and tutorial helpful for getting started, but I never ordered anything from them because I noticed they mark up everything quite a bit. I've also since realized that an MDF machine will only get you so far, it's not long until you need to rebuild with stronger material. I wish I had known you were ordering from them. My advice is to stay away from the cheap electronics and get yourself a Gecko G540, and some powerful steppers, and a good 48V, 12.5A power supply right off the bat. I learned the hard way because the Gecko is my THIRD driver, and the steppers I SHOULD have gotten from the very beginning are my SECOND set of four. That's a lot of wasted money to finally get it right, I should have just spent the little bit more up front.
  14. Glad my thread could help...I haven't posted in a while, I need to get on that. Yours looks very good, my opinion is don't get too caught up in exact dimensions, I think if it's close enough to the eyeball, it's close enough. After all you're not selling it to the military or anything like that. I've actually updated the fuel panel and moved things around since those screen shots were taken in my first post. It looks different on a large computer screen but then once you get the piece in hand it's only 5.75 inches wide, pretty small really, and the small differences aren't noticeable at all.
  15. The CG is only one part of the picture. You also have to consider moment of inertia, aka inertia tensor. Together the CG and inertia tensor represent the mass distribution of a rigid body. It's analogous to the standard deviation and mean of a set of numbers. The mean will tell you the location of the average, but absolutely nothing about the distribution. The standard deviation tells you whether the set is concentrated around the mean, evenly distributed, or concentrated away from the mean.
  16. oh I see, R is for "reset" and not "received" (like an ack) so you basically don't handle for lost packets? Probably doesn't happen much if ever on a LAN anyway... Not sure what you mean, what was I supposed to test?
  17. interesting choice in UDP. Do you keep pumping out the same packet until an R is received for it? Just wondering how you handle the reliability issue for switch inputs and such.
  18. Here is a dump of the metatable for all devices, shows some interesting functions we can use on many of them. The majority of indicator lamps and some other stuff is grouped under the main panel (device 0). MAIN_PANEL = { __index = { get_argument_value = function: 46349110 performClickableAction = function: 454E9628 update_arguments = function: 46349038 set_argument_value = function: 46349160 SetCommand = function: 454E95B0 } } devices.FM_PROXY = { __index = { performClickableAction = function: 46313F80 SetCommand = function: 46313F38 } } devices.CDU = { __index = { performClickableAction = function: 46314360 SetCommand = function: 46314318 } } devices.ADI = { __index = { get_sideslip = function: 46314830 performClickableAction = function: 46314738 get_bank = function: 463147E8 get_pitch = function: 463147A0 SetCommand = function: 463146F0 } } devices.PULSE_TIMER = { __index = { performClickableAction = function: 46314E18 SetCommand = function: 46314DD0 } } devices.OXYGEN_SYSTEM = { __index = { performClickableAction = function: 463151B0 SetCommand = function: 46315168 } } devices.HOTAS = { __index = { performClickableAction = function: 46315560 SetCommand = function: 46315518 } } devices.MAVERICK_INTERFACE = { __index = { performClickableAction = function: 46315940 SetCommand = function: 463158F8 } } devices.ENGINE_SYSTEM = { __index = { performClickableAction = function: 46315CF0 SetCommand = function: 46315CA8 } } devices.AN_ALR69V = { __index = { performClickableAction = function: 463160A0 SetCommand = function: 46316058 } } devices.STANDBY_COMPASS = { __index = { performClickableAction = function: 46316480 SetCommand = function: 46316438 } } devices.ENVIRONMENT_SYSTEM = { __index = { performClickableAction = function: 46316830 SetCommand = function: 463167E8 } } devices.SIDEWINDER_INTERFACE = { __index = { performClickableAction = function: 46316BE0 SetCommand = function: 46316B98 } } devices.FIRE_SYSTEM = { __index = { performClickableAction = function: 3132CA58 SetCommand = function: 3132CA10 } } devices.MFCD_RIGHT = { __index = { performClickableAction = function: 3132CE38 SetCommand = function: 3132CDF0 } } devices.HUD = { __index = { performClickableAction = function: 3132D218 SetCommand = function: 3132D1D0 } } devices.HELMET_DEVICE = { __index = { performClickableAction = function: 3132D5F0 SetCommand = function: 3132D5A8 } } devices.IFFCC = { __index = { performClickableAction = function: 46318F50 SetCommand = function: 46318F08 } } devices.NMSP = { __index = { performClickableAction = function: 46319330 SetCommand = function: 463192E8 } } devices.CPT_MECH = { __index = { performClickableAction = function: 46319708 SetCommand = function: 463196C0 } } devices.STALL = { __index = { performClickableAction = function: 46319AE8 SetCommand = function: 46319AA0 } } devices.REMOTE_COMPASS = { __index = { performClickableAction = function: 46319EC8 SetCommand = function: 46319E80 } } devices.NAVIGATION_COMPUTER = { __index = { performClickableAction = function: 4631A2B0 SetCommand = function: 4631A268 } } devices.FUEL_SYSTEM = { __index = { performClickableAction = function: 4631A698 SetCommand = function: 4631A650 } } devices.ILS = { __index = { performClickableAction = function: 4631AA78 SetCommand = function: 4631AA30 } } devices.VMU = { __index = { performClickableAction = function: 4631AE50 SetCommand = function: 4631AE08 } } devices.CMSP = { __index = { performClickableAction = function: 4631B228 SetCommand = function: 4631B1E0 } } devices.LIGHT_SYSTEM = { __index = { performClickableAction = function: 4631B600 SetCommand = function: 4631B5B8 } } devices.CMSC = { __index = { performClickableAction = function: 4631B9E0 SetCommand = function: 4631B998 } } devices.JAMMERS_INTERFACE = { __index = { performClickableAction = function: 4631BDB8 SetCommand = function: 4631BD70 } } devices.CADC = { __index = { performClickableAction = function: 4631C1A0 SetCommand = function: 4631C158 } } devices.LITENING_INTERFACE = { __index = { performClickableAction = function: 357C2880 set_laser_designation_code = function: 357C2970 get_station = function: 357C29E8 set_laser_spot_search_code = function: 357C29C8 add_masked_region = function: 357C2918 SetCommand = function: 4631C3B8 } } devices.AN_ALE40V = { __index = { performClickableAction = function: 357C3310 SetCommand = function: 357C32C8 } } devices.DTSAS = { __index = { performClickableAction = function: 357C36A8 SetCommand = function: 357C3660 } } devices.AHCP = { __index = { performClickableAction = function: 357C3A88 SetCommand = function: 357C3A40 } } devices.DSMS_INTERFACE = { __index = { performClickableAction = function: 357C3E60 SetCommand = function: 357C3E18 } } devices.DIGITAL_CLOCK = { __index = { performClickableAction = function: 357C4248 SetCommand = function: 357C4200 } } devices.TACAN = { __index = { performClickableAction = function: 357C4630 SetCommand = function: 357C45E8 } } devices.IFF = { __index = { performClickableAction = function: 357C4A10 SetCommand = function: 357C49C8 } } devices.SADL = { __index = { get_datalink = function: 357C4E50 performClickableAction = function: 357C4DE8 SetCommand = function: 357C4DA0 } } devices.HYDRAULIC_SYSTEM = { __index = { performClickableAction = function: 357C5278 SetCommand = function: 357C5230 } } devices.AAP = { __index = { performClickableAction = function: 357C5618 SetCommand = function: 357C55D0 } } devices.IAM_INTERFACE = { __index = { performClickableAction = function: 357C59F0 SetCommand = function: 357C59A8 } } devices.VHF_FM_RADIO = { __index = { get_frequency = function: 357C5F10 performClickableAction = function: 357C5DD8 set_frequency = function: 357C5E40 is_on = function: 357C5F50 SetCommand = function: 357C5D90 } } devices.DATA_TRANSFER_SYSTEM = { __index = { performClickableAction = function: 357C66E8 SetCommand = function: 357C66A0 } } devices.AIRSPEED_INDICATOR = { __index = { performClickableAction = function: 357C6A88 SetCommand = function: 357C6A40 } } devices.AN_APN_194 = { __index = { performClickableAction = function: 357C6E70 SetCommand = function: 357C6E28 } } devices.PADLOCK = nil devices.SAI = { __index = { get_sideslip = function: 357C7388 performClickableAction = function: 357C72E0 get_bank = function: 357C7368 get_pitch = function: 357C7348 SetCommand = function: 357C7298 } } devices.SYS_CONTROLLER = { __index = { performClickableAction = function: 357C7AF0 SetCommand = function: 357C7AA8 } } devices.TONE_GENERATOR = { __index = { performClickableAction = function: 357C7E90 SetCommand = function: 357C7E48 } } devices.TISL = { __index = { performClickableAction = function: 357C8278 SetCommand = function: 357C8230 } } devices.TAD = { __index = { performClickableAction = function: 357C8650 SetCommand = function: 357C8608 } } devices.EGI = { __index = { performClickableAction = function: 357C8A28 SetCommand = function: 357C89E0 } } devices.MFCD_LEFT = { __index = { performClickableAction = function: 357C8E00 SetCommand = function: 357C8DB8 } } devices.ELEC_INTERFACE = { __index = { performClickableAction = function: 357C91E0 SetCommand = function: 357C9198 } } devices.UHF_RADIO = { __index = { get_frequency = function: 357C9650 performClickableAction = function: 357C95C8 set_frequency = function: 357C9630 is_on = function: 357C9670 SetCommand = function: 357C9580 } } devices.AAU34 = { __index = { performClickableAction = function: 357C9EC8 SetCommand = function: 357C9E80 } } devices.UFC = { __index = { performClickableAction = function: 357CA260 SetCommand = function: 357CA218 } } devices.RT1720 = { __index = { performClickableAction = function: 357CA638 SetCommand = function: 357CA5F0 } } devices.AAR47 = { __index = { performClickableAction = function: 357CAA18 SetCommand = function: 357CA9D0 } } devices.DBG = nil devices.INTERCOM = { __index = { performClickableAction = function: 357CAE80 SetCommand = function: 357CAE38 } } devices.HSI = { __index = { get_heading = function: 357CB2C8 performClickableAction = function: 357CB260 SetCommand = function: 357CB218 } } devices.CICU = { __index = { performClickableAction = function: 357CB6E8 SetCommand = function: 357CB6A0 } } devices.AUTOPILOT = { __index = { performClickableAction = function: 357CBA78 SetCommand = function: 357CBA30 } } devices.VHF_AM_RADIO = { __index = { get_frequency = function: 357CBF68 performClickableAction = function: 357CBE58 set_frequency = function: 357CBEC0 is_on = function: 357CBF88 SetCommand = function: 357CBE10 } } devices.ARCADE = nil devices.HARS = { __index = { performClickableAction = function: 357CC870 SetCommand = function: 357CC828 } }
  19. Well nevermind they are not missing everything seems to be under the main panel device id 0. Some other device ids also have unique functions like UHF_RADIO has set_frequency(), get_frequency(), and is_on(). Strange that they would group indicators for TACAN, ILS, and VHF under the main panel, but UHF under its own device id. Confusing, but workable. I'll just need to make an inventory of available functions, will post it shortly.
  20. That's exactly what I found missing in WH, no update_arguments and no get_argument_value for the WH devices (at least, the few devices I've tried). Works for you?
  21. Too bad to hear about the socket issue, I hope it will work in the beta, haven't tried that myself yet. Quick test I did, switching the EMER FLOOD switch on and off every 3 seconds, worked when I used the device.performClickableAction function but did not work when I used the SetCommand function. Not really sure why, I found them to be pretty much equivalent in BS. My feeling is they have not touched much of this export stuff since BS, and it still has a lot of legacy Lock-On stuff in the global scope that needs to be cleaned up. I think it just needs some attention from one of the ED programmers, hopefully before the product is launched, but I can see why they might delay that for a patch after launch. What I'd really like to see, if they could, is to expand the metatable of userdata returned from the GetDevice function. Right now all I see is performClickableAction and SetCommand (and I think some output stuff is missing right now that was available in BS). It would make life very easy if they also had a GetIndicator() function for each device, and a list of indicator id's as well, of course. I see a GetIndicator() function in global scope, but I have no idea if it works or how to use it.
  22. Hi all, just wanted to share something random that I figured out in the beta that could possibly help others get Export.lua to work. normally when you would use the io library to output to a file, you'd use the "simple" model (not my term for it) which looks something like this local file = io.open("./Temp/Export.log", "w") if file then io.output(file) io.write("---Log: Start-----", "\n") io.flush() end io.close() so what you're doing here with the io.output(file) line is telling the standard output stream to redirect its output into the file that you just created. Then, io.output(), io.flush(), io.close() etc. works on the standard output stream. This is completely valid Lua, and it should work, and it DID work in FC2 and BS, but for some reason it does not work in A-10C and it can either stop your script from running completely, or halt it at the first troublesome line. To fix, we can switch to using the "complete" io model (also not my term). The equivalent to the lines above is as follows: file = io.open("./Temp/Export.log", "w") if file then file:write("---Log: Start-----", "\n") file:flush() end file:close() Notice I made the "file" variable global, and removed the io.output(file) line completely. This fixed my problems getting Export.lua to work, and if anyone is using Oakes' script to connect to SIOC, this should help you out too.
  23. Hi Heks, Krebs is right I'm building an Arduino solution and will be posting progress updates as soon as the firmware is done. FYI if you want to use my solution you will either need an ethernet shield for your board, or you can wait for one of the new boards they've announced with ethernet built in.
  24. For me the reason is time. On the machine each rib would take 4 or 5 times longer to cut out and stress the machine much harder. It would probably be machining for over an hour per rib. In that length of time, it is very prone to losing steps and getting out of position, requiring frequent re-zero, and that turns the 1 hour job into 2 hours. Plus if it screws up the cut, I'm not ruining a $20 piece of ply instead just a $6 piece of hardboard. If I get a faster machine that I don't have to babysit in the future, I'd probably fire the job off and go do something else, but for now a jig saw will make short work of those ribs.
  25. I had a productive weekend, I cut out all of the back panel blanks from sheet metal on the table saw. WHAT A MESS. I have aluminum shards impaled in the shirt I was wearing. Next time, I'll wear an apron. Making a full set for the left and right consoles (that's 30 panels including blanks) is just such a big job. And I have to do it all over again at some point for my own pit... yeesh. I also fashioned a painting station in my garage/shop that shrouds the piece and sucks air in one direction through a filter. I'll be doing a LOT of spray painting this week so this was a must. I'll post some pics of it later. In other news, my hotas warthog is on the way so I need to start building my pit. I'll be cutting out templates for the ribs from hardboard on the cnc machine, then using a jig saw or router to cut the ribs from birch ply. I have come to hate MDF despite its many advantages, and I refuse to work with it anymore unless absolutely necessary. It turns to powder, covers the entire room with a blanket of dust no matter how big the room or how good my dust collection is set up, and it's impossible not to breath in some of the dust even with a mask on. In other other news, the Arduino electronics solution I've talked about in some of my previous posts is starting to take shape. The firmware is almost finished, and I'm making good progress on the server. The server is written in C++, is very lightweight and fast, and runs multiple threads to take advantage of multicore processors. The server also incorporates the V8 javascript engine, so you can perform any special processing to fix up interface issues right on the server. If you want to get sophisticated, you could even completely implement certain avionics that the host sim does not provide. Basically you create your pit configuration in a visual IDE, save your project to an XML file, and deploy the file to the server folder. The server then knows everything it needs to run your pit, and it will connect any microcontrollers to any sim software (for now just DCS) through event messages, with absolute minimal network traffic. In the Arduino world, they have announced a board with TCP built right in, in lieu of serial, which will cut down on the cost of this solution because a separate ethernet shield will not be required for each board. I'm calling the protocol NISE (Network Interface for Simulator Electronics) and the various components are * NISEStudio (the IDE) * NISEServer (the TCP server) * NISEAgent (.lua files for DCS, SimConnect for FS10, etc.) * NISEArduino (fimware) Here is a teaser screenshot of the IDE. This runs on Windows XP, Vista, 7 using the .NET 4.0 framework. It's still early in development, so many features are not implemented yet.
×
×
  • Create New...