kingm56 Posted January 21, 2025 Report Posted January 21, 2025 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 January 21, 2025 Report Posted January 21, 2025 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