Jump to content
The simFlight Network Forums

John Dowson

Members
  • Posts

    13,216
  • Joined

  • Last visited

  • Days Won

    270

Everything posted by John Dowson

  1. As I said, you should attach your log if you want me to investigate. If you want to try the latest beta, it is available here: Install_FSUIPC7.4.13b John
  2. Hi Ray, not sure what value you are trying to display in that code extract (mypit?). but if you want to format a lua number as a string, you can use the lua string.format function to convert it first, e.g. for one decimal place, use local mypitString = string.format("%.1f", mypit) See https://www.codecademy.com/resources/docs/lua/strings/format Cheers, John
  3. Ok, thanks - no need for logs then.
  4. Not quite clear on this - did you have problems with 7.4.13b or not? If so, I would like to see the logs, if not, no point in attaching logs.
  5. Ok. Note that to use the additional PMDG offsets (all of which are read-only), you have to enable data broadcast in the 737_Options.ini file (if you haven't done this already) - see the PMDG offsets document for details. John
  6. What have you tried? Have you tried these custom events for the COM1: There are also presets available that use those custom controls: PMDG_B737-7_COM1_RADIO_FRACT_INC PMDG_B737-7_COM1_RADIO_FRACT_DEC There are similar custom events and presets for COM2 and COM3. And for NAV1 - custom control: and preset: PMDG_B737-7_NAV1_RADIO_FRACT_DEC PMDG_B737-7_NAV1_RADIO_FRACT_INC If not familiar with PMDG custom controls, see For presets, check Select for Preset and then Find Preset... and click-through the MobiFlight presets to find the preset. You can also use https://hubhop.mobiflight.com/presets/ to search for presets. This is the MobiFlight HubHop site that is the community effort to share aircraft presets, all of which are included with FSUIPC7 (or at least the latest presets at time of release). John
  7. That is is a very old version and is no longer supported. Please update to the latest version, 7.4.12. Well, you are not using the newest version of FSUIPC7... Where are you looking? Take a look at the Offset Mapping for PMDG 737-700.pdf document: John
  8. Which file was that? Could you update to the beta version (7.4.13b) posted above if you haven't already. Thanks.
  9. Sorry, what do you mean? Why do you think this is due to FSUIPC? How is this program using FSUIPC to play sound? The lua sound functions certainly still work as I have been testing these today for another support request, and I don't know of any other ways to get sound out of FSUIPC off-hand. If they use lua scripts, are you sure they are running? Some people are having issues with some add-ons not starting or connecting with 7.4.12, the latest update. If using this version, please attach your FSUIPC7.log file and I will take a look. If not, please update - only the latest version is ever supported. John
  10. There has been little change in the lua interface between 6 and 7, except for the addition of more functions provided by FSUIPC7. This is new to me! If it was previously like this, it should still be the same, so I don't know why this is not working any more. I will take a look at some point, and either see why this has changed and if it can be corrected, or I will update the documentation. I am pretty busy at the moment though, and won't have time to look into this for a while. You will have to use the *.lua files rather than the compiled ones If you compile them outside of FSUIPC, how are you including the lua libraries that FSUIPC provides? Are these available to an external compiler, and if so how? Or are they linked-in at run-time?
  11. I have PM'ed you a license. John
  12. Great! Thanks for testing this. John
  13. Please see the Lua Library documentation for the sound.play function such questions: I provide documentation for a reason - please use it! John
  14. Also, this is NOT correct. Please see the Lua Library documentation. The first parameter of the handling function is the offset, the second the value, so you do not need to read this again. It should be: function checkOffset1(offset, status) ipc.log("Offset 1 status: " .. status) if status == 0 then ipc.log("Setting ELECTRICAL_ExternalPower_1 Off") ipc.execInputEvent("ELECTRICAL_ExternalPower_1" , 0) elseif status == 1 then ipc.log("Setting ELECTRICAL_ExternalPower_1 On") ipc.execInputEvent("ELECTRICAL_ExternalPower_1" , 1) end end
  15. Why not? Have you added it to the [Auto] section or your profile specific [Auto.xxx] section? Have you checked in the user manuals on how to get a lua script auto-started? I did miss the function keyword - I have added that now. Was that the issue? Well, that script will work as you are using offset 0x7398, and it looks like only bit 0 is being used in that offset,so you can just check the whole byte, as you are doing. However, if checking offset bits, and not the full offset value, you would need to use event.offsetmask, as I showed you. The alternative, if using event.offset on the whole byte (8-bits), and you would then need to use a conditional and the logic library to test the bit you are interested in, as I showed earlier.
  16. Attached is the one I use...you will need to adjust for the *.wav file names, the locations of the files, and the devices - I have 6 sound devices in registered in my FSUIPC7.ini file. Note I don't bother using the volume parameter - I adjust volume using windows facilities (or EarTrumpet). John soundTest.lua
  17. Then try something like: function FuelPumpTank_L2(offset, value) if value == 0 then ipc.execInputEvent("FUEL_Pump_Tank_L_2" , 1) else ipc.execInputEvent("FUEL_Pump_Tank_L_2" , 0) end end event.offsetmask(0x739F, 8, "UB", "FuelPumpTank_L2") (the third bit is 2^3 = 8 ) The script should be ran via the [Auto] or [Auto.xxx] section (where xxx is your profile name). John
  18. Ok. I have just uploaded a new version if you could test this. Once tested, please check your InstallFSUIPC7.log file - the first line should be: If the installer version number is not v0.9.29, then you will need to clear your browser cache and download again.
  19. Sure, I will generate one and PM it to you later today.
  20. I am sorry but I don't understand this - think there is a translation issue here... Why can you not read the JeeHell offsets? Do you even need to, ie. do the Input Events not hold the same value ()i.e. on/off)? Why don't you just try what I proposed: add one input event to an FSUIPC7 offset (e.g. add FUEL_Pump_Tank_L_1 to offset A000). Then monitor (i.e. Log->Offsets) that offset (A000) as U8, and also log offset 739F as U8 but in hex. Then assign a button or key to the FSUIPC control Offset Byte Togglebits using offset A000 and parameter x1 (to toggle first bit). Open the logging console (Log->Open Console) Then press the button or key that you assigned - does the input event offset change? Does bit 1 of the Jeehell offset also change? You can also set logging for Buttons & Keys (Log->Buttons & Keys).
  21. Why is it complicated? ipc.readUB((0x739F) : this reads offset 0x739F as an Unsigned Byte logic.And(value, 2) : this will perform a bitwise and operation (&) on the value to return the value of bit 1. The second parameter is the bit you want to check, so bit 0 would be 1 (2^0=1), bit 1 would be 2 (2^1=2), but 2 would be 4 (2^2=4), etc But if you can use Input Events, why do you also need to use the Jeehell offsets? Why can't you just use the Input Events? Jeehell offset 739F holds 'the led status' (fault or off) for LTK1/2 & RTK1/2 - are these the same as the FUEL_Pump_Tank_L/R_1/2 Input Events? Try adding one of those Input Events to an offset (as an unsigned byte), then try logging that offsets value, and also assign a button or key to toggle the value using Offset Byte Togglebits. See page 52 of the Advanced User guide. You can also log the JeeHell offsets (as UB in hex) and see if the bit value of that offset matches the value of your Input Event offset, John
  22. Sorry, but it is not clear what you want. Do you want to read the Jeehall offsets, like the one described in your previous post, or do you want to add those Input Events to spare FSUIPC offsets? If you add Input Events to an offset, the minimum size is 1 byte, not 1 bit. If you are using JeeHell and you want to add Input Events to offsets, you should not use the offsets allocated to JeeHell, but use other offsets designated as free for general use (e.g. starting at A000). To add Input Events to offsets. please see the Advance User guide. John
  23. Re-installing will not change anything. I don't have time to look into debugging such a complex lua script. If your issue is that no sound is played, please just try with a simpler script first to confirm that sound is working. i.e. test with a script that just uses sound.play in its various forms, e.g. first just specifying the wav, then a call with the wav file and device number, then add a call that also introduces the volume parameter. You can activate this script on a button or key press. So, try a simpler script first to confirm that sound is working. Once that is done and you have confirmed that sound is working, you can then debug the script. You can use the Log->Lua Plugins logging facility to debug lua scripts. John
  24. Presumably you are using the standard FS controls/events for this: Toggle Beacon Lights, Beacon Lights On, Beacon Lights Off or Beacon Lights Set. Many aircraft, especially complex add-ons, don't use the standard controls and you have to look for other mechanisms of control. These are presets & input events (there are also lvars and hvars, but these can be used via presets).. Presets are names attached to a calculator code string, and are available for assignment by checking 'Select for Preset'. If you do this, you can then click the Find Preset... button, you fill find the following presets for the Fenix under MobiFlight->FenixSim->A320->Lights FNX320 LIGH/t BEACON ON FNX320 LIGH/t BEACON OFF FNX320 LIGH/t BEACON TOGGLE You can also use the MobiFlight HobHop site to search for presets: https://hubhop.mobiflight.com/presets/. Please see the Advanced User guide on how to use Presets (in WASM section). There are also presets available for the Inibuilds A320, but i do not see anything for the beacon lights. I don't have this aircraft, so cannot look into this, but you can try the following: 1. Use logging: activate logging for Events (Log->Events) and Input Events (Log->Input Events) and open the logging console window (Log -> Open Console). Then flip the beacon lights switch in the VC - do you see anything logged? If so, you can assign to that. 2. List the available input events (Log->List Input Events) - do you see anything that looks applicable? If so, you can assign to that by checking Select for Input Event. 3. Look for any lvars that may hold the beacon lights state. You can list available lvars using Log->Add-ons->WASM->List Lvars. If you see one that looks relevant, you can then try changing its value using the Add-ons->WASM->Set Lvar menu option. If changing the value of the lvar changes the state of the beacon lights, then you can use that. There are several ways to use lvars in FSUIPC: by adding to offsets, via a macro file, or via a preset. The preset method is the easiest - you would create a preset (using the myevents.txt file) and then assign to that. Note that the beacon lights in the Fenix A320 are controlled by lvars - this is the preset code that is used (from the MF events.txt file): John
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.