AleItalia Posted July 30, 2022 Report Posted July 30, 2022 Hi guys, I tried to connect a Whartog switch, to a presets in the buttons and switches section, for starting the motor 1, PED FUEL CUT 1, but it doesn't work, am I wrong something? AleItalia
John Dowson Posted July 31, 2022 Report Posted July 31, 2022 On 7/30/2022 at 9:28 PM, AleItalia said: I tried to connect a Whartog switch, to a presets in the buttons and switches section, for starting the motor 1, PED FUEL CUT 1, but it doesn't work, am I wrong something? No idea - hard to tell with so little information. Try activating logging for Buttons & Keys as well as Events, and check the preset is being sent when you press the button. You can also try executing the calculator code for the preset using the Add-ons->WASM->Execute Calculator Code... menu item to see if the preset is working. If it is, then there is something wrong somewhere - you can attach your log and ini files and I will take a look. If the calculator code for the preset isn't working, I can't help with that - try the MobiFlight discord server. John
Moderate Chop Posted July 31, 2022 Report Posted July 31, 2022 This is how I did it. First, create a macro file in the FSUIPC directory. I called mine MD80.MCRO (it must have the .MCRO extension). In that file I have these entries (so far): [Macros] 1=L:ext_lights_event=Set 2=L:overhead_event=Set 3=L:CM1_clock_event=Set 4=L:cockpit_event=Set 5=L:pedestal_event=Set 6=L:fgcp_event=Set 7=L:CM2_hyd_event=Set 8=L:gear_event=Set Now in the "Control sent when button pressed" drop down menu you will see these additional entries: MD80: L:ext lights event Set MD80: L:overhead event Set ... etc. To operate the left engine fuel idle/cutoff switch, select the MD80: L:pedestal event Set and send the proper parameter, in this case 536870923 (536870912+11) for a left single click. The correct parameter to send can be found on the MobiFlight presets page, https://hubhop.mobiflight.com/presets/ or in the "Maddog interior" .xml file: ...\Community\lsh-maddogx-aircraft\SimObjects\Airplanes\MaddogX\model\MaddogX_interior.xml If you're doing this via Lua script, I've found the easiest thing to do is just execute the "calculator code" from the MobiFlight page. That specific command looks like this: ipc.execCalcCode("536870912 11 + (>L:pedestal_event,number)") Hope that helps! Cheers. 1
Moderate Chop Posted July 31, 2022 Report Posted July 31, 2022 I also immediately realized that what I wrote above is really unnecessary now that the MobiFlight presets for the MD82 are fully populated in FSUIPC. (In my defense I might have started assigning my switches without looking at the presets 🙂). So skip the macro bit and just assign the button to Preset:MD82 PED FUELCUT LEVER1 ON. That seems much easier! 😃 1
Moderate Chop Posted July 31, 2022 Report Posted July 31, 2022 Yes, I can appreciate how frustrating that is. I tested this on my system. Assigning a button to the preset Preset:MD82 PED FUELCUT LEVER1 ON works as expected, setting the left pedestal fuel cutoff lever to ON. As John suggested, I also tried executing the calculator code directly from the Add-ons->WASM->Execute Calculator Code... menu item, and that also works. The calculator code is: 536870912 11 + (>L:pedestal_event,number) If your system is NOT working like this, then only John can troubleshoot the problem. Sorry.
John Dowson Posted August 1, 2022 Report Posted August 1, 2022 12 hours ago, AleItalia said: But I've tried and they don't work As @Moderate Chophas indicated these lvars and presets are working, there must be something else going on. Check that you are using the latest version of FSUIPC7, which is v7.3.7 - if not update first. Also check the WASM module is enabled. If that is the case and it still isn't working, show me your FSUIPC7.log and FSUIPC7.ini files. preferably with Debug level logging activated on the WAPI, as well as Event and Button & Key logging activated. John
AleItalia Posted August 1, 2022 Author Report Posted August 1, 2022 (edited) FSUIPC7.ini I plugged in the nose lights switch, and it doesn't work Edited August 1, 2022 by AleItalia
John Dowson Posted August 1, 2022 Report Posted August 1, 2022 I don't see any assignments to presets in your MD82 profile, although you have some for the Fenix A320. Try adding some assignments to presets and test them. Start with the attached FSUIPC7.ini - I have added a [WAPI] section and enabled Debug level logging, and adjusted the names for your aircraft profiles so that you don't need to add each variant that you use. Make sure FSUIPC7 isn't running when you copy the attachment to your FSUIPC7 installation folder. Any issues, re-attach your updated FSUIPC7.ini as well as your FSUIPC7.log file. FSUIPC7.ini John
AleItalia Posted August 1, 2022 Author Report Posted August 1, 2022 Fsuipc file log, does not allow me to attach it because it exceeds the weight AleItalia
John Dowson Posted August 1, 2022 Report Posted August 1, 2022 20 minutes ago, AleItalia said: Fsuipc file log, does not allow me to attach it because it exceeds the weight zip/compress it.
AleItalia Posted August 1, 2022 Author Report Posted August 1, 2022 Ok John now everything works perfectly thank you, I wanted to ask you, the presets of the buttons and the knob with the lever of the autobrake that you see in the screenshots, are not there? can you have them?
AleItalia Posted August 1, 2022 Author Report Posted August 1, 2022 as for compressing Fsuipc log file, I tried with RAR, it always tells me it's great, is 29,6 MB AleItalia
John Dowson Posted August 2, 2022 Report Posted August 2, 2022 15 hours ago, AleItalia said: I wanted to ask you, the presets of the buttons and the knob with the lever of the autobrake that you see in the screenshots, are not there? can you have them? I cannot help with this as I don't have the MD-82. Ask on the MobiFlight discord server, or on the aircraft support forum. Maybe some other FSUIPC users who have this aircraft can help....maybe @Moderate Chop? 15 hours ago, AleItalia said: as for compressing Fsuipc log file, I tried with RAR, it always tells me it's great, is 29,6 MB The log file shouldn't be that big...make sure that you only have logging activated for what you are investigating or are having issues with (e.g. Events and buttons & Keys only). But I don't need to see this anymore as you say the presets for the MD-82 are now working for you. John
Moderate Chop Posted August 2, 2022 Report Posted August 2, 2022 I think John only provides those presets specified on the MobiFlight site. Unfortunately, only 80 presets are defined for the MD-82, and the buttons you asked about are not among them. (Contrast that with the 1648 presets defined for the PMDG 737!) To assign these other buttons, you will have to go through the process I described earlier: Look through the MaddogX_interior.xml file for the event you want Add that event to a .MCRO file Assign the button to the resulting entry in the drop down list, specifying the parameter to be sent. For example, the switch to arm the autobrake is described beginning on line 18243 in the .xml file (ped_autobrake_switch1). You will see that it requires you to send (to emulate a 'LeftSingle' mouse click) parameter 536870938 (536870912 + 26) to the pedestal_event. For the TRP buttons in your left image, I'm not sure. But I do see that the .xml file has trp_event entires, so you could give those a go. This can be pretty tedious when assigning a lot of buttons, and requires quite a bit of trial and error. But FSUIPC has pretty good logging and debugging tools, so that helps. For more sophisticated assignments that involve multiple actions per switch/key, time delays, conditionals, and dependencies (like the autobrake knob itself), I use Lua scripts. Let me know if you have other questions. 1
John Dowson Posted August 3, 2022 Report Posted August 3, 2022 15 hours ago, Moderate Chop said: I think John only provides those presets specified on the MobiFlight site. Yes - and remember that the preset file (events.txt) that comes with FSUIPC7 is generated at the time of release, and is out-of-date (compared to the presets on the MF HubHop site) shortly after release, as the site is updated frequently. You can always download and install the latest events.txt file from the MF HubHop site if there are presets available there not available in FSUIPC7. I also recommend that you submit any new presets you discover to that site to share them with the community. Thanks @Moderate Chop! John
AleItalia Posted August 3, 2022 Author Report Posted August 3, 2022 I can't understand, it's too high a level for me AleItalia
John Dowson Posted August 3, 2022 Report Posted August 3, 2022 1 hour ago, AleItalia said: I can't understand, it's too high a level for me Then you will have to wait until someone else discovers how to control the functions you are looking for and publishes a preset for you to use. Or maybe ask on the MD82 support forum. John
AleItalia Posted August 4, 2022 Author Report Posted August 4, 2022 Hi guys, I created this file for the autobrake lever, Md80, I inserted it in the Fsuipc directory, but I don't see it in the drop-down list, can you tell me if I made a mistake? thank you AleItalia MD80.MCRO.txt
John Dowson Posted August 4, 2022 Report Posted August 4, 2022 58 minutes ago, AleItalia said: can you tell me if I made a mistake? Yes - your filename has the extension .mcro.txt when it should be just .mcro. Remove the .txt. John
AleItalia Posted August 4, 2022 Author Report Posted August 4, 2022 I made the correction, I just don't understand why I don't see it in the drop-down menu, to assign it to the switch AleItalia MD82.MCRO
AleItalia Posted August 4, 2022 Author Report Posted August 4, 2022 Now the Macro is visible, but the autobrake lever does not move AleItalia
John Dowson Posted August 4, 2022 Report Posted August 4, 2022 (edited) What values can the L:ped_autobrake_switch1 variable take? Are you sure that this lvar is writeable (some lvars are read-only, and no way to know if its read/write or read-only)? To check, use the Add-ons->WASM->Set Lvar menu item, and try setting the lvar to different values. When you chanhe the value of the lvar, list the lvars afterwards to see if the lvar holds the value you have set. Note also that your assignment screenshot shows you are setting the lvar value to 0. The switch is already in the 'off' position, so if '0' is off, the assignment isn'y going to do anything. I can help you to assign this correctly if you confirm that setting this lvar is having the desired affect, which you should always test if you have any issues. Also try logging the lvar value when the switch is in different positions, so that you know what value corresponds to each position. John P.S. Please STOP asking for support by 'reporting content', i.e .do not use the Report option. That is NOT for support requests. Just use the reply function. Edited August 4, 2022 by John Dowson PS added
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