Jump to content
The simFlight Network Forums

John Dowson

Members
  • Posts

    13,046
  • Joined

  • Last visited

  • Days Won

    267

Everything posted by John Dowson

  1. Then your calculations are wrong. The description for offset 0x0578 reads: Your code: --Display Pitch Angle... pit=ipc.readUD(0x0578) mypit = pit*360/(65536*65536) -- 1 if mypit <= 20 then --descending -- 2 mypit = math.floor(-mypit *10) / 10 cond="c1" else --ascending mypit = pit*360/(65536*65536) -- 3 mypit = 360 - math.floor(mypit *10) / 10 -- 4 cond="c2" end You calculate the degree angle correctly (1). But then you have a conditional on 'mypit < 20 then -- descending' (2) - why? Descending is +ve pitch (pitch down), so should be 'mpit >= 0', no? For ascending/pitch up, the value is negative. But you are again converting to degrees (3) where this has been done already (1). You are then subtracting this from 360, which I also don't understand. Do you want to show +ve pitch for ascending, and -ve pitch for descending (i.e. opposite of what offset 0x0578 holds? Or do you always want to show +ve values for both., in which case you would need to subtract the -ve pitch value from 360.
  2. Can you show me your FSUIPC7.ini file please, and also a log file showing your issue and I can take a look. Activate logging for Events and Axiis Controls. Its a good idea to keep the logging console window open and note the timestamp (in the log - first number) of when you get your issue. John
  3. There are a lot of changes between those versions. When updating, you should at least check the chamges.txt (or history document) to see what has changed. Are you aware of the changes to auto-start? There are now 2 auto-start options, one using the MSFS.bat file via the Desktop link, the other using the MSFS EX.xml file. Since 7.4.12, the default method has been changed to use the MSFS.bat file, so if you are not starting MSFS using the Desktop link created by the FSUIPC7 installer, then FSUIPC7 will not be auto-started. If you do not use this link to start FSUIPC7, then you can re-install and change the auto-start method. In the components selection screen, open the auto-start options, de-select the MSFS.bat method and select the EXE.xml method. MSFS load times are nothing to do with FSUIPC7. FSUIPC7 isn't even running, so how can it have anything to do with this? Only the latest version of FSUIPC7 is supported and available. John
  4. So FSUIPC7 wasn't even running? I would expect you to have at least checked that it was running if reporting that it was not working as expected. Note that the auto-start method changed in release 7.4.12 from using the MSFS EXE.xml file to using the MSFS.bat file via the MSFS desktop link installed by the FSUIPC7 installer. If you are not using the desktop link, you can always go back to the older installation method where FSUIPC7 is started by MSFS. Please see the provided documentation for details. John
  5. That depends what you mean by "display", and whatever you are passing the value to display expects. So, if you were logging it, ipc.log expects a string, so you would use, for example ipc.log("mypit = " .. string.format("%.1f", mypit)) If you want to keep it as a number, you can use: mypit = tonumber(string.format("%.1f", mypit))
  6. 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
  7. 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
  8. Ok, thanks - no need for logs then.
  9. 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.
  10. 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
  11. 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
  12. 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
  13. Which file was that? Could you update to the beta version (7.4.13b) posted above if you haven't already. Thanks.
  14. 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
  15. 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?
  16. I have PM'ed you a license. John
  17. Great! Thanks for testing this. John
  18. Please see the Lua Library documentation for the sound.play function such questions: I provide documentation for a reason - please use it! John
  19. 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
  20. 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.
  21. 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
  22. 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
  23. 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.
  24. Sure, I will generate one and PM it to you later today.
×
×
  • 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.