Hello again!
I'm trying to code the fuel system for my aircraft and I'm running into an issue with fuel tank selection.
When selecting the external fuel tanks I'm doing a check. If either of the tanks has fuel in it, the engine should draw from the two external tanks (value return of 17). Else, it should switch to both (internal, value return of 16).
When the exteriors are empty, I get a proper result of 16 for my fuel selector.
When not, though, it keeps jumping between 16 and 17, which would yield unwanted results as the internal tanks would be consumed before the externals.
I'm trying to code the fuel system for my aircraft and I'm running into an issue with fuel tank selection.
When selecting the external fuel tanks I'm doing a check. If either of the tanks has fuel in it, the engine should draw from the two external tanks (value return of 17). Else, it should switch to both (internal, value return of 16).
When the exteriors are empty, I get a proper result of 16 for my fuel selector.
When not, though, it keeps jumping between 16 and 17, which would yield unwanted results as the internal tanks would be consumed before the externals.
Code:
<!-- ENGINE FEED-->
<!-- Feeding from external wing tanks -->
(L:switch_wing_xfer_prs,bool) 1 == (A:GEAR HANDLE POSITION, Percent) 1 < or (L:switch_ext_xfer,enum) 1 == && if{
(A:FUEL TANK EXTERNAL1 LEVEL, Percent) 0 == (A:FUEL TANK EXTERNAL2 LEVEL, Percent) 0 == && if{
(A:FUEL TANK SELECTOR:1, number) 16 != if{ 16 (>K:FUEL_SELECTOR_SET) }
}
(A:FUEL TANK EXTERNAL1 LEVEL, Percent) 0 != (A:FUEL TANK EXTERNAL2 LEVEL, Percent) 0 != || if{
(A:FUEL TANK SELECTOR:1, number) 17 != if{ 17 (>K:FUEL_SELECTOR_SET) }
}
}


