Jump to content
The simFlight Network Forums

aua668

Members
  • Content Count

    271
  • Joined

  • Last visited

  • Days Won

    6

aua668 last won the day on December 10 2018

aua668 had the most liked content!

Community Reputation

10 Good

About aua668

  • Rank
    Advanced Member
  • Birthday 10/03/1960

Profile Information

  • Gender
    Male
  • Location
    LOWG
  • Interests
    Flightsim ;-)

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, Yes - I have them in sync. Either they are readable from Lvars (you can react on changes with the event.Lvar trigger) or I collect them permanently via the XML interface. As the interface doesn't react very quickly, you have a latency of some msec. Rgds Reinhard
  2. Hi, I just saw, that I did not include the ZIP file. Sorry! Reinhard Q400_Write_XML_IF.zip
  3. Hi, In the included ZIP-File I added two files: One is a definition file for the XML-functions I use with my hardware. The numbers I got from the provided utility, which calculates the hash value for the specific variable. The second file is a sample module, which toggles the TOGA button. For every button I have such a routine. In a master file, which is automatically started, I start all my modules for the Q400 with ipc.runlua("<<<modulename>>>") For reading values from the XML interface I use one single module transferring all the necessary XML-Values into global variables, which later I can use in different modules. The core of the routine can be seen here: -- initialize XML interface to HW function readXMLIF ( pFunc ) -- function to read specific IF value local lMJC_readCode local lMJC_readValue local lCount = 0 -- select function by hash code ipc.writeLvar("L:MJC_VAR_READ_CODE", pFunc) ipc.sleep(5) -- read results lMJC_readCode = ipc.readLvar("L:MJC_VAR_READ_CODE") -- wait if not ready while lMJC_readCode ~= 9991999 and lMJC_readCode ~= 9992999 and lCount < 20 do lCount = lCount + 1 ipc.sleep(10) lMJC_readCode = ipc.readLvar("L:MJC_VAR_READ_CODE") end if lMJC_readCode == 9991999 then lMJC_readValue = ipc.readLvar("L:MJC_VAR_READ_VALUE") -- success else lMJC_readValue = 9992999 -- variable not found ipc.log("Error reading MJC interface for function "..pFunc) end return lMJC_readValue -- return value or error end function readAllXMLValues() -- synchronize global variables from Q400 values -- autopilot ipc.set ("Q400_YD_LIGHT" , readXMLIF ( 31461 ) ) -- AFCS_->outputs.YD_engaged ipc.set ("Q400_AP_LIGHT" , readXMLIF ( 31281 ) ) -- AFCS_->outputs.AP_engaged -- glare shield ipc.set ("Q400_CAUTION" , readXMLIF ( 143090 ) ) -- CautionWarning_->outs_.master_caution_light_blinking ipc.set ("Q400_WARNING" , readXMLIF ( 143112 ) ) -- CautionWarning_->outs_.master_warning_light_blinking -- fuel ipc.set ("Q400_AUX_FUEL" , readXMLIF ( 59590 ) ) -- Fuel_->systems[0].AuxFuelPumplight -- Autofeather ipc.set ("Q400_AUTO_FEATHER" , readXMLIF ( 41047 ) ) -- PCU_->AutofeatherSelectLight -- Hydraulic ipc.set ("Q400_HYDRAULIC" , readXMLIF ( 91735 ) ) -- Hydraulical_->outs_.stby_hydr_ON_indicator end while 0 < 1 do readAllXMLValues() ipc.sleep(50) end The reason, why I read all the values at once in one single module is, that the interface always fetches one single value at one time. If you would call it from several independent threads, the calls could interfere. This is a limitation of the current XML interface. The training edition will include a more sophisticated interface. Luckily most of the values can be read directly out of Lvars and you can avoid the XML-Interface. So a simple ipc.readLvar("<<<variable name>>>") will provide you the value directly. If you have no programming skills, it's hard. Maybe you find some student nearby, which helps you with that part. You can offer him later some simulator hours 😉 Rgds Reinhard
  4. Hi, If you use only FSUIPC for your assignments, you could eliminate all assignments of the P3D control configuration file with an editor and make it afterwards read-only. Then no automatically added assignments to axis, buttons, etc. will happen anymore. I am currently not at my PC but I think it should be here: %APPDATA%\Lockheed Martin\Prepar3D\Controls\Standard.xml Rgds Reinhard
  5. aua668

    Undocking panel views

    Hi, I am not aware, that this is possible. But you can save a scenario with undocked panels. Then start your flight with that scenario and the panels are undocked. You can hide/unhide the panels per LUA code. Rgds Reinhard
  6. Hi, I just found in the SPAD documentation: So you can map your hardware to virtual joystick buttons, which you then could map to LUA actions (or check them via the event library in your LUA scripts, which is the preferred method to implement such functions). Rgds Reinhard
  7. Hi, I don't own and use SPAD.next. I use GoFlight hardware - so the buttons and switches are visible in FSUIPC directly. In LUA scripts I am listening to these button events and I trigger the necessary activities to set or to get the values in the Q400 via the XML interface. According to your plan, to map these actions to keyboard events in SPAD.next, you could then assign the LUA actions in FSUIPC to these keyboard events. But strange, that you are not able to see these events directly in FSUIPC. But as I don't own this type of hard- and software, I can't help you in that topic in detail. The XML interface is obviously bound to the Pro version. So an upgrade is necessary. The upcoming training edition will get additional interface options for cockpit builders. But no clue, when it will be available. Typically this time frame is two weeks 😉 The Pro version has some nice additional features (eg the 125Hz control of the main input axis). Q400 version comparison Rgds Reinhard
  8. Hi, You need to write a small program in LUA to get values from the output variables. The best source to start is to check, how this was implemented in the Q400 module of LINDA (great SW by the way - check AVSIM for it). There you will find a lot of source code, reading output values from the Q400. LINDA Forum In short words: You have to find out the hash value of the variable with the supplied tool. Then you set a specific Lvar with the hash value and you will get the return value in another specific Lvar. This procedure is documented in a ReadMe file supplied with the Q400. Rgds Reinhard
  9. Alessandro, For interfacing to the Q400 you should use the XML interface documented by Majestic. This means a little bit LUA programming but by that method you are able to access all Q400 functions. Check your Q400 documentation folder. Mouse macros are not working well, as parts of the panel are not using the standard SDK and by that not all functions can be trapped by the mouse macro option. So check the XML interface. I am not sure, if this requires the Pro version, which I use, or if it is already included in the Pilot edition. Rgds Reinhard
  10. Hi, You can use the XML-Interface as documented by Majestic. It works in FSUIPC5 without any problem. So follow the documentation and you can access all variables. Rgds Reinhard
  11. Hi, Assign them on the button tab of FSUIPC. Page 26 of the FSUIPC User Guide shows you the dialog. Rgds Reinhard
  12. Hi, How are your switches connected to the simulator? Are they recognized as normal buttons? In that case you simply can assign the appropriate controls to it without LUA programming (TOGGLE_TAXI_LIGHTS, LANDING_LIGHTS_TOGGLE). Rgds Reinhard
  13. Hi, I referenced the FSUIPC manual. Rgds Reinhard
  14. Hi, Here is my configuration I used for the C750 from Eaglesoft when I have been on P3D v3: [Axes] : 5=GY,128,F,66420,0,0,0 -{ TO SIM: AXIS_THROTTLE1_SET }- 6=GY,B,-16384,-8000,x010066D5,x01,x010066D5,x00 -{ TO SIM: AXIS_THROTTLE1_SETEntering=offset byte set, offset 66D5, Leaving=offset byte set, offset 66D5 }- 7=GZ,128,F,66423,0,0,0 -{ TO SIM: AXIS_THROTTLE2_SET }- 8=GZ,B,-16384,-8000,x010066D6,x01,x010066D6,x00 -{ TO SIM: AXIS_THROTTLE2_SETEntering=offset byte set, offset 66D6, Leaving=offset byte set, offset 66D6 }- : [Buttons] : 2=B66D5=1 RG,3,C65966,0 -{THROTTLE1_DECR}- 3=B66D5=1 UG,3,C65967,0 -{THROTTLE1_CUT}- 4=B66D6=1 RG,2,C65971,0 -{THROTTLE2_DECR}- 5=B66D6=1 UG,2,C65972,0 -{THROTTLE2_CUT}- : So I triggered a change in a user offset 0x66D5 and 0x66D6, when I entered a special zone with the throttle. This again was used in a conditional button to trigger and release the rvereser. In the advanced user manual you find more details about this type of tricky button programming. This was with GoFlight hardware, which has reverser buttons if you move some levers towards the throttle. As this should only happen if you are in the idle area (and not inflight), this trick was necessary. Maybe this helps you to solve your problem or point you toward a solution. Rgds Reinhard
  15. Hi, There was a tool available at http://www.wingmanteam.com/files/Tools/Caffeine/Caffeine.exe fixing this problem for the Logitech cordless joystick. The site isn't available any longer. Maybe you find another source. But don't mix it up with a similar program with the same name, which is keeping your PC alive. This version was especially programmed for the Logitech joystick. Rgds Reinhard
×

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.