Jump to content
Sign in to follow this  
Guest steels214

electrical system failure

Recommended Posts

Guest steels214

I think I have found a small bug with the electrical system failure variable using simconnect. But its probably more likely that I'm doing something wrong. I'm reading the variable "PARTIAL PANEL ELECTRICAL" listed in the simulation variables of the esp sdk. If I go into the aircraft failures and fail the electrical system, this variable returns a '1' for true. If the electrical is not failed it will return a '0'. The problem pops up when I turn off the battery and the generator/alternator power. It seems that if no electrical power is being supplied to the aircraft, the return value is always a '1', even when the electrical system is not failed. I confirmed that this is true by running FSInterrogateII, and looking at the 'fail electrics 0B6A' variable.Am I correct in thinking this is a bug, or did I miss something?Thanks

Share this post


Link to post
Share on other sites
Guest ziporama

Remember, it's always a feature :)I found that failures in FSX (ESP for that matter) are flags - and may not necessarily turn off based on other dependencies - electrical bus energized in your case. If the failure exists, true (non zero) is returned, false (0) if not. It identifies the flag is set, not the fact it's active (impacting the panel state). Similarly, you may have a fuel pump flag indicating "on" even if the corresponding fuel tank that doesn't exist. The fuel pump by itself indicates that if the fuel tank was present, the pump would be active, and should be ignored if the fuel tank is not present. The code logic is expected to handle.In a way, it makes sense to me as you would read the flag value to set/reset a failure from an instructor console for example, and the failure needs to work in the context of other variables to determine impact.Hope this helps, and thanks for confirming that I'm not the only one thinking some of this stuff is definitely odd!Etienne

Share this post


Link to post
Share on other sites
Guest steels214

Thanks Etienne. That does help, although its not the answer I was looking for.Its not a big deal, but it does cause a problem. There is no 'set_electrical_failure(1,0)' function as far as I can tell, only a 'toggle_electrical_failure'. That means that if the battery and generator are off, I don't know if the electrical is failed or not. Before I discovered this problem, my program would actual think it was failed when it wasn't supposed to be (since the flag is set to 1), and therefore do a 'toggle_failure'. So now the electrical really is failed, and now I can't turn on the electrical system on. I know whats happening, but somebody using my program may not.No big deal tho, I can get around this.Thanks again

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...