mgh Posted February 22, 2012 Report Posted February 22, 2012 For various reasons I would like to control two engines using a single throttle lever and another programmable variable as follows: Write 8 (bit 4) to 0x310aRead 0x332e to LeverWrite Lever * f1 to 0x088cWrite Lever * f2 to 0x0924[/CODE]This controls the engines as I wish when I test it with a with stock FS twin-engined aircraft. The engines and individual levers follow 0x088c and 0x092c respectively.Ultimately, in my own aircraft, I need a single throttle lever which visually follows 0x332e..Any ideas welcome!
Pete Dowson Posted February 22, 2012 Report Posted February 22, 2012 Any ideas welcome! What other ideas do you need? You seem to have laid down the ideas you want. What's the problem? Just implement it as you state. What language are you using? You could do it all easily with a small Lua plug-in, but it sounds as if you are implementing an external program. Either would work. BUT, I'm not understanding the distinction between "visual" and actual throttle position. The visual graphic on screen? That follows the offsets you propose writing to, which are also the actual positions. Why the distinction? Regards Pete
mgh Posted February 22, 2012 Author Report Posted February 22, 2012 May be I wasn't clear enough. I've coded it in C++ as a separate process and it controls the engines correctly. By "visual" I mean the throttle position shown in the virtual cockpit: by "real" I mean the joystick physical position. What I want to achieve is that the visual throttles remain in sync with the physical one so that the visual throttles always follow the physical one. What actually happens is that the visual throttle position changes with changes in my variables f1 and f2 even though the physical position is unchanged.
Pete Dowson Posted February 23, 2012 Report Posted February 23, 2012 By "visual" I mean the throttle position shown in the virtual cockpit: by "real" I mean the joystick physical position. What I want to achieve is that the visual throttles remain in sync with the physical one so that the visual throttles always follow the physical one. What actually happens is that the visual throttle position changes with changes in my variables f1 and f2 even though the physical position is unchanged. So why are you multiplying by some (undefined here) variables? Are the values that far out if simply calibrated by your software? For forward thrust the range of the hardware should be mapped to 0 to 16383. If the throttle lever on screen includes reverse thrust, then the lowest value depends on the aircraft config file -- a max reverse thrust is defined there. eg. 25% would equate to a minimum value of -4096. If you sent your axis values to FSUIPC for assignment and calibration, you can use the "sync pos" facilities in the calibration section to make the two equate as closely as you liked. Otherwise I assume you are trying to derive a formula for your variables f1 and f2 which is really only determinable by measurement of the output of your hardware at a number of positions. A table lookup might be more appropriate unless the output is reasonably linear or predictably logarithmic (depends on how it is built of course). The "sync pos" facilities in FSUIPC's calibration use table look up and linear interpolation between set points. Regards Pete
mgh Posted February 23, 2012 Author Report Posted February 23, 2012 It's simpler than that. Basically, I want to control a engine (1 for exmple) by writing directly to offset 0x088c. That does control the engine but has the side-effect of moving the visual throttle position to match the value written. In other words, the visual throttle position is determined by 0x088c. What I want is for the visible throttle position to be determined by the value of offset 0x332e and not to change with the value of offset 0x088c.
Pete Dowson Posted February 23, 2012 Report Posted February 23, 2012 Basically, I want to control a engine (1 for exmple) by writing directly to offset 0x088c. That does control the engine but has the side-effect of moving the visual throttle position to match the value written. In other words, the visual throttle position is determined by 0x088c. Yes, of course. and vice versa, 088C reflects the throttle position. That is exactly what it is for. What I want is for the visible throttle position to be determined by the value of offset 0x332e and not to change with the value of offset 0x088c. Unless you replace the throttles gauge with your own version which does that you cannot do it, because the FS throttle position is represented by the value in 088C. that is exactly what 088C is: the throttle position! They are one and the same thing. the gauge is simply doing what it is told by its code. Why on Earth would you want FS to lie to you about its throttle position? I don't understand. Regards Pete
mgh Posted February 23, 2012 Author Report Posted February 23, 2012 Unless you replace the throttles gauge with your own version which does that you cannot do it, That's the answer - not the one I was hoping for so I'll have to write my own gauge.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now