Jump to content
Sign in to follow this  
Guest Patrick_Waugh

Interesting difference in same gauge behavior

Recommended Posts

Guest Patrick_Waugh

Using the 747 Jet starter in the 747, I can assign a joystick button to the starter (eng 1) and press it and have it auto-reset to off.That gauge uses this code (mod for clarity): (G:Var1) if // Counter > 0 { (A:Circuit general panel on, bool) (A:Eng1 N2 RPM, percent) 50 < && if // if ( power && rpm < 50 ) { 0 (>K:TOGGLE_STARTER1) // Set starter to zero } els{ (G:Var1) -- (>G:Var1) // Var1-- (dec counter) } } (G:Var1) 0 != // Still not zero? (A:General eng1 starter, bool) || // ICON valueNow, interestingly, when I use this SAME XML gauge in the B206, the behavior is NOT the same.Basically, if I press the joystick button assigned to the starter, it STAYS at 1, unlike in the 747!So, turns out I was not crazy! (Well ok, I am)Now, I know this has to be possible to do, just a matter of figuring out how.I have found that I can toggle this XML gauge on using KEY_TOGGLE_STARTER1, and GENERAL_ENGINE1_STARTER.So, anyone with any ideas given the above?

Share this post


Link to post
Share on other sites
Guest Vorlin

Something lost in the dregs of my memory is just out of my reach... wasn't there something mentioned long ago about the 206 using engine 2 rather than 1, or some other screwball thing like that?You may want to make a simple FORMATTED TEXT gauge to monitor the value of ENG1 N2 RPM, as well as the values of "Circuit general panel on" and the Icon as well.I don't recall seeing either of the latter two used, though that doesn't really mean anything. There is always the outside chance that they may have used other A:vars such as Master Battery or some other such thing in the 206 and monitoring all three values should turn up something.Odds are that one of the vars you're using wasn't utilized in the 206, despite the fact that it may have been standard in the 747... and that's what's throwing things off.*************Edit: Ok, I remembered one thing:"A:Eng1 N1 RPM, percent" is a valid A:var for the 206 but in my own work with it a few months ago "A:Eng1 N2 RPM, percent" drove me bannanas. I finally gave up and used "A:Rotor rpm pct:1,percent" as a substitute just to get things going.I never was able to find a working N2 value in the 206.*************Good luck,Scott / Vorlin

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Scott,Thanks for the idea, but even ignoring the actual XML gauge, I have a tooltip that tells me the value of the starter1 is still stuck on 1.And, when I monitor the value of it from an external program, it remains at 1 too. See, seems in the helicopter engine type's 1, 3, or 5, it is NOT allowing me to toggle it back to zero. In effect, once set, it remains so.Additionally, if I use the XML 'switch', it WILL toggle back to zero, but this is because it is just moved by the timer, not the starter1 var. But again, once that starter1 is toggled, it is stuck.Patrick

Share this post


Link to post
Share on other sites

Have you considered that the turbine engines use a different starter variable than the piston engines?


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
Guest Vorlin

They're both turbines Ed, but at this point I'd check anything so I'm not discounting your point!Patrick,Jordan pulled it off with the 412 but I think he may have keyed off of N1. Perhaps something like:(A:General eng1 starter, bool) (A:Eng1 N1 RPM, percent) 60 > &&amp if {(&gt:K:TOGGLE_STARTER1)}Maybe... maybe not. At this point all one can do is try.Scott

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

You are missing my point entirely.The XML gauge works fine. I am trying to be able to toggle the starter1 variable in C code. Why? So that I can have the user assign a joystick button to it to 'push' the starter.The problem is that once set, the MODULE_VAR goes to 1 and remains there no matter KET_TOGGLE_STARTER1.I know it can be done, as the starter used by Dodosim uses that FS joystick assignment.So, only question is how.I know I have the correct MODULE_VAR as when I press the joystick button, it does go to 1. Question is how to get it back to 0.Edit:What I now notice is that if I put my button in the 747, and press the joystick button, it goes to 1, then shortly returns to 0!So, the problem is not my code, in a manner of speaking, but apparently something in the aircraft type = 1 (vs. 0 for the airplanes) Now I have no idea what to do. But again, I know it can be done.

Share this post


Link to post
Share on other sites
Guest Vorlin

Well, AFAIK, all Steve did was key off of "Starter 1 On/Off" in the assignments menu. The actual assignment had to be done with the repeat value maxed because the way it was coded made is so that it would flip to 0 the moment you released it. If you didn't max your repeat setting, you hot started. Judging by it's behavior I don't think it's a toggle. If it were, then you should be able to set the repeat to nothing and tap the button to start the turbine. Instead, you have to hold it continuously... which makes me wonder if "Starter 1 On/Off" is generating a key event other than K:TOGGLE_STARTER1.Your answer may lie in that direction... but AFAIK, Steve didn't write it to toggle on and off. He wrote it so that you hold it until the turbine is self sustaining or blow up in a fireball.Scott

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

>Well, AFAIK, all Steve did was key off of "Starter 1 On/Off">in the assignments menu. The actual assignment had to be done>with the repeat value maxed because the way it was coded made>is so that it would flip to 0 the moment you released it. >>If you didn't max your repeat setting, you hot started. >>Judging by it's behavior I don't think it's a toggle. If it>were, then you should be able to set the repeat to nothing and>tap the button to start the turbine. Instead, you have to hold>it continuously... which makes me wonder if "Starter 1 On/Off">is generating a key event other than K:TOGGLE_STARTER1.>>Your answer may lie in that direction... but AFAIK, Steve>didn't write it to toggle on and off. He wrote it so that you>hold it until the turbine is self sustaining or blow up in a>fireball.>>ScottAFAIK???Yes, I am aware of the assignment, and have setup a similar assignment, which does SET - GENERAL_ENGINE1_STARTER, and KEY_TOGGLE_STARTER1 also will SET it. It is reseting it that is the mystery.And we have already established it is not a toggle, at least in helicopters.And yes, the idea is eventually to hold it, but if you release it, it needs to go off, or you cannot detect another press of the joystick button which is assigned within FS.So, now hopefully the problem is clear.

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

I have come to the conclusion that the VAR must be reset by FSUIPC to use it.

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Using FSUIPC works great.I use this code:DWORD dwResult;if (FSUIPC_Open(SIM_FS2K4, &dwResult)){ // Open int offValue = 0; if (FSUIPC_Write(0x0892, 2, &offValue, &dwResult)) FSUIPC_Process(&dwResult); // Process the request FSUIPC_Close();}So now I guess I can use it freely as it will require it.

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...