rustam Posted March 22, 2011 Report Posted March 22, 2011 Hi there, I am lucky enough to fly this wonderful Stearman from Doug Kallen: http://simflight.com/2011/02/02/boeing-stearman-by-proptrash-a-new-record-for-fs2004-models/ The only problem I have is no matter what I do I cannot switch lights (nav, strobe, taxi, etc.) with custom joy button commands assigned in FSUIPC.INI. The same INI file works ok with other aircraft (e.g., default C172) when I put the value of "title=" from aircraft.cfg under my custom profile inside FSUIPC.INI (ShortAircraftNameOk=Yes). I do the same for Stearman and can pan view and move eyepoint (default FS9 commands/keys mapped to joy buttons) plus do a couple of other things through the same FSUIPC.INI in Stearman - just can't understand WHY only the lights are inoperable through FSUIPC. :( Any advise is highly appreciated!!! Vuqar
Pete Dowson Posted March 22, 2011 Report Posted March 22, 2011 just can't understand WHY only the lights are inoperable through FSUIPC. :( Any advise is highly appreciated!!! What controls are you using for the lights? Don't they work with the normal FS-assigned shortcuts? If there are light switches on the panel for the aircraft, try enabling Event logging in FSUIPC, then operating those switches with the mouse and see the Log to find out whether any even was used to operate them. If so, those'll be the ones you need to assign. Regards Pete
rustam Posted March 23, 2011 Author Report Posted March 23, 2011 Thanks for your prompt reply! Here is what I did following your advice: ********* FSUIPC, Version 3.989z by Pete Dowson ********* ... ... [Continuation log requested by user] Module base=61000000 WeatherReadInterval=4 LogOptions=00000011 LogExtras=1 119435 System time = 23/03/2011 04:04:41, FS2004 time = 00:27:39 (08:27Z) 119435 *VIS* SM: Min=0.00, MaxRny=0.00, MaxOvc=0.00, MaxCld=0.00, MaxClr=0.00, Upper=60.00, FT: LwrAlt=0, UppAlt=25000 119435 WeatherOptions set, now 4000B6A7 (timer=0) 119435 LogOptions changed, now 00000011 (LogExtras=1) 119513 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 119513 Ready Flags: Ready-To-Fly=Y, In Menu=N, In Dlg=N 119513 AP READOUTS: Flags1=00000000, Flags2=00000000 123116 *** EVENT: Cntrl= 65560 (0x00010018), Param= 0 (0x00000000) STROBES_TOGGLE (NoAccel) 125566 *** EVENT: Cntrl= 65751 (0x000100d7), Param= 1 (0x00000001) LANDING_LIGHTS_TOGGLE (NoAccel) 127921 *** EVENT: Cntrl= 66379 (0x0001034b), Param= 1 (0x00000001) TOGGLE_NAV_LIGHTS (NoAccel) 129169 *** EVENT: Cntrl= 66239 (0x000102bf), Param= 1 (0x00000001) TOGGLE_BEACON_LIGHTS (NoAccel) 130714 KEYDOWN: VK=16, Waiting=0, Repeat=N, Shifts=1 130714 .. Key not programmed -- passed on to FS 130932 KEYDOWN: VK=83, Waiting=0, Repeat=N, Shifts=1 130932 .. Key not programmed -- passed on to FS 130932 *** EVENT: Cntrl= 65749 (0x000100d5), Param= 0 (0x00000000) VIEW_MODE_REV (NoAccel) 131057 KEYUP: VK=83, Waiting=0 131899 KEYDOWN: VK=83, Waiting=0, Repeat=N, Shifts=1 131899 .. Key not programmed -- passed on to FS 131899 *** EVENT: Cntrl= 65749 (0x000100d5), Param= 0 (0x00000000) VIEW_MODE_REV 132024 KEYUP: VK=83, Waiting=0 132648 KEYUP: VK=16, Waiting=0 136205 *** EVENT: Cntrl= 65732 (0x000100c4), Param= 0 (0x00000000) EXIT (NoAccel) 136236 Ready Flags: Ready-To-Fly=Y, In Menu=N, In Dlg=Y 137718 Flight saved #2 = "Previous flight" 138295 System time = 23/03/2011 04:04:59, FS2004 time = 00:27:57 (08:27Z) 138295 *** FSUIPC log file being closed Memory managed: 0 Allocs, 864 Freed ********* FSUIPC Log file closed *********** And here is the extract from my FSUIPC.INI: [Profile.Default] 1=D75N1 ; Boeing Stearman 2=Cessna Skyhawk 172SP [Buttons.Default] 0=R0,32,C65734,0 ; Pan forward 1=R0,33,C66416,45 ; Pan forward right 2=R0,34,C66416,90 ; Pan right 3=R0,35,C66416,135 ; Pan rear right 4=R0,36,C66416,180 ; Pan rear 5=R0,37,C66416,225 ; Pan rear left 6=R0,38,C66416,270 ; Pan left 7=R0,39,C66416,315 ; Pan forward left 8=P0,1,C65752,0 ; Parking brakes 9=R0,5,C65588,0 ; Brakes 10=R0,6,C65777,0 ; Mixture decrease 11=R0,7,C65775,0 ; Mixture increase 12=P0,0,C66240,0 ; Taxi lights 13=P0,14,C65751,0 ; Toggle landing lights 14=U0,14,C66240,0 ; Taxi lights off 15=P0,13,C65758,0 ; Flaps down incr. 16=P0,4,C65595,0 ; Flaps up all 17=P0,8,C66239,0 ; Toggle beacon lights 18=P0,9,C65560,0 ; Toggle strobe lights 19=P0,10,C66379,0 ; Toggle navigation lights 20=P0,11,C65750,0 ; Toggle panel lights 21=R0,2,Cx42000BC0,xC0010080 ;offset SWord value - elevator trim down 22=R0,3,Cx32000BC0,x3FFF0080 ;offset SWord value - elevator trim up 23=R0,20,C66277,0 ; Aileron trim right 24=R0,22,C66276,0 ; Aileron trim left 26=R0,21,C66529,0 ; buttons 26-31 for Eyepoint movements inside VC 27=R0,19,C66528,0 28=R0,25,C66525,0 29=R0,23,C66524,0 30=R0,26,C66527,0 31=R0,24,C66526,0 [Buttons] ButtonRepeat=0,10 As you can see, I use the same commands for lights both in the INI file and FSUIPC log. But looking at logfile, I suspect there is smth wrong, e.g.: 130714 .. Key not programmed -- passed on to FS What do you think? Thank you!!!
Pete Dowson Posted March 23, 2011 Report Posted March 23, 2011 ... [Continuation log requested by user] Unfortunately, because you started a new log (why?), I cannot see the name of the aircraft loaded, but: UI see you have: [Profile.Default] 1=D75N1 ; Boeing Stearman 2=Cessna Skyhawk 172SP Does it REALLY start with "D75N1"? Or is that just a substring within the name? If it is then you need to change ShortAircraftNameOk=Yes to ShortAircraftNameOk=substring which is recommended in any case. As you can see, I use the same commands for lights both in the INI file and FSUIPC log. But looking at logfile, I suspect there is smth wrong, e.g.: 130714 .. Key not programmed -- passed on to FS No. Keys are those things on your keyboard, not buttons. There are no button presses in this log fragment, or you didn't have that logging enabled. Regards Pete
rustam Posted March 24, 2011 Author Report Posted March 24, 2011 Hi Pete, Here is the answer from Doug Kallen (a.k.a PropTrash @ FSDeveloper.com) who is the author of aircraft in question: In order to separate the light switches from the circuit breakers I made use of local variables to animate each part. In the Stearman, the animation is driven by the local variable, and a key event is sent to the appropriate light circuit at the same time. This allows the circuit breaker and switch to operate independently of each other and still open/close the light circuit.With that in mind, I doubt FSUIPC will be able to work as you want it too, unless it supports local variables as well as key events. It’s been years since I’ve used FSUIPC, so I have no idea if it can do that. You might ask Pete Dowson at his support forum if it does have that capability, and if so, I can supply you with a list of the local variables involved. I'm not sure I fully understand what he means since it sounds too technical for a person not experienced in aircraft modeling... like me. So, I decided to post it here in hope that you could comment on it in more detail. Btw, if you want to try the addon, you can download it from here: http://simviation.com/1/download-file?file=d75n1.zip Thank you very much!
Pete Dowson Posted March 24, 2011 Report Posted March 24, 2011 Here is the answer from Doug Kallen (a.k.a PropTrash @ FSDeveloper.com) who is the author of aircraft in question: If by "local variables" he means "L:Vars", then, yes, FSUIPC can read them via macros and write to them via Lua plug-ins. I'm not sure I fully understand what he means since it sounds too technical for a person not experienced in aircraft modeling... like me. So, I decided to post it here in hope that you could comment on it in more detail. Btw, if you want to try the addon, you can download it from here: http://simviation.co...?file=d75n1.zip Well, if you can't get anywhere I'll have a look, but i don't have much time available for such things. For a recent example of someone writing to an L:var see the thread entitled How to assign a variable to an offset Regards Pete
Pete Dowson Posted March 25, 2011 Report Posted March 25, 2011 I'm not sure I fully understand what he means since it sounds too technical for a person not experienced in aircraft modeling... like me. So, I decided to post it here in hope that you could comment on it in more detail. Btw, if you want to try the addon, you can download it from here: http://simviation.co...?file=d75n1.zip Okay, I had a chance to look at this tonight, just before going to bed. There's quite a long list of Local variables ("L:vars"). You can get those logged in the FSUIPC log file by using the FS control to "Log local variables". Here, I've done it for you (ignore the numbers on the left, that's just the elapsed time in milliseconds). : 543859 Aircraft="D75N1" 543859 Panel includes these local variables: 543859 L:EmergencyThrottleInUse = 0.000000 543859 L:Engine1ThrottlePosition = 50.000000 543859 L:rotate = 0.000000 543859 L:inst_lt = 0.000000 543859 L:adf_pwr = 1.000000 543859 L:kma20_comm_select = 0.000000 543859 L:reset_g = 0.000000 543859 L:stopwatch_knob = 0.000000 543859 L:dg_gyro_cage = 0.000000 543859 L:range_scale = 0.000000 543859 L:purge_valve = 0.000000 543859 L:xpndr_knob = 2.000000 543859 L:comm_switch = 1.000000 543859 L:comm_knob_lg = 0.000000 543859 L:kt76_knob_1 = 0.000000 543859 L:comm_knob = 0.000000 543859 L:nav_switch = 1.000000 543859 L:kt76_knob_10 = 0.000000 543859 L:nav_knob_lg = 0.000000 543859 L:nav_knob = 0.000000 543859 L:kt76_knob_100 = 0.000000 543859 L:vol_knob = 0.000000 543859 L:vol_knob_nav = 0.000000 543859 L:adf_knob_lg = 0.000000 543859 L:kt76_knob_1000 = 0.000000 543859 L:adf_knob_sm_hundreds = 0.000000 543859 L:adf_knob_lg_tens = 0.000000 543859 L:adf_knob_sm = 0.000000 543859 L:adf_vol_knob = 0.000000 543859 L:adj_zero = 0.000000 543859 L:kma20_switch_auto = 0.000000 543859 L:kma20_switch_nav2 = 0.000000 543859 L:marker_hi_lo_test = 0.000000 543859 L:ampsadj = 0.000000 543859 L:voltsadj = 0.000000 543859 L:shake_high = 0.000000 543859 L:shake_low = 1.000000 543859 L:low = 1.000000 543859 L:high = 1.000000 543859 L:red min hand = 0.000000 543859 L:red hour hand = 0.000000 543859 L:stopwatch = 0.000000 543859 L:stopwatch_reset = 0.000000 543859 L:stopwatch8 = 0.000000 543859 L:stopwatch3 = 0.000000 543859 L:adj_airtemp_zero = 0.000000 543859 L:insliteout = 1.000000 543859 L:carburant = 0.000000 543859 L:stall_warning = 0.000000 543859 L:vac_warning = 0.000000 543859 L:ident_on = 0.000000 543859 L:ident = 0.000000 543859 L:pulse = 0.000000 543859 L:lift_hornet_guard = 0.000000 543859 L:speed_radial_sw = 0.000000 543859 L:ki265_kts_tts = 0.000000 543859 L:ident_2 = 0.000000 543859 L:run_ltes = 0.000000 543859 L:flasstrbe = 0.000000 543859 L:cablites = 0.000000 543859 L:lachaleur = 0.000000 543859 L:bcn_lt = 0.000000 543859 L:landlamp = 0.000000 543859 L:brandstof = 0.000000 543859 L:radio_one_cb = 0.000000 543859 L:genalt = 0.000000 543859 L:radio_two_cb = 0.000000 543859 L:crankhornet = 0.000000 543859 L:strflash_sw = 0.000000 543859 L:beaconsw = 0.000000 543859 L:lamp_sw = 0.000000 543859 L:posit_sw = 0.000000 543859 L:air_filter = 0.000000 543859 L:cbnlts_sw = 0.000000 543859 L:pnlico = 0.000000 543859 L:maint_mode = 0.000000 543859 L:twist = 0.000000 543859 L:amorce = 0.000000 543859 L:einde = 0.000000 543859 L:trim_lt = 0.000000 543859 L:trim_rt = 0.000000 543859 L:friction = 0.000000 543859 L:chaleur = 0.000000 543859 L:altgen_sw = 1.000000 543859 L:no_refl = 0.000000 543859 L:hard_on_brakes = 0.000000 543859 L:chinstrap = 0.000000 543859 L:scarf = 1.000000 543859 L:collar = 1.000000 543859 L:revolve = 0.000000 543859 L:highpower = 0.000000 543859 L:sleeve = 0.000000 543859 L:shirt = 0.000000 543859 L:warnstl = 0.000000 543859 L:warnstlsnd = 0.000000 543859 L:backfire = 0.000000 543859 L:load_xpndrsw = 1.000000 543859 L:load_gensw = 1.000000 543859 L:load_adfsw = 1.000000 543859 L:load_commsw = 1.000000 543859 L:load_navsw = 1.000000 543859 L:paused = 0.000000 543859 L:EmergencyThrottlePosition = 0.000000 543859 L:GearLeverPos747 = 0.000000 543859 L:click = 1.000000 The ones controlling the Light switches are just these four: L:strflash_sw L:beaconsw L:lamp_sw L:posit_sw Now these reflect and control the switch positions, on screen. But the actual lights are still controlled by the standard FS controls, the ones you've probably already assigned. Those should work fine -- maybe you thought they weren't working because unfortunately the panel is implemented one-way -- i.e. the switches operate the FS controls, but the state of the lights isn't reflected in the switch positions (so, they can actually become unsynchronised). Additionally difficult is that operating those L:vars directly (in the way I'll show you in a moment) does NOT get the FS control sent. Only operating them with the mouse does that. However, changing the L:vars does change the visible switch position on screen. So, the solution is to have a little Lua plug-in file, one per light switch, which changes both the L:var AND sends the correct FS control. Here's this done for the Landing lights: n = ipc.readLvar("L:lamp_sw") if n ~= ipcPARAM then ipc.writeLvar("L:lamp_sw",ipcPARAM) ipc.control(65751) end 65751 is the "LANDING_LIGHTS_TOGGLE" control, and ipcPARAM is the value of the parameter you'll assign for your real switches. Save this in the FS Modules folder as, say, "stearman_LDG.lua". Then go to FSUIPC buttons & switches tab, "reload all buttons", then assign your switch as follows: For landing lights "on" assign to "Lua stearman_ldg" with a parameter of 1. For landing lights 'off' assign to 'Lua stearman_ldg" with a parameter of 0. Note that to maintain correct synchronisation with the switches and lights you need to start off with them synchronised. This is the problem with Toggle controls. (There's a more complex way to do it without using toggle controls, but i think this is as complex as you want to get at present). Okay? Now you can do the same for the other three (and any other switches as you wish). To ascertain which FS control is being sent just enable the Event logging in FSUIPC and check the log after operating the switch. You'll see entries like this: 1550234 FS Control Sent: Ctrl=65751, Param=0 1550234 *** EVENT: Cntrl= 65751 (0x000100d7), Param= 0 (0x00000000) LANDING_LIGHTS_TOGGLE The number you want is that "Cntrl" number. BTW, I did notice one oddity in this light switch set: the switch labelled 'BCN" uses the FS control "STROBES_TOGGLE" whilst the one labelled STR uses the "TOGGLE_BEACON_LIGHTS" control -- seems reversed. Maybe there's a reason? Ask the author. Regards Pete
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