
John Dowson
Members-
Posts
13,033 -
Joined
-
Last visited
-
Days Won
267
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by John Dowson
-
Which file was that? Could you update to the beta version (7.4.13b) posted above if you haven't already. Thanks.
-
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
-
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?
-
I have PM'ed you a license. John
-
Great! Thanks for testing this. John
-
Please see the Lua Library documentation for the sound.play function such questions: I provide documentation for a reason - please use it! John
-
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
-
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.
-
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
-
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
-
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.
-
Sure, I will generate one and PM it to you later today.
-
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).
-
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
-
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
-
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
-
Help Required Please - Honeycomb Alpha & A320v2
John Dowson replied to DaveEastwood's topic in FSUIPC7 MSFS
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 -
You can use the lua logic library, e.g. to get bit 1 use logic.And(ipc.readUB(0x739F), 2)) (as 2^1 = 2)
-
I am finishing now, its Sunday and the wife is complaining.... Thanks for your assistance, I will review again tomorrow. John
-
Ok. Strange then... I have just updated the installer for 7.4.12b, to explicitly request admin privileges. Can you download again and try with this update? No version change - maybe a good idea to clear your browser cache before downloading, otherwise it may download the older cached version.
-
But is the FSUIPC7.key file created or not? What folder are you installing into?
-
And modified? Best to temporarily rename to see if a new one is created - see my previous post. What location are you installing into?
-
Did you check anti-virus and event viewer? Can you also check the date on your FSUIPC7.key file - is that updated? Maybe temporarily rename that and install again - you will have to enter your registration details manually, When you click Register, is a new FSUIPC7.key file generated? Does it have the correct contents (i.e. same as previous one)? You can put back (i.e. rename) your original key file if not generated.
-
Ok - If you get the same issue, can you please check any anti-virus software installed (including Windows Defender) and see if there are any messages logged there. Also check the windows Event Viewer for error/warning messages.
-
The installer for 7.4.12 is exactly the same as the installer for 7.4.11, only the files that are installed have changed. Maybe you can download and try the latest beta: Install_FSUIPC7.4.13b Do you get the same issue?