-
Posts
38,265 -
Joined
-
Days Won
170
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by Pete Dowson
-
rotary switches and FSUIPC
Pete Dowson replied to gr8guitar's topic in FSUIPC Support Pete Dowson Modules
First, why are you editing the INI file directly instead of using the options dialogue? Or at least try one of them that way so you can see the correct format! Second, if you do want to proceed by editing the INI directly, it is best to at least refer to the Advanced User's guide to find the correct format. You would then have noticed that whilst the Buttons format needs an explicit C or K to differentiate between those assigned to Keypresses and those to Controls (left and right side of the assignments tab, respectively), assignments to Keypresses need no such differentiation because there is no option to assign a Keypress to a Keypress! There's really no need to edit these things directly in the INI unless you want multiple assignments to the same Keypress or Button, or, in the case of Buttons, some sort of conditional operation. Even then, do please start from ones programmed in the options dialogue so you get the format right. Regards Pete -
Question on thrust reverser inputs
Pete Dowson replied to airforce2's topic in FSUIPC Support Pete Dowson Modules
How unusual. I'm left wondering how it manages to override the reverser axis attempts to set reverse thrust. The normal fSUIPC4 facility to intercept the throttles so that the fly-by-wire method can be used doesn't affect the separate reverser axes. There is a separate offset which can be used to stop the reversers operating, but I don't understand why they'd use that. The only other thing i can think they might be doing is seeing the normal throttle axes remaining at zero and continuously resetting FS's throttles to idle in response. That's a bit nasty really. FS does not provide a separate reverser axis. In fact it supplies no reverser axis action at all except by the fortuitous circumstance that Microsoft did not remove the original FS98 throttle controls (ThrottleN_Set) when they implemented the newer ones (Axis_throttleN_set) -- the latter don't have any reverse zone. FSUIPC just takes advantage of the older controls to provide both the reverse-on-throttle-axis facilities and the separate reverser axes. Yes, this is true, though maybe not in the way you understand. The term "axis" applies to the input device being assigned. The internal mechanism for controlling the throttle is an FS control which is the result of one or other of those axes. In the case of separate forward thrust axes and reverser axes the resulting controls sent to FS may or may not be the same. For reverse action they have to be "ThrottleN_Set" controls. For forward thrust they can be "ThrottleN_Set" controls or "Axis_ThrottleN_Set" controls, or the generic "Axis_Throttle_Set" control which applies to all selected engines (eg selected by E + 1,2,3 and/or 4). You need to separate the concept of input mechanism and resulting action. The offsets 3330 etc record the inputs, after calibration, not the results sent to FS. Regards Pete -
Goflight radios (GF-166) and ATC not lighting up
Pete Dowson replied to CBB's topic in FSUIPC Support Pete Dowson Modules
It sounds like you haven't installed the Goflight driver? FSUIPC and GFDEV.DLL are only relevant if you've programmed the knobs in FSUIPC, but FSUIPC itself doesn't provide any display facilities -- you would need to program the displays in a Lua plug-in to get them to do anything with FSUIPC, or maybe use my now unsupported program, GFDisplay.exe. All that will do is stop FSUIPC recognising any GoFlight modules, unless you also have GFDev.DLL in the proper installtion place for GFConfig etc (FSUIPC will find it via the registry pointer). I don't actually use GF devices with any of the GF software other than GFDev.DLL and I don't use any of the devices for any of their normal functions. For normal radio use you need to use the standard GoFlight drivers. I really know nothing at all about them having never used them. Sorry. Regards Pete -
Question on thrust reverser inputs
Pete Dowson replied to airforce2's topic in FSUIPC Support Pete Dowson Modules
Just one reverser axis for both engines? Interesting. I've never heard of an application which interferes with reverse thrust application. All the add-ons which make use of those offsets tend to be either doing fly-by-wire, and are therefore manipulating the modes or settings according to the input, but not applying it directly, or simply autopilots which only control the throttle when A/T is engaged and use those offsets to determine whether to auto-disconnect the A/T on user input. Neither of these normaly has any involvement in reverser operation. What does this add-on do with the throttle axis offsets that it needs to see the reverser? Neither. Those offsets are described as providing the calibrated axis value from the axis assigned to the stated function. The separate reverser axes are just that, separate axes. I've never known any application for offsets to reflect them specifically, so one was never implemented. Regards Pete -
Losing Spolier Detection
Pete Dowson replied to Tomlin's topic in FSUIPC Support Pete Dowson Modules
When you enter FSUIPC's axis assignments it simply re-scans all joystick attachments in EXACTLY the same way as it does when it is first loaded. So it sounds like your device is asleep, or at least partially so. Have you tried waggling the axes before FS is loaded, or at least whilst it is loading? Are all those functions on the same device? If so try, as an experiment, swapping the spoiler lever assignment with one of the others. I suspect you'll find it is just that one hardware axis 'sleeping'. Maybe the power isn't sufficient? Is it on a powered hub? Have you switched off the Windows power management, which removes power from inactive connections? Regards Pete -
pmdg 744 fs9 gear lever
Pete Dowson replied to speedbird 10's topic in FSUIPC Support Pete Dowson Modules
How have you assigned the axis to the gear? I don't know of any axis controls for gear levers. The "off" position tends to be decorative on the screen rather than operational. FS itself only supports Gear Up and Gear Down. If the PMDG 744 has its own ways of selecting the positions then in order to use those from an axis you'd have to program it using the right-hand side of FSUIPC's axis assignments tab. Define the three zones, assigning whatever is needed to each. Regards Pete -
Fatal Error - FSUIPC 4.758 & Vista
Pete Dowson replied to miata54's topic in FSUIPC Support Pete Dowson Modules
First of all, please update to a currently supported version. 4.80 is available at all the usual places, 4.7xx was withdrawn some weeks ago. Second, please look to see if FSUIPC produced a run-time log file (FSUIPC4.LOG), because if it did not then it hasn't even been loaded and you are experiencing the SimConnect trust bug. Please refer to the first pinned thread in the FAQ subforum. If it did produce a log then please show it to me. Crashes at that stage are usually due to corrupted weather files. But I'd need to see that log. Regards Pete -
I think you are nearly there, but you are missing at least one important thing about C functions called by Lua. In this code extern "C" int my_ngxTest(lua_State *L) { return 102; } static int luaopen_ngxSDK2Lua(lua_State *L){ static const luaL_Reg asd [] = { {"ngxTest", my_ngxTest}, {NULL,NULL} }; luaL_register(L,"ngxSDK2Lua", asd); return 101; }[/CODE] There are four things wrong. First there's certainly no need to declare the actual contained library rourtines "extern "C"". In fact they can be "static int ..." declared, because their address is NOT exported in C fashion but by the list you return from the luaopen ... call. Second, the value returned by any routine called by Lua is simply the number of parameters being returned. You are saying above that "my_ngxTest" returns 102 parameters. For that to be correct you have to have pushed those 102 parameters on the stack (using one or more of the assorted lua_push.... functions). If you merely want it to return the value 102 you'd do this: [CODE] lua_pushnumber(L, 102); return 1;[/CODE] Third, it is your luaopen_ngxSDK2Lua function which needs exporting from the DLL so that it can be called by Lua as the function it wants to call to get the list of contained library functions. By not exporting this, you are getting the error you see. It can't find the luaopon_... function it needs to start things off. In fact you declared it "static" which is the direct opposite of exporting it! To export it declare it like this: [CODE] EXTERN_C __declspec(dllexport) int luaopen_ngxSDK2Lua(lua_State *L){ ...[/CODE] Fourth, the same consideration for the return from the luaopen applies as it does to the library function you want to add. In this case "luaL_register" has pushed the table of library functions onto the stack, so there's already the one item, all that this function should return, on the stack -- so you then just "return 1" to say so. Regards Pete
-
FSUIPC FSX,how to delete BU0836X
Pete Dowson replied to john737's topic in FSUIPC Support Pete Dowson Modules
There's no such thing as "deleting a card" in FSUIPC. There are assignments, not cards.. Do you actually want to delete all your assignments? Just look in the FSUIPC INI file. You will see [buttons] sections and [Axes] section. If you delete those you'll have no assignments whatseover to any device. But that won't make your flight controls work, will it? To make controls work they need to be assigned, not deleted. FSUIPC does include facilities for keeping track of controllers -- see the section on Joy Letters. If you want to be able to move things around without losing assignments you should really make use of those facilities first. Maybe you can temporarily move thing back the way they were, then enable the Joy Lettering option, and then move them as you want? That would be the best way. FSUIPC will be able to keep track then as it will be using the letters assigned instead of the Windows joystick IDs, which are getting changed. Alternatively if you know the old joystick number and the new one you can edit all of the Button assignment lines and the Axes assignment lines which currently refer to the old ID number to refer to the new ID.number instead. Regards Pete -
Yes, but that way you forgo the ButtonScreen's toggle facility (i.e. sending alternately "press" and "release" instead of press-release with each press), and are forced to use the button flag method of making buttons into toggles in the FSUIPC INI. I agree both would work fine, but if you are happy with "Red" for "On" the BS toggle option along with the use of the setbtnstate function is easier. Or just use up some of the 288 buttons as indicators without assigning actions in FSUIPC. BTW WideClient 6.952 is up now. Regards Pete
-
The modules/dll optin was quite recently added. Is your FSUIPC up to date? (4.80 or later).
-
Actually, I thought of another way -- and i've tested it here, and it works. The Lua ext library can be used to move and size the window on any screen, by screen number, and any position/size as a proportion of the screen size. For instance, in the example from earlier: w1 = wnd.open("Paused", WND_FIXED, 10,10,190,110) ext.position("Paused", 50,50,25,25,2)[/CODE] The "Paused" window will go to Screen 2, top left positioned at dead centre (50% across, 50% down) and have a width equal to 25% of that screen width and height 25% of that screen height. So using that you can tile the windows all over any screen you like without resorting to pixel counts! Yes, but currently that won't work with buttons on the button screen designated as "Toggle" (T or TN). They send a "press" and "release" on alternate presses, to simulate a proper toggle switch rather than a button, and change their own colour from their defalut to RED when the press is sent. I've just added and tested this facility: [b]ipc.setbtnstate(button, state)[/b] which tells the ButtonScreen to assume the toggle is in its "pressed" state if [b]state [/b]is non-zero, but in its released state if that parameter is zero. Using this I have the Lua plug-in working for my cockpit (this is just an extract). Note that there are duplicate buttons for some things, like Pause and Slew, because I have many button-selectable pages in my ButtonScreen setup, and common needs like Pause are replicated in most pages. [CODE] -- Set Toggle button states to match FS settings function mkrsound(off,val) ipc.setbtnstate(2, logic.And(val, 4)) end event.offset(0x3122, "UB", "mkrsound") function pause(off,val) ipc.setbtnstate(20, val) ipc.setbtnstate(44, val) ipc.setbtnstate(68, val) ipc.setbtnstate(92, val) ipc.setbtnstate(116, val) ipc.setbtnstate(140, val) ipc.setbtnstate(163, val) end event.offset(0x0264, "UW", "pause") function trafficoff(off, val) ipc.setbtnstate(21, val == 0) ipc.setbtnstate(45, val == 0) end event.offset(0x0250, "UB", "trafficoff") function doors(off,val) ipc.setbtnstate(31, logic.And(val, 1)) ipc.setbtnstate(35, logic.And(val, 2)) ipc.setbtnstate(39, logic.And(val, 4)) end event.offset(0x3367, "UB", "doors") function slew(off,val) ipc.setbtnstate(96, val) end event.offset(0x05dc, "UW", "slew")[/CODE] I' ll upload WideClient 6.952 with this addition within the hour ... Regards Pete
-
Yes: x, y, cx, cy x = horizontal-position of top left corner, in pixels, counting left-to-right. y = vertical-position of top left corner, in pixels, counting top-to-bottom. cx = window width in pixels cy = window height in pixels Windows uses x,y coordinates which extend from the top left corner of the leftmost topmost screen to the bottom right corner of the rightmost bottommost screen. The top left of the main windows screen is always 0, 0, so any left or above that will have negative values for coordinates. So, it's either a matter of trial and error, or working it out. The relative positions of screens are controlled and shown in the Windows screen applet, and that also controls the resolutions in use, so you can compute positions and sizes. Yes, of course. There's no other way of doing it. Nothing else but the instance of Wideclient providing the ButtonScreen knows anything about where the buttons are. I'm adding another ButtonScreen function in Lua: to set the state of a Toggle button, so that I can make the Red or Green state indication reflect the relevant offset setting in FS. Regards Pete
-
Why do you want to use an offset? FS provides a control for that which you can assign in FSUIPC's assignments dropdowns or send from Lua using ipc.control. It is "Toggle GPS drives NAV1" (66375). And, yes, offset 132C also reflects and operates that switch -- as clearly documented in the FSUIPC4 offsets status document, which should be your reference. You'll need to clarify what it is you are after here. If you want to fill all the fuel tanks by program or plug in you have to set all of the levels to 100% Again the offsets list shows all of the tank level offsets and the units used. FS does not and never has simulated this switch. There might a local switch on some of the gauges but it doesn't do anything. Therefore there are no offsets and no controls for this. FSUIPC does offer some controls to talk to Squawkbox about the settings though. Regards Pete
-
Ah, sorry, my mistake. Pete
-
Please also see this thread over in MyCockpits: http://www.mycockpit.org/forums/showthread.php/24264-Lekseecon-for-737NGX-and-IOCPClient-example Regards Pete
-
FSUIPC installation problem
Pete Dowson replied to SSI01's topic in FSUIPC Support Pete Dowson Modules
Do you mean "XP"? I don't know any "Windows SP". With XP SP3 I most certainly get the "run as administrator" option when RIGHT clicking on any EXE program. Place the Install FSUIPC.EXE program into a folder, view it in Windows Explorer, then right click on it. What options DO you see? If there's a "Run As" click that. This may bring up a dialogue window in which you can select either "the current user" or "the following user", and in the latter case you sohuld be able to select "Administrator" (maybe with a password if you set one). What places? Sorry, I don't understand. Windows does not report such an error just for fun! It sounds like you have run FS9 and it has hung on closing. Some add-ons can cause this to happen. Its windows are all closed so you can't see it, but check the Task Manager's process list (right click in the task bar, select Task manager then the Processes tab). You can either terminate the FS9.EXE process forcibly from there, or just re-boot Windows and DON'T run FS9 until after you complete FSUIPC installation. Regards Pete -
There's no FSUIPC4 download available from simMarket. They only sell the registration keys. There's no version "2068" either. There's no transponder switch facility normally operating in FSUIPC unless you assign one, because FSX doesn't really simulate any of the switches on the transponder. If Flight1 are doing something for Squawkbox4 maybe they are doing it directly, not via FSUIPC4? Possibly they are also using the old FS9/Squawbox 3 offset in FSUIPC so that their code works in both. That would create a double action. Please look up the parameter NoActionOn7B91 in the FSUIPC4 Advanced User's guide (on about page 11). Maybe that will help. There's nothing in FSUIPC to set up. Not many aircraft designed for FSX use FSUIPC to get the weather, they use SimConnect directly. I think you need to ask Wilco because I'm certainly not aware that they use FSUIPC.. Regards Pete
-
Why did you need FSUIPC before, and who says you did? If you are a programmer you could have written whatever you needed to do already, before the SDK came out! All the SDK does for you is give you the specifics of what you found out in any case. There is absolutely nothing in FSUIPC which knows anything about the NGX itself. Pete
-
FSUIPC installation problem
Pete Dowson replied to SSI01's topic in FSUIPC Support Pete Dowson Modules
Are you logged in as the sole user or the administrator of that system? What version of Windows is it? The program runs, then I get this dialog box saying the system can not find the path specified. The path specified is: However, the Registry most certainly has the FS9 entries pointing to that folder as the one where FS9 is installed. Try running the FSX/FS9 Registry Repair utility from here: http://www.flight1.com/view.asp?page=library BTW, why didn't you post your question here, in the FSUIPC Support Forum, in the first place? It is listed as the place to come in all the FSUIPC documents, and on its main options screen, and on the download webiste. Regards Pete -
Whoops. Sorry, the colours should of course be red, green, blue. (RGB, the standard order). I edited the original post too in case others use it. Pete
-
You can check the axis assignment in the Axis assignments tab in FSUIPC options. Just go there and operate the hat, see if it's assigned. To eliminate other possible duplicates, first check exactly what is happening. Enable both Event options on the left side of the Logging tab, operate the hat, then view the log. If you put FSX into Windowed mode and enable the Console in the Logging tab you will be able to see what happens in the Log in real time. Regards Pete
-
Okay. Since version 6.95 I have added a fixed window option, which has no borders and no title bar, so it would work with that. The only problem with that is it isn't movable or closable by the user without borders or title bar, so you have to get it the right size in the Lua wnd.open call. However, once you have worked that out it would be simple enough to tile the screen with such windows. I'm working on the ButtonScreen method. There will be a new ipc library function, ipc.setbtncol(buttonnum, red, blue, green) where the button number is 0-287 for the 288 possible button positions. [LATER] Okay. Download Wideclient 6.951. Two things you can try. One is just edit that example Lua i provided early. Change the wnd.open line to: w1 = wnd.open("Paused", WND_FIXED, 10,10,190,110)[/CODE] That's one way. Try it anyway, just to see. Otherwise, use your button screen and change colours by using: [b]ipc.setbtncol( button, red, green, blue)[/b] where button number is 0-287 for the 288 possible buttons (but don't select one designated for Toggle, because that controls its own colour), and the colour values are each 0-255. Block would be 0,0,0 and white 255,255,255. Have fun. Regards Pete
-
There are lot a lot of things you can do with a Lua plug-in which don't involve offsets. Take a look at some of the User Contributions in that subforum. If there was a DLL which could be called from a Lua plug-in t retrieve data from the NGX, it could be sent to displays or whatever using the exisiting Lua facilities. Using offsets would be a way for those writing apps to interface to FSUIPC. The Lua plug-in methods are more oriented towards end users who just want a way of getting their hardware operational with the NGX. Do what? Judging by the User Contributions so far, controlling the NGX switches is currently a mix of folks using L:Vars (Local gauge variables), event numbers folks have found for themselves by experiment, and actualy mouse clicking on screen. Not many of the values needed for cockpit displays have been found -- that's where the main use of the SDK will come in. I am NOT a PMDG NGX user myself. I use Project magenta in my cockpit with a modified default FSX 738. Pete