kingm56 Posted yesterday at 01:48 AM Report Posted yesterday at 01:48 AM Paul, First, I hope you're doing well. When Time permits, I hope to leverage your expertise. I’m writing managed C# code that communicates through FSUIPC. My goal is to toggle the fuel pumps using the MSFS event ELECTRICAL_BUS_TO_CIRCUIT_CONNECTION_TOGGLE (event ID 67076). However, I’m unsure about the correct second parameter to send in order to toggle the specific fuel pump switch(es). FBW API states: The individual pumps are controlled via circuit connections. The corresponding circuit connection numbers are as follows: Fuel and Trim Tank CIRCUIT CONNECTION NUMBERS | | 2 | 3 | 64 | 65 | | | 66 | 67 | 68 | 69 | | | 70 | 71 | 72 | 73 | 74 | | | 78 | 79 | 76 | 77 | 75 | | | | | | | 80 | 81 | | | | | | Example Reverse Polish Notation (RPN) for Fuel Pump Circuit Connection 2 1 (>K:2:ELECTRICAL_BUS_TO_CIRCUIT_CONNECTION_TOGGLE) I'm every, I'm unable to manipulate the switches via SendControlToFS with appropriate ID method. I assume my value is incorrect. Again, I would appreciate your expertise, when/if ime permits.
Paul Henty Posted 17 hours ago Report Posted 17 hours ago This control needs two parameters: the index of the source bus and the index of the circuit you want to connect to. (The 2 and 1 in the example code you posted). I don't think it's possible with FSUIPC to send two parameters to an event. Historically they've only allowed one. There are two alternative options I know of: 1. Use the MSFSVariableServices class to execute the calculator code directly: MSFSVariableServices.ExecuteCalculatorCode("2 1 (>K:2:ELECTRICAL_BUS_TO_CIRCUIT_CONNECTION_TOGGLE)"); There is an example project for getting started with MSFSVariableServices on the website: http://fsuipc.paulhenty.com/#downloads 2. Use the 'presets' feature to execute the calculator code stored in the myevents.txt file. See the "FSUIPC7 for advanced users" pdf and offset 0x7C50. Paul
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now