-
Posts
38,265 -
Joined
-
Days Won
170
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by Pete Dowson
-
Okay. So this Lua script should work done = false function checkalt() alt = ipc.readSD[0x0574] * 3.28084 -- gets AMSL in metres, converts to feet if alt > 4000 then if not done then ipc.keypress(120,1) -- send Shift+F9 done = true end else done = false -- makes sure sent when next climb above 4000 end end event.timer(1000, "checkalt")[/CODE] I don't know if you need some other key sent to change it back on descent, but you can see where to put it. Place it in the Mdules folder, named, say, SetEMB.lua, and add [Auto] 1=Lua SetEmb to your FSUIPC INI file. Regards Pete
-
Trouble with 0x88C offset in C#
Pete Dowson replied to rafaelcoronel's topic in FSUIPC Support Pete Dowson Modules
The prop control has no effect on jets. It isn't used. Pete -
Trouble with 0x88C offset in C#
Pete Dowson replied to rafaelcoronel's topic in FSUIPC Support Pete Dowson Modules
You posted this twice. I answered the other post, but I see Paul has given you a good answer here. Please only post in one place at a time. Regards Pete -
Inputting throttle data via FSUIPC
Pete Dowson replied to becca23's topic in FSUIPC Support Pete Dowson Modules
FSUIPC has no idea what language you use. On its side of the interface a write to 088C is a write to 088C no matter how it was done. It sounds like your program is writing more than once, or writing to more than once place. Why not use the Logging facilities in FSUIPC to find out what it is doing? That's what they are there for. Just enable IPC write logging and see what really gets written. Maybe your code is writing more than 2 bytes, the size of the 088C offset? For instance, if it were writing 4 bytes (the size of a normal 32-bit integer) then it would also overwrite 088E, the prop lever setting, with zero. This wouldn't have any effect on normal jets which don't use it, but it certainly would on props and helos. I'm afraid I have no idea about C#. It is completely alien to me. Have you thought about using Paul Henty's DLL for such a lanugage? See the link in the Download Links subforum. Regards Pete -
Ah, yes, I know it. I tried it but didn't like the results -- not so good on my 10 foot wide projected image. As Alaxus says, see if just assinging a keystroke to a button works. If so we can make a Lua for it. If not it is probably looking for the actual keyboard keypress, which I am not hooking into (needs more provileges, like a driver, to do this), so I'm afraid it then wouldn't be feasible. Regards Pete
-
I've moved your support question into the Support forum. You placed it into User Contributions by mistake. What's an "ENB Mod"? Is it something in FS, or a program outside of FS, or what? It makes a difference because of keyboard focus. You need to read the altitude from the correct offset (do you mean altitude on the altimeter, or true altitude AMSL, or AGL?). You could do this in a loop reading the offset once a second or more frequently (using a timer event), reading it via the appropriate ipc.read function, then send the keypress -- via ipc.keypress if this "ENB Mod" is inside FS -- when that checks >= 4000 feet, and ... then, do what? Terminate? Or does it need to do it again if you descend and climb again? I can help but as you see I woould need more information. Regards Pete
-
The problem is the IP address being supplied for your Server: This is NOT a local network address, but appears to be your ISP: IP: 208.67.216.145 Decimal: 3494107281 ISP: OpenDNS, LLC Organization: OpenDNS, LLC Country: United States State/Region: Washington City: Seattle I think this happens because of some weird setting on your router. But please see the FAQ subforum thread entitled WideFS Server names translating into incorrect IP addresses Regards Pete
-
Well, evidently it isn't just FSUIPC which is suffering, as Aviasoft and Saitek both use SimConnect, directly, not FSUIPC. And Real Environment? I thought that was just textures -- or do you mean the Weather engine? If so, that's SimConnect direct too. That is relatively recent, but it isn't the current one -- 4.758 is the latest Install package, and there's also a 4.761 interim update in the Download Links subforum. Looking at the SimConnect stall reports, they seem to be regular, with a few interesting excptions, at about 120 second intervals (with 240's or close now and then, missing ones?). Here, I've separated out all of the stall reports and put the intervals at the end of each line: Something in your system is preventing something SimConnect is doing from operating correctly at those intervals (the interval certainly isn't FSUIPC's -- it times out SimConnect, by default, after only 1 second without messages). Maybe some sort of virus scan, or automatic background defragging, or something to do with the Network, maybe? (Simconnect uses TCP/IP protocols even withing the same PC, to talks to external programs). I think you need to examine everything that's going on in your system. Try a process of elimination, stopping one thing at a time, till you nail it. You might want to try the general FSX forums too, both here and in AVSIM. someone else might have seen such a thing before. Regards Pete
-
You evidently do have two assignments to that button. If you have one in FSUIPC you couldn't have added another without editing the FSUIPC INI (settings) file -- FSUIPC does allow multiple settings but only by manual editing, not via the dialogue. I suspect you have one in FSX which you missed. To check this simply disable all controllers in FSX -- if that fixes it, then the other assignment is there somewhere, and either you missed it or FS has sneakily reassigned it. (It will do auto-reassignments if you do things like disconnect and reconnect controllers). If it is neither of those then you would have to look at other software. Maybe there's a Thrustmaster driver doing it, or some other add-on? Regards Pete
-
AP Disconnect with ACE Yoke and CPFlight
Pete Dowson replied to spotlight's topic in FSUIPC Support Pete Dowson Modules
Okay. The "AP Master" is the FS control, the same one as pressing 'Z' on the keyboard. It isn't operative with anything using its own autopilot, like several advanced add-on aircraft, and most certainly not to PM. When using PM many normal FS controls, including almost all of those related to the autopilot, are different, because it provides an alternative autopilot to the one built into FS. FS is making the sound, but it cannot switch PM's autopilot off because that is running in the PM program "MCP", not in FS. PM doesn't take over control of the gear, so that isn't really relevant here. No. Why are you thinking of using offsets? 07BC is the offset for the FS autopilot "AP Master" (same a 'Z'). It isn't a PM offset. If you want to control PM via offsets you need to visit the PM website and view the list of offsets there. I don't publish those, they are the province of PM, not FS or FSUIPC. But why are you suddenly talking about offsets? There are two PM AP disconnect controls implemented in FSUIPC, one for 747 and one for others, as I pointed out in my last message. They are both listed in the Advanced Guide for FSUIPC (which is what I referred you to, not an offsets list), and they both appear in the drop-down assignments list when you have the PM controls option checked. Regards Pete -
What "settings"? FSUIPC can only override keypresses. It does that by intercepting the Windows keyboard messages. It cannot ever override joystick controls or buttons because anythings can freely read those. You must not have buttons or axes assigned both in FS and in FSX unless you want both actions at once. All this is made clear in the manuals. Regards Pete
-
AP Disconnect with ACE Yoke and CPFlight
Pete Dowson replied to spotlight's topic in FSUIPC Support Pete Dowson Modules
What keypress is "ap disconnect"? Sorry, I don't know what you are doing. Is the ACE yoke specifically part of the problem? Are you implying that AP Disconnect works when assigned elsewhere, as to a button or keypress? If you are using PM you have to use PM's AP disconnect control, which is different for 747 and other aircraft. Check the list in the advanced user's guide for FSUIPC. For FS autopilot there's no disconnect only the AP master toggle (same as the Z key), but that's not relevant for PM. Regards Pete -
Easier simply to set "ShortAircraft NameOk=substring" in the [General] section of the INI file, then change the name of the aircraft, where it appears in the settings titles (like [buttons.<name>], [Axes.<name>] etc, to a short form which idntifies the whole group of aircraft -- such as "737" or "PMDG 737" or whatever. These days FSUIPC defaults to using Profiles, and you can change over to using those,, but best first to change those names. What? Why? Using Profiles cannot possibly affect whether a Lua plug-in works or not! Please do give me more details because I need to chase up such bad advice. Regards Pete
-
Is this the so-called "VRS Super-Bug" aircraft? If so, apparently the author made use of a bug in an earlier version of FSUIPC, so that when I fixed that bug his usage no longer worked. He contacted me and I made a little fix via the FSUIPC INI file which is enabled by adding (or changing) AxesWrongRange=Yes in the [general] section. However, this was several months ago (October last year), and the VRS author said that there was an imminent update to the aircraft which would fix this issue properly. I would certainly hope that this update was out by now! So, it sounds as if you might be out of date with the VRS aircraft. If you don't want to update, try the above parameter, but note that this could possibly have adverse affects on other aircraft. Regards Pete
-
Freeze radio buttons and led on PFC Jetliner
Pete Dowson replied to kozak737's topic in FSUIPC Support Pete Dowson Modules
I had lots of similar problems with USB serial port adapters after changing to Win 7 64-bit and ended up getting a BrainBoxes serial port card instead. Since then I've had no problems at all and can heartily reccomend them. I don't think you'll find a better solution. Check PCI Express Serial Port or PCI Serial Port Card I have one of each of those and they perform flawlessly! Regards Pete -
Offset for GS captured
Pete Dowson replied to cellular55's topic in FSUIPC Support Pete Dowson Modules
Yes, pretty much. The whole needle movement is represented by values from -127 to +127, so if "locked on" (solid lozenge) is within the 1st of 4 "tick marks" then -32 to +32 would indicate that range ... I think! Sorry, it's been a long time since I looked into this sort of thing so I don't remember. Best just monitor the 0C48 offset for LOC and 0C49 offset for GS and see what values match which mark on the ND. Regards Pete -
No, you just buy a WideFS7 key from SimMarket. Then re-run the FSUIPC installer (which is now up to version 4.758, by the way), and enter the key when you get the opportunity at the end of the installation sequence. Regards Pete
-
Help with Lua script please?
Pete Dowson replied to paulnd's topic in FSUIPC Support Pete Dowson Modules
And if you substitute the ipc.control() actions for the NGX...() function calls, even simpler / shorter. BTW I just fixed a typo -- "DECC" in last call to "DEC", and inserted two 'end' statements I omitted last night. (Things always look different in the morning! <G>). Regards Pete -
Add Delay to Controller
Pete Dowson replied to MCKINLEC's topic in FSUIPC Support Pete Dowson Modules
If he's assigning the controller in FSUIPC, he doesn't need to write a program to get a delay. FSUIPC provides such a facility in the axs assignment definitions in the settings (INI) file, as I pointed out. It is documented in the FSUIPC advanced user's guide. Regards Pete -
Help with Lua script please?
Pete Dowson replied to paulnd's topic in FSUIPC Support Pete Dowson Modules
Okay, so there's really only two active buttons. the other two are 'passive', so can simply be tested at the time, not using events and flags as you thought. So function NGX_NAV_INC() -- dont need any parameters as you know this will be 4, 6, 1, as it is only called when pressed if ipc.testbutton(4,23) then -- NGX_SHIFT is pressed if ipc.testbutton(4, 30) then -- NGX_NAV_SEL is pressed NGX_NAV2_FRACT_INC() else --if NGX_SHIFT is pressed NGX_NAV2_WHOLE_INC() end else if ipc.testbutton(4, 30) then -- NGX_NAV_SEL is pressed NGX_NAV1_FRACT_INC() else NAV1_WHOLE_INC() end end end function NGX_NAV_DEC() -- dont need any parameters as you know this will be 4, 7, 1, as it is only called when pressed if ipc.testbutton(4,23) then -- NGX_SHIFT is pressed if ipc.testbutton(4, 30) then -- NGX_NAV_SEL is pressed NGX_NAV2_FRACT_DEC() else --if NGX_SHIFT is pressed NGX_NAV2_WHOLE_DEC() end else if ipc.testbutton(4, 30) then -- NGX_NAV_SEL is pressed NGX_NAV1_FRACT_DEC() else NAV1_WHOLE_DEC() end end end event.button(4, 6, "NGX_NAV_INC") event.button(4, 7, "NGX_NAV_DEC")[/CODE] Of course, this isn't as efficient as it could be. You are calling functions for the INC()'s and DEC()s even though they only contain one Lua statement in each. It would make it run faster by just replacing the function calls in the code above by the[b] ipc.control[/b] lines instead. Okay? Do you see the logic now? Regards Pete -
Sorry, I don't know what that means. FSUIPC's DLL is an FS module, it isn't a DLL which is directly accessible externally. You have to program to the interface it supports. Have you looked at the VB example in the FSUIPC SDK? Also check out the FSUIPC Client DLL for .NET - Version 2.0 thread in the Download Links subforum. Most folks using .Net languages other than C or ASM find using Paul Henty's interface a lot easier. Regards Pete
-
Help with Lua script please?
Pete Dowson replied to paulnd's topic in FSUIPC Support Pete Dowson Modules
Okay. Let me get some one thing clearer then. You are checking four buttons: event.button(4, 23, "NGX_SHIFT") event.button(4, 6, "NGX_NAV_INC") event.button(4, 7, "NGX_NAV_DEC") event.button(4, 30, "NGX_NAV_SEL") I take it that only two of those are "action buttons" and the other two just modify that action. So, first question: are you thinking of pressing THREE buttons together, or do you want one or both of the modifying buttons to "toggle" between the two things they select from, on each press (i.e. FRACT<->WHOLE for NGX_SHIFT and NAV2<->NAV1 for NGX_NAV_SEL). It makes a difference how it is programmed. P.S. I'm signing off for a few hours -- dinner and a TV break. Back later. Regards Pete -
Help with Lua script please?
Pete Dowson replied to paulnd's topic in FSUIPC Support Pete Dowson Modules
First, may I ask why you are using Lua for this? It seems to me that you are using standard FS controls which can be assigned directly to buttons. All you then need to do is add button conditions in the FSUIPC INI file. The result will be much more compact and efficient. I can help with that if you like. On the other hand, if you are using Lua specifically in order to improve your Lua capabilities, then I can help with that too. Your choice. If it's just the most practical answer you are after then conditional button assignments are really the way to go. BTW I note you've named everything "NGX ..." but you do realise, I hope, that the controls you are using work with all FS radios, so it isn't going to be NGX specific. Regards Pete -
Joystick Calibration: throttle Axis
Pete Dowson replied to highkoo's topic in FSUIPC Support Pete Dowson Modules
Tabs are the things at the top of the dialogue, used for selecting Axes, Buttons, calibration etc. The calibrations tab has about 11 numbered pages you can move back and forth through. Pete