Jump to content
The simFlight Network Forums

All Activity

This stream auto-updates     

  1. Today
  2. Thanks Pete for your response. I did not know that. thanks for your information. Here is the luahidapi library link: https://github.com/ynezz/luahidapi here is the working code of luahidapi...I copied luahidapi.dll into "Modules/lua", also copied hidapi.dll and lua51.dll into "Modules/dll" folder local hid = require "luahidapi" local sfmt, sbyte, schar, srep = string.format, string.byte, string.char, string.rep ------------------------------------------------------------------------ -- initialize ------------------------------------------------------------------------ if not hid.init() then print("hid library: init error") return end --====================================================================-- --** WARNING: Test uses Microchip's VID and a PID from MPLAB tools' ** --** PID range. DO NOT use outside of a laboratory/personal setting. ** --====================================================================-- local USB_DEVICE_VID = 0x1234 local USB_DEVICE_PID = 0x0001 local USB_REPORT_SIZE = 64 local dev = hid.open(USB_DEVICE_VID, USB_DEVICE_PID) if not dev then print("Open: unable to open test device") return end function addpadding(str) local length = string.len(str) for i=length, 7 do str = str .. " " end return str; end function call_speed (offset, value) local tx = "" tx = tx .. tostring(value); hidwrite(tx) end function hidwrite (buffer) buffer = addpadding(buffer) buffer = srep(buffer, USB_REPORT_SIZE / 8) local res = dev:write(buffer) if not res then print("Unable to write()") print("Error: "..dev:error()) return end end -- FSX events event.offset (0x07E2, "UW", "call_speed") -- aircraft speed after that I read that air speed value into joystick code (that i wrote in mikroc) and display that value to 7 segment LED. yes those are correct. getting from to run a program named "hid scanner.exe" I was thinking that com.write or com.writefeature works like luahidapi. besides above conversation could you guide me? How do i display air speed value to 7 segment LED without serial communication?
  3. HID buffer writing problem

    No. HID ports are, like all USB ports, are treated like COM in the Windows API for reading and writing, but the port name is much more complicated than that, and obtained by reference to the PID and VID values you need to program in your Lua when using OpenHID. And don't you have to supply such information for that? You need to identify the device somehow! In your log: 202817 LUA.0: Local: USB_DEVICE_VID = 4660 202817 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:8 202817 LUA.0: Local: USB_DEVICE_PID = 1 4660 is hex 0x1234 which seems an very unlikely VID. And a PID of 0x0001 is even more unusual. Are you sure you have those correct? Where are you getting them from? Without seeing the Lua code you've come up with I can't really interpret the log any further, can I? It is a waste posting it really. No. I don't think any USB device I've got uses the "feature" option. And since the HIDdemeo is simply showing results of reading data on one specific user device, it isn't likely to write to it and possibly much their device settings up, is it? You are not picking out the importasnt aspects of the example. You should be able to interpolate for yourself into other read and write facilities. Why would I need that information? Pete
  4. i think diagram will be like this
  5. oh i forgot to mention that i read HidDemo.lua, com.write or com.writefeature function was not used in that file.
  6. Hello Pete, Under of thanks for your response. Did you mean com port (COM1, COM2)? My expectation was that it will work like luahidapi library that im using right now that fulfills my requirements. but i want to use default com.write or com.writefeature function of fsuipc to write hid buffer. Ofcourse Arduino reads and writes to com port.. but i need to write to HID buffer. I read somewhere that HID is better than serial communication. Here's my ipc log. 36129 Running in "Microsoft Flight Simulator X", Version: 10.0.60905.0 (SimConnect: 2.0.60905.0) 200773 SimStart Event: Initialising SimConnect data requests 200789 FSUIPC Menu entry added 201288 C:\Users\szacpp\AppData\Roaming\Microsoft\FSX\Previous flight.FLT 201288 G:\Program Files\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\B737_800\Boeing737-800.AIR 201693 System time = 22/09/2017 19:59:38, Simulator time = 19:56:42 (02:56Z) 201803 Aircraft="Boeing 737-800 Paint1" 202598 Starting everything now ... 202723 LUA.0: beginning "G:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Modules\ipcReady.lua" 202785 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:2 202801 LUA.0: Global: ipcPARAM = 0 202801 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:5 202801 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:6 202817 LUA.0: Local: USB_DEVICE_VID = 4660 202817 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:8 202817 LUA.0: Local: USB_DEVICE_PID = 1 202817 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:11 202817 LUA.0: Global: Device = 0 202817 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:18 202832 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:20 202832 LUA.0: Global: Report = 0 203456 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:21 203456 LUA.0: Global: wr = 65 203456 LUA.0: Global: wrf = 0 203472 LUA.0: Global: dev = 152504236 203472 LUA.0: Global: rd = 33 203472 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:29 203472 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:27 203487 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:32 203487 LUA.0: Waiting for an event in "G:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Modules\ipcReady.lua" 203487 LUA.0: Offset Change event: calling "call_speed" in "G:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Modules cReady.lua" 203487 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:28 203487 LUA.0: Local: offset = 2018 203487 LUA.0: Local: value = 0 203503 LUA.0: ...es\Microsoft Flight Simulator X\Modules\ipcReady.lua:29 203503 LUA.0: Waiting for an event in "G:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Modules\ipcReady.lua" 205235 Advanced Weather Interface Enabled 215437 *** EVENT: Cntrl= 65561 (0x00010019), Param= 0 (0x00000000) PAUSE_TOGGLE
  7. Same problem with KLAS taxiway A5 between 25L and 25R.
  8. Got it working with your help : handle, error = ext.shell("C:\\DOS\\StartDCS.bat", "EXT_MIN", "EXT_CLOSE") ipc.log("ext.shell returned error = " .. error) Now it is working perfectly. Many thanks Pete for your patience. If it is Ok with you I can put the LUA-batch combo in the Users section as " Starting programs ( exe ) with a yoke button through LUA " Regards, Gerard  
  9. Just quoting you, Scott, for a little clarification for Vic... Scott mentioned the real holding point being on the left in the picture. That's true for NORTHbound aircraft (6R via Zulu, hold short 6L). For aircraft landing 24L and exiting Zulu, as in the picture, aircraft should NOT stop at all prior to that first line. The only hold short line they should stop at is the second set. I'm including an overhead shot of that taxiway. The runways are noted, as are the orientation of the hold short lines. I did a quick paint job to show the detail of the hold short lines' dashes. You can see that aircraft should not be stopping at all for that first line, since the dashes are on the runway/pilot's side...pilots should roll across those. The second set has solid lines on the pilot's side, so the aircraft should be stopped prior to those. It is correct in Scott's picture that the aircraft are definitely taxing past that line and should not be. Hope that helps!
  10. Hi Pete, Thank you for your great support. As I have started looking into LUA yesterday for the first time I am making errors. The only thing I want is a LUA that starts a batch file. I have made a new folder in C called DOS with the batchfile in it. Just to be sure I will not have any rights issues in the program files (x86) folder. You are right about computers . That I am finding out right now. I will try again later today.. regards, Gerard
  11. HID buffer writing problem

    com.write writes the data to a port you've already opened. It just calles the Windows function to do that. How would you expect it to work. I successfully use Lua to read and write from/to an Arduino in my cockpit. Please do see the HidDemo Lua example in your FSUIPC documents folder, inside the Example Lua Plugins ZIP, and use the Logging facilities to check what is going on -- log data using ipc.log and enable the Lua trace/debug option in the Logging tab for a line by line trace. Just saying it is not working is no help to anyone. I can't help with zero information. Pete
  12. Hello Pete, Sorry for late reply, my internet was not working...now i'm online...Pete i'm using custom pic18f4550 joystick board. I want to get airspeed value into that chip or board by hid buffer using the mikroc code in previous post, mikroc is an IDE to write program for embedded system. i edited lua script according to you. now i got it that get and set are sessions variable. now problem is the edited code is not working according to my need.. and also im confused how does com.write function work?
  13. Tower!3D Pro - Action Camera not working at KLAS?

    We will look into this.
  14. Tower!3D Pro - LAX 24L & 24R Taxiway Z Hold Points

    Thank you Craig for the report.
  15. Well the first two are wrong. You need \\ for every single \ as that character is an 'escape' character, used to insert things like returns and tabs etc (\r = return, \n = new line, \\ = \ etc. Standard in many programming languages including Lua. In the other two you suddenly decided to use \\ instead of \, so I think you really knew this. In the third one the EXT_MIN and EXT_CLOSE should be in "". Did you create a folder named DOS in C and put "StartDCS.bat" into it? Because that's what you show in the last two. Why "DOS"? Did you mean "DCS"? I think you need to be a lot more careful what you type. Is is not like errors in emails and messages which people can still understand. Computers are basically stupid. You must be 100% exact. Also, the "error" number being returned should be used to see what error might be indicated. Log the value by ipc.log("ext.shell returned error = " .. error) Pete
  16. Lua Socket 64 FSUIPC 5

    Care to share more details so others can do this, please? Pete
  17. FSUIPC Load Flight - FSX-SE Crashes

    Thank you for this feedback! Good also to know you have it fixed. Pete
  18. feelThere Phenom Glass Reflection Fix

    Hi, I have attached the Phenom Windscreen fix to this thread for all users who may need it. From a distant memory, I believe that this file was once posted within the (now defunct?) feelThere forums, but since there is no author or email listed within the Readme file for users to make reasonable attempts at contacting the owner/author, I felt it OK to attach. Please note, however, that the file is NEITHER my work NOR my intellectual property. Should the posting of this file be against the rules, or should someone object, please remove the file - do know that no offence whatsoever was intended. Best wishes, Fabio phenom windscreen.zip
  19. TOPER Tool (Boeing 777) - Support

    Ok, I sent to you sir.
  20. TOPER Tool (Boeing 777) - Support

    Hello, please read the post regarding pirated serial keys: http://forum.simflight.com/topic/83583-pirated-serial-keys/ Kind regards,
  21. TOPER Tool (Boeing 777) - Support

    Dear Peejay, please make sure that the activator has unrestricted access to internet. Try disabling any software that might be interfering like AntiVirus, Firewall, etc.
  22. I have tried these : ext.shell("C:\Program Files (x86)\FSPS\Dolby Cockpit Sounds FSX\StartDCS.bat", "EXT_MIN") ext.shell("C:\Program Files (x86)\FSPS\Dolby Cockpit Sounds FSX\StartDCS.bat") handle, error = ext.shell("C:\\DOS\\StartDCS.bat", EXT_MIN, EXT_CLOSE) handle, error = ext.shell("C:\\DOS\\StartDCS.bat") Unfortunately none of them are working. I even tried after reinstalling DCS directly into C , so above program files (x86).. Regards, Gerard
  23. hi, Just purchased your ai sound package, the title says it all, there's no 737 wav files (there's the a319 wav files in the Traffic3D_Sounds AI_B737 folder) The same happens with AI_B717 and the AI_Airbus_340 wav files. I bought this ai sound package to have individual sounds for 737, a320 for example You might have forgotten to add this files and duplicated the 319 ones An update should be released, thank you Sergio
  24. OK. I will need a bit more reading through manuals and tutorials ;) Thanks for your help, I have a good basis to improve my knowledge of how these things work. Fred
  25. Lua Socket 64 FSUIPC 5

    Thanks, i have it working for now using an app that receives udp and sends it to a virtual serial port
  26. I don't mean to keep this post going but I just wanted to report my final update to my issue. I got my PC back from my tech guy today and all is well, I did not have to do a factory reset. What I did do was to uninstall the Windows Update KB4038788 restarted the PC, launched FSX-SE and went into the Load Flight... menu under FSUIPC in the ADD Ons - I DID NOT HAVE AN ISSUE. So for those experiencing crashes this may be the cause - if you copy and paste - Windows Update KB4038788 causing FSX crashes and P3D - into a Google search you will see that this is an issue for many people. That's all for my post... Regards, Dane.
  1. Load more activity