Archived

This topic is now archived and is closed to further replies.

Guest steels214

electrical system failure

Recommended Posts

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
Help AVSIM continue to serve you!
Please donate today!

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

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