Jump to content
The simFlight Network Forums

zuby

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by zuby

  1. oh i forgot to mention that i read HidDemo.lua, com.write or com.writefeature function was not used in that file.
  2. 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
  3. 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?
  4. Thanks Thomas..I'll update then reply you :)
  5. oh my mistake I did not set dev and wrf...I changed the code according to you Thomas, but it's not working...I'm confused that can I receive values that will be written by com.writefeature, into microcontroller? I'm using fsuipc ver 4.9 I'm glad for your response thankq very much
  6. i read that post but pete mentioned Thomas.
  7. hello everyone, I made a program in mikroc compiler that reads hid buffer values and write that values to the 7 segment display. I copied below ipcready.lua file into fsx modules folder, that file writes air speed values to hid buffer. but com.writefeature is not working i think. Vendor = 0x1234 Product = 0x0001 Device = 0 Report = 0 dev, rd, wrf, wr, init = com.openhid(Vendor, Product, Device, Report) if dev == 0 then ipc.log("Could not open HID") ipc.exit() end -- Finish HID Connect function call_speed (offset, value) com.write(dev,tostring(value), wr) end event.offset (0x07E2, "UW", "call_speed") -- aircraft speed In mikroc program im reading buffer and put values into 7 segment display like below: while(1) { if(HID_Read() != 0) { AsciiToChar(&readbuff); SevenSegmentPrint(ss,(int)atoi(readbuff)); } SetADCInputToUSBBuffer(); } can anyone help how can i resolve the issue?
  8. hello everyone, I'm calling com.writefeature(dev, "123",wrf) with event offset of air speed. my mikroc code is if(HID_Read() != 0) { AsciiToChar(&readbuff); } but hid read is not reading string from com.writefeature. i dont know why? help me please. thanks in advance
  9. Hello Peter How do i write hid buffer in lua script?...My problem is I want to get AP altitude value then write that value into HID buffer using lua. HID buffer will update 7 segment display by pic microconroller. thanks
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.