Tom_G_2010 Posted February 4, 2015 Report Share Posted February 4, 2015 I just added a 4 position switch to my C172 sim pit build to function as the fuel tank selector switch. I configured it via FSUIPC so that each of the four positions corresponds to FUEL_TANK_SELECTOR_LEFT, RIGHT, ALL, and OFF.Unfortunately FSX is not responding to the inputs. I can operate the fuel selector within the 3D cockpit via mouse. I have checked functionality using both the FSX default 172 and a couple add on 172s but none respond.I'm running FSX w/Acceleration on a Win7 64Bit pc with the latest release of FSUIPC. I am not sure where to go from here in terms of trouble shooting or steps I can take to gather more intel to assist in trouble shooting.Any advice or direction would be greatly appreciated. Thanks! Tom G. Link to comment Share on other sites More sharing options...
Gypsy Baron Posted February 4, 2015 Report Share Posted February 4, 2015 The FSX fuel tank selection can be rather convoluted, depending upon which tanks are modeled by the developer. Just as an illustratiion, I include the Lua script I use for converting the 5 positions of the fuel select switches in the MAAMSIM C-47 to the appropriate parameter to send to FSX to select the tanks used: function dispR_FUEL_TANK(offs, TANK) if TANK == 0 then x = "R MAIN" y = 3 end if TANK == 1 then x = "L MAIN" y = 2 end if TANK == 2 then x = "L AUX" y = 6 end if TANK == 3 then x = "R AUX" y = 7 end if TANK == 4 then x = "OFF" y = 0 end ipc.control(65962, y) ipc.display("RIGHT FUEL TANK = "..x, 2) end The fuel tank selection is done by FSX Control 65962 with, in this case, the parameters of 3, 2, 6, 7 and 0. As an imperical method, try assigning a switch/button to send that command and vary the parameter while observing the VC fuel selector. Note which parameter activates the desired selections. I always get a list of an aircrafts L:Variables and often use those to do tank selection, among other things. For the A2A C-172R I use an L:Var and a set of parameters that define the amount of rotation of the fuel select switch in the VC, such as 0, 50, 100 which represent a percentage of the full rotation range. My MCRO file entry for the A2A C172R tank select is: 1=L:FSelC172=SET and for the Fuel CutOff: 4=L:Eng1_FuelCutOffSwitch=TOGGLE So, you can see there are any number of possibilities that may exist so one vendors 172 will most likely be entirely different than another vendors implementation. The FSX SDK has a complete list of the Tank Select parameters that can be used with the '65962' control. Here is the list from the SDK: Number Description 0 Off 1 All 2 Left 3 Right 4 Left auxiliary 5 Right auxiliary 6 Center 7 Center2 8 Center3 9 External1 10 External2 11 Right tip 12 Left tip 13 Crossfeed 14 Crossfeed left to right 15 Crossfeed right to left 16 Both 17 External 18 Isolate 19 Left main 20 Right main Good luck :) , Paul Link to comment Share on other sites More sharing options...
Tom_G_2010 Posted February 4, 2015 Author Report Share Posted February 4, 2015 Thanks!!! I'll give that a go this evening after work. Link to comment Share on other sites More sharing options...
Pete Dowson Posted February 5, 2015 Report Share Posted February 5, 2015 I just added a 4 position switch to my C172 sim pit build to function as the fuel tank selector switch. I configured it via FSUIPC so that each of the four positions corresponds to FUEL_TANK_SELECTOR_LEFT, RIGHT, ALL, and OFF. Unfortunately FSX is not responding to the inputs. I can operate the fuel selector within the 3D cockpit via mouse. I have checked functionality using both the FSX default 172 and a couple add on 172s but none respond. The controls are actually called Fuel selector left, Fuel selector right, Fuel selector all and Fuel selector off. However, the default 172 has no off position. These controls operate the switch on the main panel, bottom right, and they work fine here. Use FSUIPC's logging to see what you are doing wrong. Enable non-axis Event logging, operate your switch and check the FSUIPC4 log file in the FS Modules folder. If you temporarily run FS in Windowed mode you can enable FSUIPC's console Log and see what happens as it happens. Here's the log I get and can see the switch turning when I use the controls from assigned buttons (I an logging buttons as well so you can see this). 636578 Button changed: bRef=0, Joy=101, Btn=0, Pressed 636578 [Buttons] 22=P101,0,C65957,0 636578 FS Control Sent: Ctrl=65957, Param=0 636578 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000001} 636593 *** EVENT: Cntrl= 65957 (0x000101a5), Param= 0 (0x00000000) FUEL_SELECTOR_LEFT 636702 Button changed: bRef=0, Joy=101, Btn=0, Released 636702 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000000} 637373 Button changed: bRef=0, Joy=101, Btn=1, Pressed 637373 [Buttons] 25=P101,1,C65956,0 637373 FS Control Sent: Ctrl=65956, Param=0 637373 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000002} 637373 *** EVENT: Cntrl= 65956 (0x000101a4), Param= 0 (0x00000000) FUEL_SELECTOR_ALL 637482 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000000} 637482 Button changed: bRef=0, Joy=101, Btn=1, Released 638138 Button changed: bRef=0, Joy=101, Btn=2, Pressed 638138 [Buttons] 26=P101,2,C65958,0 638138 FS Control Sent: Ctrl=65958, Param=0 638138 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000004} 638138 *** EVENT: Cntrl= 65958 (0x000101a6), Param= 0 (0x00000000) FUEL_SELECTOR_RIGHT 638216 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000000} 638216 Button changed: bRef=0, Joy=101, Btn=2, Released 638918 Button changed: bRef=0, Joy=101, Btn=1, Pressed 638918 [Buttons] 25=P101,1,C65956,0 638918 FS Control Sent: Ctrl=65956, Param=0 638918 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000002} 638918 *** EVENT: Cntrl= 65956 (0x000101a4), Param= 0 (0x00000000) FUEL_SELECTOR_ALL 638996 Button changed: bRef=0, Joy=101, Btn=1, Released 638996 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000000} 639698 Button changed: bRef=0, Joy=101, Btn=0, Pressed 639698 [Buttons] 22=P101,0,C65957,0 639698 FS Control Sent: Ctrl=65957, Param=0 639698 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000001} 639698 *** EVENT: Cntrl= 65957 (0x000101a5), Param= 0 (0x00000000) FUEL_SELECTOR_LEFT 639807 Button changed: bRef=0, Joy=101, Btn=0, Released Of course add-on aircraft might do things their own way, but I would have thought it unlikely for such a simple operation. Pete Link to comment Share on other sites More sharing options...
Tom_G_2010 Posted February 5, 2015 Author Report Share Posted February 5, 2015 Sorry Pete, I inadvertently added the work Tank in my original post. I was typing the message while on break at work from memory. I now have the default FSX 172 working and my Carenado 172N working. But, No Luck on my Carenado/Alabeo 172RG For the two that work after a few different attempts with no results I decided to manually edited the config file to deleted the button assignments. I don't know what was wrong in the config, nothing jumped out at me but, after reentering the button assignments via FSUIPC it now works for the default 172 and my Carenado 172N using the Fuel selector left, Fuel selector right, Fuel selector all for the default 172 and adding Fuel selector off for the Carenado 172N. So I then tried to figure out the Carenado/Alabeo 172RG Based on Paul's reply above I decided to experiment with the Fuel selector Set function. I ran a log to look at what parameters were being sent when I used the Mouse to switch the selector on screen. I then set my button inputs to do the same but it's still not working. Here's a copy of the log after I did this where I used the mouse on screen followed by pressing my corresponding button to see how the two compared. To my very untrained eye the two appear to be doing the same thing yet the mouse click works and the button press does not.. ********* FSUIPC4, Version 4.938f by Pete Dowson ********* User Name="Tom Gauvin" User Addr="tom@xxxxxxxxxxxx.xxx" FSUIPC4 Key is provided WideFS7 Key is provided 4257579 System time = 05/02/2015 00:04:25, Simulator time = 12:14:11 (17:14Z) [Continuation log requested by user] Running inside FSX on Windows 7 Module base=613B0000 4257579 LogOptions changed, now 60000000 00000001 4257610 [Buttons] now profile-specific: 4257610 0=P0,28,C65962,0 4257610 1=P0,25,C65962,2 4257610 2=P0,26,C65962,3 4257610 3=P0,27,C65962,16 4264334 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 0 (0x00000000) FUEL_SELECTOR_SET 4266674 Button changed: bRef=0, Joy=1, Btn=15, Pressed 4266674 [Buttons] 55=P1,15,C65962,0 4266674 FS Control Sent: Ctrl=65962, Param=0 4266674 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 0 (0x00000000) FUEL_SELECTOR_SET 4266799 Button changed: bRef=0, Joy=1, Btn=15, Released 4269014 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 3 (0x00000003) FUEL_SELECTOR_SET 4271245 Button changed: bRef=0, Joy=1, Btn=14, Pressed 4271245 [Buttons] 54=P1,14,C65962,3 4271245 FS Control Sent: Ctrl=65962, Param=3 4271260 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 3 (0x00000003) FUEL_SELECTOR_SET 4271354 Button changed: bRef=0, Joy=1, Btn=14, Released 4273195 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 16 (0x00000010) FUEL_SELECTOR_SET 4275035 Button changed: bRef=0, Joy=1, Btn=13, Pressed 4275035 [Buttons] 56=P1,13,C65962,16 4275035 FS Control Sent: Ctrl=65962, Param=16 4275035 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 16 (0x00000010) FUEL_SELECTOR_SET 4275176 Button changed: bRef=0, Joy=1, Btn=13, Released 4278514 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 2 (0x00000002) FUEL_SELECTOR_SET 4282492 Button changed: bRef=0, Joy=1, Btn=12, Pressed 4282492 [Buttons] 53=P1,12,C65962,2 4282492 FS Control Sent: Ctrl=65962, Param=2 4282508 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 2 (0x00000002) FUEL_SELECTOR_SET 4282633 Button changed: bRef=0, Joy=1, Btn=12, Released 4289700 Sim stopped: average frame rate for last 32 secs = 29.9 fps 4295877 LogOptions changed, now 00000000 00000001 Link to comment Share on other sites More sharing options...
Pete Dowson Posted February 5, 2015 Report Share Posted February 5, 2015 So I then tried to figure out the Carenado/Alabeo 172RG Based on Paul's reply above I decided to experiment with the Fuel selector Set function. I ran a log to look at what parameters were being sent when I used the Mouse to switch the selector on screen. I then set my button inputs to do the same but it's still not working. Here's a copy of the log after I did this where I used the mouse on screen followed by pressing my corresponding button to see how the two compared. To my very untrained eye the two appear to be doing the same thing yet the mouse click works and the button press does not.. It is quite possible that the way the gauge is designed, the switch does not reflect the actual internal setting of the selectors, but those controls are still having the correct effect -- otherwise the mouse click wouldn't send them. If you go the FSUIPC's Logging tab and on the right-hand side enter 0AF8 for the offset, type U16, and check "normal log" below, it will log the internal setting. I suspect to change the visual switch might need the use of local panel variables (L:Vars). You can get a list of those by assigning a key or button to the FSUIPC control for that purpose, or, better, there's a logging facility in a Lua plug-in provided in your Example Lua plug-ins package in FSUIPC Documents. Pete Link to comment Share on other sites More sharing options...
Tom_G_2010 Posted February 7, 2015 Author Report Share Posted February 7, 2015 Pete, Thanks, I was able to log the L:Vars and write a bit of LUA code to get the fuel selector working. if ipc.testbutton(0, 28) == true then ipc.writeLvar("L:KNOB_FUEL_SELECTOR",2) ipc.control(65955) elseif ipc.testbutton(0, 25) == true then ipc.writeLvar("L:KNOB_FUEL_SELECTOR",-1) ipc.control(65957) elseif ipc.testbutton(0, 26) == true then ipc.writeLvar("L:KNOB_FUEL_SELECTOR",0) ipc.control(65956) elseif ipc.testbutton(0, 27) == true then ipc.writeLvar("L:KNOB_FUEL_SELECTOR",1) ipc.control(65958) end Link to comment Share on other sites More sharing options...
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