Sign in to follow this  
kaydub

Controlling power from keyboard or other input (FADEC)

Recommended Posts

To those who may know how: I am thinking about developing a FADEC type system, just to learn something about MSFS and its operation. Is there a way to access the power settings through a gauge? Let's say I program a gauge to read N1, and increase or decrease the power according to N1. If N1 is below a certain value, the gauge increases the throttle, or vice versa. Is power setting available from a gauge? Is there another way to set power besides the keyboard or joystick? I'm intrigued. KDub

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>Hi,>>Very good possible with an XML-gauge, but requires some>programming.>Do some search here in the forums, you could start here:>>http://forums.avsim.net/dcboard.php?az=sho...ing_type=search>>Jan>>"Beatus Ille Procul Negotiis" Jan: Thank you very much for showing me that thread! This is exactly what I am looking for, a place to start. I got help a couple of years ago from Dai Griffiths, (another person who was very happy to help those who know nothing), and with his expertise, I actually learned how to code C gauges. I made a couple of rudimentary gauges for a plane I built and had a lot of fun. On top of that, Bill from Eaglesoft, (involved in the thread you pointed me to)has been real encouraging about my getting back into developing in MSFS. I think this is where I could contribute a little, maybe making a gauge every once in a while. I am going to see what I can learn about XML, and try to make this thing. Kdub

Share this post


Link to post
Share on other sites

Hello,so if you are also doing C gauges, have a look at the Panels SDK (actually the EventIDs.doc document). There you will find key events that can be triggered using trigger_key_event (event, value). That way you should be able to set the power accordingly.If you have any questions about this, feel free to ask. :-)Good luck, :-hahEtienne :-wave

Share this post


Link to post
Share on other sites

Etienne: Ok, I am very rusty. I should have thought about that. I was thinking all I could do was read settings within FS, I forgot I could create settings. I need to sharpen up here. Thank you for your help. K

Share this post


Link to post
Share on other sites

Not a problem dude. If you need anything, do not hesitate to ask. :-hahEtienne :-wave

Share this post


Link to post
Share on other sites

>Not a problem dude. If you need anything, do not hesitate to>ask. :-hah>>Etienne :-wave Well, I have some usable code in FS98 now, but I can't seem to properly set up the gauge table under FS2004. My compiler gives me 10 errors within the gauge table, I've poured over the code and I don't see how it can be so wrong. The master source file is so short, it must be something simple. Kdub

Share this post


Link to post
Share on other sites

Which compiler are you using (or rather, trying to use)?

Share this post


Link to post
Share on other sites

>Hi Bill:>> Thanks for responding. I am using MS VC6, standard>edition.If you like, send me the code at n4gix@comcast.net and I'll have a look at it. I use Microsoft Visual C++ .NET v6 (but I run the 7.1 Optimized Compiler beta).What type of errors are you getting?

Share this post


Link to post
Share on other sites

>>Hi Bill:>>>> Thanks for responding. I am using MS VC6, standard>>edition.>>If you like, send me the code at n4gix@comcast.net and I'll>have a look at it. I use Microsoft Visual C++ .NET v6 (but I>run the 7.1 Optimized Compiler beta).>>What type of errors are you getting?Thanks Bill: I have an idea what is wrong, now. My update routine which I pasted from my FS98 gauge to my subgauge file gives me errors in my master source file in the gauge header lines. Debugging was cryptic enough in FS98, it's a mess in FS2000+. The debugger was talking about line 17 in my master source file, and the problem is in line 67 of the subgauge file! Kdub

Share this post


Link to post
Share on other sites

Bill: Thanks for offering to help. Do you know of any debugging techniques I could learn to facilitate tracking down these problems? I solved this one by deleting the code from my subgauge and rebuilding it line by line. I found the difference between FS98 and FS2K4 structure in this instance, but a more direct process would be nice. Kdub

Share this post


Link to post
Share on other sites

No, I honestly don't... I am still coming to grips with the structure and syntax myself, and at this point keep referring to the "recipie book" (the SDK.gau examples) to provide guidance...Also, since I only began gauge coding late in the FS2k2 cycle, I never had any experience from the FS98 scheme to "unlearn" or even serve as a basis for comparison... ;)Personally, I can't wait until Marcel & Co. finish up Easy Gauge - Next Generation, which will offer complete GDI+ vector drawing support, moving maps, etc. ;)

Share this post


Link to post
Share on other sites

>The debugger was talking about line 17 in my master source>file, and the problem is in line 67 of the subgauge file!Evidently the debugger in v7.1 is improved, since it provides me the immediate problem, but also points to the "original source" of the problem in whatever other file is referenced... ;)

Share this post


Link to post
Share on other sites

>>The debugger was talking about line 17 in my master source>>file, and the problem is in line 67 of the subgauge file!>>Evidently the debugger in v7.1 is improved, since it provides>me the immediate problem, but also points to the "original>source" of the problem in whatever other file is referenced...>;)Bill: Well, that sure sounds good! I need to look into that, because the larger this code becomes, the more convenient debuggers are. I don't have to have this feature, since my gauges are small right now.It just took me awhile to figure out I was looking at the wrong file. Kdub

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this